jolicode/slack-php-api

Parameters for chatDeleteScheduledMessage

kesowins opened this issue · 2 comments

Hello,

i wanted to delete a scheduled Chatmessage, but the Method chatDeleteScheduledMessage got only one string Param (string $fetch). How can i set the param like the scheduledMessageId and the channelid? I need both of them to delete the Message in Slack.

Greetings

Hello, sorry it took so long to answer here. There was a bit of inactivity lately.

It looks like sadly Slack didn't describe the parameters for this particular endpoint. Fortunately we have a patch system to update the spec on our side. Would you like to give it a try and update the SDK to describe the missing parameters? We have a documentation explaining how to do that: https://github.com/jolicode/slack-php-api/blob/master/doc/updating-sdk.md#generating-a-new-patch

Don't worry if you can't, we will give a look when we got some time 😉

I believe it has been fixed in our latest release:

* @param array $formParameters {
*
* @var bool $as_user Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.
* @var string $channel The channel the scheduled_message is posting to
* @var string $scheduled_message_id `scheduled_message_id` returned from call to chat.scheduleMessage
* }

Thanks for reporting this issue,
Cheers