I'm writing a simple slack bot which should execute other slack commands upon being called. Everything is up and running, however the slack commands this bot issues don't seem to be executed.
For instance my bot posts /giphy kitten
every hour and the message appears just like that in the channel (so the sending side seems to work), but the slash command itself isn't executed. If I post the same command into the same channel myself it works as expected. Are bots not allowed to execute slash commands?
Bots can use the undocumented API method chat.command
to invoke slash commands.
See here for an unofficial documentation page of this API method.
This question was also answered here.
The command chat.command
needs the permission scope post
, which only legacy tokens have and which is not available for Slack apps.
I just asked the Slack customer support if sending slash commands programmatically is still possible and received the following reply:
I'm afraid not. Slash commands can only be triggered by human-sent messages from the client. Apologies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With