Closed Plandres closed 6 months ago
指令部分由 指令前缀 和 指令名 组成,其中 指令前缀 包含 COMMAND_START bilichat_cmd_start COMMAND_SEP 三部分,默认的 指令前缀 为 /bilichat.
,即完整的指令为 /bilichat.xxx
https://github.com/Well2333/nonebot-plugin-bilichat?tab=readme-ov-file#%E6%8C%87%E4%BB%A4%E8%A1%A8
请仔细阅读 readme 后再发布 issue
在使用"/bilichat.sub"和“/bilichat.check”后依然无回复,输入“/bilichat.qrlogin”后台有报错
01-09 13:28:03 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_bilichat.commands.login, lineno=56) failed.
Traceback (most recent call last):
File "
target = extract_target(event)
File "/home/ubuntu/bot/bilichat/.venv/lib/python3.10/site-packages/nonebot_plugin_saa/registries/platform_send_target.py", line 276, in extract_target
raise RuntimeError(f"event {event.class} not supported")
RuntimeError: event <class 'nonebot.adapters.mirai2.event.message.GroupMessage'> not supported
插件的指令部分使用的是saa进行跨平台适配,但saa未支持mirai,readme中标注是错误的,将在下个版本修正。
也就是说,目前本插件在 mirai 适配器中只能视频解析。如果有需求可以考虑使用 nonebot-plugin-all4one 或其他类似的项目进行协议转换进行使用,或在 saa 中提出添加 mirai 支持的请求。
操作系统
Linux
Python 版本
3.10.12
NoneBot 版本
nonebot cli version 1.2.8
Bilichat 版本
5.1.3
描述问题
nonebot无法回复消息,如输入“/查看”,后台能看到nonebot接受到了消息,但qq无回应,使用的适配器是mirai2,看上去是“Handler Dependent(call=check_sub) skipped”的问题
01-08 22:36:25 [SUCCESS] nonebot | mirai2 1361804427 | [GroupMessage]: {'self_id': , 'type': 'GroupMessage', 'message_chain': [{'type': 'Plain', 'data': {'text': '/查看'}}], 'source': {'id': 4259, 'time': '2024-01-08T14:36:25+00:00'}, 'sender': {'id': , 'name': '七九殇', 'special_title': '', 'permission': 'MEMBER', 'join_timestamp': 1574145563, 'last_speak_timestamp': 1704724585, 'mute_time_remaining': 0, 'group': {'id': , 'name': '', 'permission': 'MEMBER'}}, 'quote': None, 'to_me': True} 01-08 22:36:25 [DEBUG] nonebot | Checking for matchers in priority 1... 01-08 22:36:25 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_bilichat.commands.subs, lineno=15) 01-08 22:36:25 [DEBUG] nonebot | Running Matcher(type='message', module=nonebot_plugin_bilichat.commands.subs, lineno=15) 01-08 22:36:25 [DEBUG] nonebot | Running handler Dependent(call=check_sub) 01-08 22:36:25 [DEBUG] nonebot | Handler Dependent(call=check_sub) skipped 01-08 22:36:25 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_bilichat.commands.subs, lineno=15) running complete 01-08 22:36:25 [DEBUG] nonebot | Checking for matchers completed
插件的配置项
DRIVER=~fastapi+~websockets HOST=127.0.0.1 PORT=17501 LOG_LEVEL=DEBUG SUPERUSERS=["***"] COMMAND_START=["/"]
MIRAI_HOST=localhost MIRAI_PORT=17500 VERIFY_KEY= MIRAI_QQ=[]
bilichat_cd_time = 120 bilichat_neterror_retry = 3 bilichat_use_browser = True bilichat_text_fonts = "yahei" bilichat_webui_path = "bilichat" bilichat_cache_serive = "json" bilichat_dynamic = True bilichat_basic_info = True bilichat_whitelist = ["***"]
截图或日志
echo插件正常回复,bilichat无回复