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.

reply.py 490B

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)