我可以使用python通过Bot发送松弛警报消息吗?

时间:2020-10-11 09:01:44

标签: python-3.x python-requests slack slack-api

我想提醒Slack App上的所有人,我可以通过在频道中发送@here来手动执行。 但是我想用我的机器人发送它。

所以,我尝试了这个:

import numpy as np
import requests

data = {
    'token': token,
    'channel': channel,    
    'as_user': True,
    'text': "<@here>"
}

requests.post(url='https://slack.com/api/chat.postMessage', data=data)

但是它只发送一条普通消息,而不是警报消息。

如何使用我的漫游器发送警报消息?

0 个答案:

没有答案
相关问题