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]: MemberAddEvent处理报错 #27

Closed
4 tasks done
okashi-ya opened this issue Oct 28, 2023 · 1 comment
Closed
4 tasks done

[Bug]: MemberAddEvent处理报错 #27

okashi-ya opened this issue Oct 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@okashi-ya
Copy link
Contributor

确认项

  • 问题的标题明确
  • 我翻阅过其他的 issue 并且找不到类似的问题
  • 我已经阅读了相关文档 并仍然认为这是一个 Bug
  • 我已经尝试过在最新的代码中修复这个问题

操作系统

Windows

Python 版本

3.8.16

NoneBot 版本

2.1.1

适配器

0.6.1

协议端

0.0.52

描述问题

使用on_notice,监控MemberAddEvent消息

复现步骤

1.on_notice注册一个事件
2.消息函数中处理MemberAddEvent对应event参数

期望的结果

可以正确处理MemberAddEvent

截图或日志

10-28 21:20:25 [ERROR] nonebot | RedProtocol | Error while process data from websocket ws://127.0.0.1:16531/. Trying to reconnect...
Traceback (most recent call last):
File "D:\kmrbot\venv\lib\site-packages\nonebot\adapters\red\adapter.py", line 150, in _handle_event
event = target.convert(event_data)
File "D:\kmrbot\venv\lib\site-packages\nonebot\adapters\red\event.py", line 295, in convert
raise ValueError("Invalid legacy invite message.")
ValueError: Invalid legacy invite message.

Nonebot 配置项

No response

@okashi-ya okashi-ya added the bug Something isn't working label Oct 28, 2023
@okashi-ya okashi-ya changed the title [Bug]: 加入群组消息处理报错 [Bug]: MemberAddEvent处理报错 Oct 28, 2023
@okashi-ya
Copy link
Contributor Author

我直接把正则匹配改成了r'.*jp="(\d+)".*jp="(\d+)"' ,就正常了
但是当我直接使用.finish(XXXX)结束的时候会在下图的位置报错,提示以下两个参数没有
image

但是好像MemberAddEvent里这两个参数是有的?我直接屏蔽if判断后也可以正常发送出消息来
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant