Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]自动审批不是正则匹配吗? #89

Open
letianpai-lpt opened this issue May 1, 2023 · 0 comments
Open

[BUG]自动审批不是正则匹配吗? #89

letianpai-lpt opened this issue May 1, 2023 · 0 comments
Labels
agenda 或将解决 question Further information is requested

Comments

@letianpai-lpt
Copy link

letianpai-lpt commented May 1, 2023

描述 bug
例如我设置词条为"朋友",如果验证信息是"朋友"就能自动审批,如果是"是朋友推荐"则不会自动审批

如何复现
设置词条,开启审批,有人加群

报错截图 (python的报错请截最下面)
如果验证消息是"朋友"

报错,但是能自动审批

Traceback (most recent call last):
File "/root/bot/lolbot/lolbot/./src/plugins/nonebot_plugin_admin/requests.py", line 170, in gr_
await bot.send_msg(user_id=int(q), message=f"同意{uid}加入群 {gid},验证消息为 “{word}”")

File "/root/training/Python-3.9.10/lib/python3.9/site-packages/nonebot/internal/adapter/bot.py", line 107, in call_api
await asyncio.gather(*coros)
File "/root/training/Python-3.9.10/lib/python3.9/site-packages/nonebot_plugin_chatrecorder/init.py", line 96, in record_send_msg_v11
or (api == "send_msg" and data["message_type"] == "group")
KeyError: 'message_type'

如果验证消息是带"朋友"的其他字符串,日志为

05-01 20:25:05 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_naturel_gpt.matcher) running complete
05-01 20:25:08 [SUCCESS] nonebot | OneBot V11 22222 | [request.group.add]: {'time': 1682943908, 'self_id': 22222, 'post_type': 'request', 'request_type': 'group', 'sub_type': 'add', 'group_id': 33333, 'user_id': 11111, 'comment': '问题:你好\n答案:朋友推荐', 'flag': '1682943907957328', 'invitor_id': 0}

环境

  • 操作系统 centos
  • Python 版本 3.9.10
  • Nonebot2 版本号 2.0.0rc4
  • 在那里下载的本插件
    github的main分支

其他内容

@yzyyz1387 yzyyz1387 added question Further information is requested agenda 或将解决 labels Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agenda 或将解决 question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants