0
我正在使用Slack使用Python的實時消息傳遞API,並希望使用@像@hellobot創建目錄test2002一樣向一個通道上的用戶發送消息。使用Python向使用Python的通道上的用戶發送Slack消息
給定的代碼不起作用:
slack_client.api_call("chat.postMessage", channel='#bot',text="create directory test2002",username='ecstesting1989')
如果我使用:
slack_client.api_call("chat.postMessage", channel='#bot',text="@hellobot create directory test2002",username='ecstesting1989')
這將作爲@hellobot文本格式創建目錄test2002和不工作的命令。