ziru-w / nonebot_plugin_addFriend

一个基于NoneBot2的插件,用于处理被请求加QQ好友和QQ群的请求A plugin based on NoneBot2 to process QQ friends and QQ group join requests
MIT License
23 stars 1 forks source link

同意入群时显示无权限 #6

Closed ABKQPO closed 1 year ago

ABKQPO commented 1 year ago

自动同意群聊报错 07-26 14:45:38 [ERROR] nonebot | Running Matcher(type='request', module=nonebot_plugin_addFriend) failed. Traceback (most recent call last): File "", line 17, in File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot__init__.py", line 333, in run get_driver().run(*args, *kwargs) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 199, in run uvicorn.run( File "D:\NoneBot\rayy.venv\lib\site-packages\uvicorn\main.py", line 578, in run server.run() File "D:\NoneBot\rayy.venv\lib\site-packages\uvicorn\server.py", line 61, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete self.run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever self._run_once() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1909, in _run_once handle._run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, self._args) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\message.py", line 467, in check_and_run_matcher await _run_matcher(

File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\message.py", line 419, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 759, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 734, in simple_run await handler( File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\dependencies__init.py", line 108, in call return await cast(Callable[..., Awaitable[R]], self.call)(**values) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot_plugin_addFriend\init_.py", line 85, in num=parseTime(config['numControl'],num,old,now) KeyError: 'numControl'

ziru-w commented 1 year ago

我当初更新也没搞版本兼容,我的天,几乎所有问题反馈都是更新版本后配置文件没更新的问题,我知错也

匿名 @.***

 

------------------ 原始邮件 ------------------ 发件人: "ziru-w/nonebot_plugin_addFriend" @.>; 发送时间: 2023年7月26日(星期三) 下午2:48 @.>; @.***>; 主题: Re: [ziru-w/nonebot_plugin_addFriend] 同意入群时显示无权限 (Issue #6)

自动同意群聊报错 07-26 14:45:38 [ERROR] nonebot | Running Matcher(type='request', module=nonebot_plugin_addFriend) failed. Traceback (most recent call last): File "", line 17, in File "D:\NoneBot\rayy.venv\lib\site-packages\nonebotinit.py", line 333, in run get_driver().run(*args, *kwargs) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 199, in run uvicorn.run( File "D:\NoneBot\rayy.venv\lib\site-packages\uvicorn\main.py", line 578, in run server.run() File "D:\NoneBot\rayy.venv\lib\site-packages\uvicorn\server.py", line 61, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete self.run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever self._run_once() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1909, in _run_once handle._run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, self._args) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\message.py", line 467, in check_and_run_matcher await _run_matcher(

File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\message.py", line 419, in run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 759, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 734, in simple_run await handler( File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot\dependencies_init.py", line 108, in call return await cast(Callable[..., Awaitable[R]], self.call)(**values) File "D:\NoneBot\rayy.venv\lib\site-packages\nonebot_plugin_addFriendinit.py", line 85, in _ num=parseTime(config['numControl'],num,old,now) KeyError: 'numControl'

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ziru-w commented 1 year ago

自动同意群聊报错 07-26 14:45:38 [ERROR] nonebot | Running Matcher(type='request', module=nonebot_plugin_addFriend)

用这个覆盖以下config.json就好了,记住填写你的超管qq,用来接收信息的 { "agreeAutoApprove": { "friend": 1, "group": 0 }, "numControl": {"maxNum":5,"time":2,"unit":"h"}, "maxViewNum":20, "recipientList": ["你的超管qq"], "forwardSet":0, "blackDict":{"friend":{"text":[],"id":[]},"group":{"text":[],"id":[]},"forward":{}}, "warnDict":{"friend":{"text":[],"id":[]},"group":{"text":[],"id":[]},"forward":{}}, "allowAddFriednText":[], "botName": "我", "friend_msg": { "notice_msg": "请求添加好友,验证消息为", "welcome_msg": "我未知的的朋友啊,很高兴你添加我为qq好友哦!\n同时,如果有疑问,可以发送/help哦" }, "group_msg": { "notice_msg": "发送群邀请,验证消息为", "welcome_msg": "我亲爱的的朋友啊,很高兴你邀请我哦!" }, "statusDict":{ "blackDict":{"friend":{"status":"拉黑QQ,已拒绝,仅作提示"},"group":{"status":"拉黑群聊,已拒绝,仅作提示"}}, "warnDict":{"friend":{"status":"警告QQ,手动同意,是否同意"},"group":{"status":"警告群聊,手动同意,是否同意"}} } }