Skip to content

Commit

Permalink
fix: wechatmp channel now do not need client
Browse files Browse the repository at this point in the history
  • Loading branch information
JS00000 committed Apr 19, 2023
1 parent 8cea022 commit 1e58c1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions channel/wechatmp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ pip3 install web.py
相关的服务器验证代码已经写好,你不需要再添加任何代码。你只需要在本项目根目录的`config.json`中添加
```
"channel_type": "wechatmp", # 如果通过了微信认证,将"wechatmp"替换为"wechatmp_service",可极大的优化使用体验
"wechatmp_token": "Token", # 微信公众平台的Token
"wechatmp_token": "xxxx", # 微信公众平台的Token
"wechatmp_port": 8080, # 微信公众平台的端口,需要端口转发到80或443
"wechatmp_app_id": "", # 微信公众平台的appID,wechatmp_service需要填写
"wechatmp_app_secret": "", # 微信公众平台的appsecret,wechatmp_service需要填写
"wechatmp_app_id": "xxxx", # 微信公众平台的appID
"wechatmp_app_secret": "xxxx", # 微信公众平台的appsecret
"single_chat_prefix": [""], # 推荐设置,任意对话都可以触发回复,不添加前缀
"single_chat_reply_prefix": "", # 推荐设置,回复不设置前缀
"plugin_trigger_prefix": "&", # 推荐设置,在手机微信客户端中,$%^等符号与中文连在一起时会自动显示一段较大的间隔,用户体验不好。请不要使用管理员指令前缀"#",这会造成未知问题。
Expand Down
2 changes: 1 addition & 1 deletion channel/wechatmp/wechatmp_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def __init__(self, passive_reply=True):
self.passive_reply = passive_reply
self.flag = 0

self.client = WechatMPClient()
if self.passive_reply:
self.NOT_SUPPORT_REPLYTYPE = [ReplyType.IMAGE, ReplyType.VOICE]
# Cache the reply to the user's first message
Expand All @@ -38,6 +37,7 @@ def __init__(self, passive_reply=True):
self.request_cnt = dict()
else:
self.NOT_SUPPORT_REPLYTYPE = []
self.client = WechatMPClient()


def startup(self):
Expand Down

0 comments on commit 1e58c1a

Please sign in to comment.