init: build minimum viable version

This commit is contained in:
zhayujie
2022-08-10 00:04:10 +08:00
commit 1ec0a530bf
16 changed files with 161 additions and 0 deletions

16
bot/bot_factory.py Normal file
View File

@@ -0,0 +1,16 @@
"""
channel factory
"""
from bot.baidu.baidu_unit_bot import BaiduUnitBot
def create_bot(bot_type):
"""
create a channel instance
:param channel_type: channel type code
:return: channel instance
"""
if bot_type == 'baidu':
return BaiduUnitBot()
raise RuntimeError