From 4328374fceb0e914f5a433942a6f20cfb9dc81a0 Mon Sep 17 00:00:00 2001 From: lichengzhe <38408577@qq.com> Date: Tue, 11 Apr 2023 22:39:26 +0800 Subject: [PATCH] update readme and disable unsupported event or message response. --- README.md | 7 +++++-- channel/wechat/wechat_com_channel.py | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 70f696de..94f9e588 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ - [x] [个人微信](https://github.com/zhayujie/bot-on-anything#2%E4%B8%AA%E4%BA%BA%E5%BE%AE%E4%BF%A1) - [x] [订阅号](https://github.com/zhayujie/bot-on-anything#3%E4%B8%AA%E4%BA%BA%E8%AE%A2%E9%98%85%E5%8F%B7) - [x] [服务号](https://github.com/zhayujie/bot-on-anything#4%E4%BC%81%E4%B8%9A%E6%9C%8D%E5%8A%A1%E5%8F%B7) - - [x] 企业微信 + - [x] [企业微信](https://github.com/lichengzhe/bot-on-anything/tree/master#12企业微信) - [x] [Telegram](https://github.com/zhayujie/bot-on-anything#6telegram) - [x] [QQ](https://github.com/zhayujie/bot-on-anything#5qq) - [x] [钉钉](https://github.com/zhayujie/bot-on-anything#10%E9%92%89%E9%92%89) @@ -599,7 +599,6 @@ pip3 install requests flask ```bash "channel": { "type": "wechat_com", - "wechat_mp": { "wechat_token": "YOUR TOKEN", # token值 "port": "8888", # 程序启动监听的端口 @@ -613,6 +612,10 @@ pip3 install requests flask 注意:需将服务器ip地址配置在 "企业可信IP" 内,否则用户将收不到主动推送的消息。 +**参考文档**: + +- [企业微信配置教程](https://www.wangpc.cc/software/wechat_com-chatgpt/) + ### 通用配置 + `clear_memory_commands`: 对话内指令,主动清空前文记忆,字符串数组可自定义指令别名。 diff --git a/channel/wechat/wechat_com_channel.py b/channel/wechat/wechat_com_channel.py index 17e5e4a9..229c9cb8 100644 --- a/channel/wechat/wechat_com_channel.py +++ b/channel/wechat/wechat_com_channel.py @@ -89,5 +89,6 @@ def handle(self): thread_pool.submit(self._do_send, msg.content, msg.source) else: reply = 'Can not handle this for now' - self.client.message.send_text(self.AppId, msg.source, reply) + # 未能处理的消息或菜单事件暂不做响应优化用户体验 + # self.client.message.send_text(self.AppId, msg.source, reply) return 'success'