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

bot_factory.py 302B

12345678910111213141516
  1. """
  2. channel factory
  3. """
  4. from bot.baidu.baidu_unit_bot import BaiduUnitBot
  5. def create_bot(bot_type):
  6. """
  7. create a channel instance
  8. :param channel_type: channel type code
  9. :return: channel instance
  10. """
  11. if bot_type == 'baidu':
  12. return BaiduUnitBot()
  13. raise RuntimeError