From cda9d5873d60d054a4ffd5ceebb94bfc4c6c68ae Mon Sep 17 00:00:00 2001 From: lanvent Date: Sat, 1 Apr 2023 04:26:34 +0800 Subject: [PATCH] plugins: support wechaty channel --- app.py | 2 +- channel/wechat/wechaty_channel.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index c78a72c..7338f56 100644 --- a/app.py +++ b/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 diff --git a/channel/wechat/wechaty_channel.py b/channel/wechat/wechaty_channel.py index cb39313..5f2f858 100644 --- a/channel/wechat/wechaty_channel.py +++ b/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)