from dingtalkchatbot.chatbot import DingtalkChatbot
WebHook地址
webhook = "https://oapi.dingtalk.com/robot/send?access_token=a699a832c993b6a334f989b1f3b74d50a4c102d14b140f6bdee9bdb7bf603b67"
初始化机器人小丁
xiaoding = DingtalkChatbot(webhook)
Text消息@所有人
xiaoding.send_text(msg='日报,小丁就是我!', is_at_all=True)
Text消息之@指定用户
at_mobiles = ['这里填写需要提醒的用户的手机号码,字符串或数字都可以']
xiaoding.send_text(msg='日报我就是小丁,小丁就是我!', at_mobiles=at_mobiles)
image表情消息
xiaoding.send_image(pic_url='http://uc-test-manage-00.umlife.net/jenkins/pic/flake8.png')
Link消息
xiaoding.send_link(title='日报万万没想到,李小璐竟然...', text='故事是这样子的...', message_url='http://www.kwongwah.com.my/?p=454748", pic_url="https://pbs.twimg.com/media/CEwj7EDWgAE5eIF.jpg')
Markdown消息@所有人
xiaoding.send_markdown(title='日报氧气文字', text='#### 广州天气\n'
'> 9度,西北风1级,空气良89,相对温度73%\n\n'
'> ![美景](https://imgconvert.csdnimg.cn/aHR0cDovL3d3dy5zaW5haW1nLmNuL2R5L3NsaWRlbmV3cy81X2ltZy8yMDEzXzI4LzQ1M18yODQ4OF80NjkyNDguanBn?x-oss-process=image/format,png)\n'
'> ###### 10点20分发布 [天气](http://www.thinkpage.cn/) \n',
is_at_all=True)
钉钉绑定机器人
最新推荐文章于 2024-02-26 10:23:41 发布