Execute slash command as slack bot

泪湿孤枕 提交于 2019-11-26 14:08:06

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/39829741/execute-slash-command-as-slack-bot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!