Can a Slack bot get the thread id that a slash command was sent from?

社会主义新天地 提交于 2020-01-01 14:11:44

问题


Suppose a user types a slash command inside a thread, as opposed to inside the main channel.

Is it possible for to include this information in the request sent to the bot? I want the bot to know where exactly the message came from so that it can reply in the same location (i.e. inside the thread and not in the main channel)

Judging by the docs, it seems information about threads is not sent. Here is the POST object that the docs say is sent:

token=gIkuvaNzQIHg97ATvDxqgjtO
&team_id=T0001
&team_domain=example
&enterprise_id=E0001
&enterprise_name=Globular%20Construct%20Inc
&channel_id=C2147483705
&channel_name=test
&user_id=U2147483697
&user_name=Steve
&command=/weather
&text=94070
&response_url=https://hooks.slack.com/commands/1234/5678
&trigger_id=13345224609.738474920.8088930838d88f008e0

Does anyone know if there is a way to do this?

来源:https://stackoverflow.com/questions/51956124/can-a-slack-bot-get-the-thread-id-that-a-slash-command-was-sent-from

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