Dingtalk.py 572 B

123456789101112131415161718
  1. from dingtalkchatbot.chatbot import DingtalkChatbot
  2. def send_message_mobiles(message,dingtalk,mobiles):
  3. webhook = dingtalk
  4. xiaoding = DingtalkChatbot(webhook)
  5. xiaoding.send_text(msg=message,at_mobiles=[mobiles],is_auto_at=False)
  6. return
  7. def send_message(message,dingtalk):
  8. webhook = dingtalk
  9. xiaoding = DingtalkChatbot(webhook)
  10. xiaoding.send_text(msg=message)
  11. return
  12. def send_message_markdown(title,text,dingtalk):
  13. webhook = dingtalk
  14. xiaoding = DingtalkChatbot(webhook)
  15. xiaoding.send_markdown(title=title,text=text)
  16. return