I am using Slack real time messaging API with Python and want to send a message to a user on a channel, using@ like @hellobot create a directory test2002.
The given code doesn't work:
slack_client.api_call("chat.postMessage", channel='#bot',text="create directory test2002",username='ecstesting1989')
If I use:
slack_client.api_call("chat.postMessage", channel='#bot',text="@hellobot create directory test2002",username='ecstesting1989')
This sends the command as @hellobot create directory test2002 in text format and doesn't work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.