ieew / nonebot_adapter_mirai2

nonebot2 的三方 adapter,用以为 nonebot2 提供 MiraiApiHttp2 协议支持
https://ieew.github.io/nonebot_adapter_mirai2/
GNU Affero General Public License v3.0
20 stars 6 forks source link

后台Not match annotation GroupMessageEvent, ignored问题 #26

Closed WindraiteLesd closed 2 years ago

WindraiteLesd commented 2 years ago

Mirai_Api_Http 2.5.0 nonebot 2.0.0-beta.1 python 3.7.3

安装任何插件的情况下在群内发送任何消息都会出现以下问题,且插件不会响应。

下方为使用Minesweeper插件在群内输入了指令后的后台输出

04-30 17:36:08 [DEBUG] nonebot | Checking for matchers in priority 13...
04-30 17:36:08 [INFO] nonebot | Event will be handled by <Matcher from nonebot_plugin_minesweeper, type=message, priority=13, temp=False>
04-30 17:36:08 [DEBUG] nonebot | Running matcher <Matcher from nonebot_plugin_minesweeper, type=message, priority=13, temp=False>
04-30 17:36:08 [DEBUG] nonebot | Running handler <Dependent call=<function _ at 0x0000018E844ED9D0>, params=[ModelField(name='matcher', type=Matcher, required=True), ModelField(name='event', type=MessageEvent, required=True), ModelField(name='argv', type=List[str], required=True)], parameterless=[]>
04-30 17:36:08 [DEBUG] nonebot | Event type <class 'nonebot.adapters.mirai2.event.message.GroupMessage'> not match annotation MessageEvent, ignored
04-30 17:36:08 [DEBUG] nonebot | Handler <Dependent call=<function _ at 0x0000018E844ED9D0>, params=[ModelField(name='matcher', type=Matcher, required=True), ModelField(name='event', type=MessageEvent, required=True), ModelField(name='argv', type=List[str], required=True)], parameterless=[]> param event value [GroupMessage]: {'self_id': 1301951804, 'type': 'GroupMessage', 'message_chain': [{'type': 'Plain', 'data': {'text': '/minesweeper'}}], 'source': {'id': 331, 'time': '2022-04-30T09:36:08+00:00'}, 'sender': {'id': 2479860528, 'name': 'WindraiteLesd', 'permission': 'OWNER', 'group': {'id': 791647963, 'name': 'XXXX', 'permission': 'MEMBER'}}, 'to_quote': False, 'quote': None, 'to_me': False} mismatch type MessageEvent, skipped
04-30 17:36:08 [INFO] nonebot | Matcher <Matcher from nonebot_plugin_minesweeper, type=message, priority=13, temp=False> running complete
04-30 17:36:08 [DEBUG] nonebot | Stop event propagation
ieew commented 2 years ago

请检查你安装的插件是否已经适配本 adapter 。如果您使用的插件不适配本 adapter 则必定会出现该问题。