瀏覽代碼

plugins: support wechaty channel

master
lanvent 1 年之前
父節點
當前提交
cda9d5873d
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. +1
    -1
      app.py
  2. +2
    -0
      channel/wechat/wechaty_channel.py

+ 1
- 1
app.py 查看文件

@@ -14,7 +14,7 @@ def run():
# create channel
channel_name=conf().get('channel_type', 'wx')
channel = channel_factory.create_channel(channel_name)
if channel_name=='wx':
if channel_name in ['wx','wxy']:
PluginManager().load_plugins()

# startup channel


+ 2
- 0
channel/wechat/wechaty_channel.py 查看文件

@@ -41,6 +41,8 @@ class WechatyChannel(ChatChannel):
config = conf()
token = config.get('wechaty_puppet_service_token')
os.environ['WECHATY_PUPPET_SERVICE_TOKEN'] = token
os.environ['WECHATY_LOG']="warn"
# os.environ['WECHATY_PUPPET_SERVICE_ENDPOINT'] = '127.0.0.1:9001'
self.bot = Wechaty()
self.bot.on('login', self.on_login)
self.bot.on('message', self.on_message)


Loading…
取消
儲存