基本的webhook消息,接下来要添加bot交互
py-slack的Python项目详细描述
py_松弛度
基本的webhook消息,接下来需要交互性
cli
python3 send_hook.py https://hook_url/xxxxx/xxxx string_of_txt
代码
实际上,我用它来发送python对象的json。下面是如何在代码中使用它:
from send_hook import send_msg_hook
send_hook_msg(hook_url, msg, format_type)
#hook_url expects a string url with the appropriate protocol at the beginning, for example http:// or https://
#msg expects either a dictionary or a string
#format_type defaults to 'snippet', but can be set to 'plain'