選択できるのは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