您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425
  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. INFO = 9
  9. ERROR = 10
  10. def __str__(self):
  11. return self.name
  12. class Reply:
  13. def __init__(self, type: ReplyType = None, content=None):
  14. self.type = type
  15. self.content = content
  16. def __str__(self):
  17. return "Reply(type={}, content={})".format(self.type, self.content)