You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
707B

  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. InviteRoom = 8 # 邀请好友进群
  12. INFO = 9
  13. ERROR = 10
  14. TEXT_ = 11 # 强制文本
  15. VIDEO = 12
  16. MINIAPP = 13 # 小程序
  17. def __str__(self):
  18. return self.name
  19. class Reply:
  20. def __init__(self, type: ReplyType = None, content=None):
  21. self.type = type
  22. self.content = content
  23. def __str__(self):
  24. return "Reply(type={}, content={})".format(self.type, self.content)