eya46 / nonebot_plugin_nezha

nonebot哪吒监控插件,使用哪吒监控API。
MIT License
3 stars 1 forks source link

无法使用 #1

Open duncai233 opened 2 months ago

duncai233 commented 2 months ago

05-02 23:06:20 [ERROR] nonebot | Running AlconnaMatcher(type='', module=nonebot_plugin_alconna.matcher, lineno=923) failed. Traceback (most recent call last): File "", line 15, in File "C:\lib\site-packages\nonebot__init__.py", line 335, in run get_driver().run(*args, *kwargs) File "C:\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in run uvicorn.run( File "C:\lib\site-packages\uvicorn\main.py", line 575, in run server.run() File "C:\lib\site-packages\uvicorn\server.py", line 65, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\lib\asyncio\base_events.py", line 636, in run_until_complete self.run_forever() File "C:\lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "C:\lib\asyncio\base_events.py", line 603, in run_forever self._run_once() File "C:\lib\asyncio\base_events.py", line 1909, in _run_once handle._run() File "C:\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, self._args) File "C:\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher await _run_matcher(

File "C:\lib\site-packages\nonebot\message.py", line 428, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "C:\lib\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "C:\lib\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run await handler( File "C:\lib\site-packages\nonebot\dependencies__init.py", line 94, in call__ return await cast(Callable[..., Awaitable[R]], self.call)(*values) File "C:\lib\site-packages\nonebot_plugin_nezha\tool.py", line 43, in _catch await func(args, **kwargs) File "C:\lib\site-packages\nonebot_plugin_nezha__init__.py", line 39, in details_cmd_handle if isinstance(arg.result, int) or "," in arg.result: TypeError: argument of type 'NoneType' is not iterable

eya46 commented 2 months ago

能发一下Alconna版本和调用命令的消息吗?

1234-star commented 2 months ago

可以使用的,就是他这文档写了跟没写一样,首先不能用http连接qq,反正我是报错,ws连接qq,然后httpx发送请求哪吒,而且nezha_arg_default这个参数不能为空,要不然报错,还有must_super_user这个设置为falsel,我暂时也没找到设置为管理员的方法,这些改好就能用了

eya46 commented 2 months ago

管理员 在.env文件中设置 SUPERUSERS=["xxxxx"]

1234-star commented 2 months ago

这个superuser是所有插件通用吗,还是单独哪个的

1234-star commented 2 months ago

还有false不小心打错字了

eya46 commented 2 months ago

按理来说所有插件通用

1234-star commented 2 months ago

插件可能是和fastapi不兼容,通过fastapi+httpx适配器,反向httpqq连接qq的时候插件无法使用,我是通过websockets+httpx,然后反向ws成功使用插件,这个可以写到文档里面,还有nezha_arg_default="国内"这个参数如果不设置报错,这个也可以写进去

1234-star commented 2 months ago

请问一下那个命令前缀怎么去掉就是那个/

eya46 commented 2 months ago

请问一下那个命令前缀怎么去掉就是那个/

COMMAND_START=["/", ""]