reply.py 752 B

1234567891011121314151617181920212223242526272829303132
  1. # encoding:utf-8
  2. from enum import Enum
  3. class ReplyType(Enum):
  4. TEXT = 1 # 文本
  5. VOICE = 2 # 音频文件
  6. IMAGE = 3 # 图片文件
  7. IMAGE_URL = 4 # 图片URL
  8. VIDEO_URL = 5 # 视频URL
  9. FILE = 6 # 文件
  10. CARD = 7 # 微信名片,仅支持ntchat
  11. INVITE_ROOM = 8 # 邀请好友进群
  12. INFO = 9
  13. ERROR = 10
  14. TEXT_ = 11 # 强制文本
  15. VIDEO = 12
  16. MINIAPP = 13 # 小程序
  17. ACCEPT_FRIEND = 19 # 接受好友申请
  18. def __str__(self):
  19. return self.name
  20. class Reply:
  21. def __init__(self, type: ReplyType = None, content=None):
  22. self.type = type
  23. self.content = content
  24. def __str__(self):
  25. return "Reply(type={}, content={})".format(self.type, self.content)