依赖于 nonebot2.0.0b1
请看本仓库的 wiki
- qq频道: 点击链接加入讨论子频道【mirai2适配器】
nonebot2 的三方 adapter,用以为 nonebot2 提供 MiraiApiHttp2 协议支持
Home Page: https://ieew.github.io/nonebot_adapter_mirai2/
License: GNU Affero General Public License v3.0
依赖于 nonebot2.0.0b1
请看本仓库的 wiki
driver=nonebot.drivers.fastapi+nonebot.drivers.httpx+nonebot.drivers.websockets
MIRAI_HOST=127.0.0.1 # mah2 的 host
MIRAI_PORT=5700 # mah2 的 port
MIRAI_QQ=[3181952556] # mirai 上已登录的 qq 号
VERIFY_KEY=QDTTEGYGfOGBVcX # MiraiApiHttp2 配置文件里的 token
driver=nonebot.drivers.fastapi+nonebot.drivers.websockets # nonebot_adapter_mirai2 需要使用 websockets 驱动所以需要加该行
MIRAI_HOST=127.0.0.1 # MiraiApiHttp2 的 ip
MIRAI_PORT=5700 # MiraiApiHttp2 的端口
SUPERUSERS=["1234567890"] # Mirai 上已经登录的 qq 号
应该以哪个为准?
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
当连接失败的时候 nonebot_adapter_mirai2
缺乏日志输出。
在从nonebot.adapters.onebot.v11
转到nonebot_adapter_mirai2
时遇到了一个问题:
onebot.v11
中定义了permission=GROUP
为群中所有的成员所拥有的权限,而在nonebot_adapter_mirai2
中将该权限分为了GROUP_MEMBER
,GROUP_ADMIN
,GROUP_ADMINS
,GROUP_OWNER
,GROUP_OWNER_SUPERUSER
,SUPERUSER
。
在原插件(nonebot_plugin_fortune)中部分使用的GROUP
权限的代码如下:
...
plugin_help = on_command("运势帮助", permission=GROUP, priority=8, block=True)
divine = on_command("今日运势", aliases={"抽签", "运势"}, permission=GROUP, priority=8, block=True)
limit_setting = on_regex(r"指定(.*?)签", permission=GROUP, priority=8, block=True)
theme_setting = on_regex(r"设置(.*?)签", permission=SUPERUSER | GROUP_ADMIN | GROUP_OWNER, priority=8, block=True)
reset = on_command("重置抽签", permission=SUPERUSER | GROUP_ADMIN | GROUP_OWNER, priority=8, block=True)
theme_list = on_command("主题列表", permission=GROUP, priority=8, block=True)
show = on_command("抽签设置", permission=GROUP, priority=8, block=True)
...
如果我要将其改为nonebot_adapter_mirai2
所拥有的权限,是需要将其全部替换为GROUP_MEMBER, GROUP_ADMIN, GROUP_OWNER
吗?如果不是的话,应该怎么替换呢?
问题:
当消息内存在回复行为的情况下,带回复消息内的quote元素会影响命令处理器的命令触发判断
解决方法:
提取出quote元素后不再塞回消息链中。
又是我,别打我
将本adapter更新至0.0.8版本后,bot无法正常发送信息
matcher=on_startswith("nb2")
@matcher.handle()
async def _():
await matcher.finish("success")
nb侧配置
HOST=127.0.0.1
PORT=8081
driver=nonebot.drivers.fastapi+nonebot.drivers.httpx+nonebot.drivers.websockets
MIRAI_HOST=127.0.0.1
MIRAI_PORT=8080
MIRAI_VERIFY_KEY=INITKEYr61MGWpM
MIRAI_QQ=["xxxxxxx"]
尝试过按照config.py内的指示将mirai_qq修改为int,无果
mirai-api-http 2.4.0
adapters:
- ws
debug: false
enableVerify: false
verifyKey: INITKEYr61MGWpM
singleMode: false
cacheSize: 4096
adapterSettings: {
ws:
host: 127.0.0.1
port: 8080
reservedSyncId: -1
}
能够成功建立连接,之前的群聊图片bug也没问题了,但发送消息出错
现已降级到0.0.6
如果是我的问题,请狠狠鞭打我
辛苦了!!
适配器版本 version = "0.0.22"
mirai-api-http v2.9.1
Mirai consosle 2.14.0
iTXTech MCL Version: 2.1.2-61c8bd8
2023-05-09 22:27:39 V/Bot.1943125575: Well404(1070330078) -> /start
2023-05-09 22:27:39 V/Bot.1943125575: Friend(1070330078) <- @1070330078
2023-05-09 22:28:54 V/Bot.1943125575: [test(705321823)] Well404(1070330078) -> /start
2023-05-09 22:28:54 V/Bot.1943125575: Group(705321823) <- [mirai:at:1070330078]
2023-05-09 22:28:54 V/Bot.1943125575: Well404(1070330078) -> at个人 -- 22:28:54\ntest(705321823)\n403 Forbidden(1943125575)
2023-05-09 22:28:54 V/Bot.1943125575: Well404(1070330078) ->
05-09 22:27:39 [SUCCESS] nonebot | mirai2 1943125575 | [FriendMessage]: {'self_id': 1943125575, 'type': 'FriendMessage', 'message_chain': [{'type': 'Plain', 'data': {'text': '/start'}}], 'source': {'id': 48923, 'time': '2023-05-09T14:27:38+00:00'}, 'sender': {'id': 1070330078, 'nickname': 'Well404', 'remark': 'Well404'}, 'quote': None}
05-09 22:27:39 [DEBUG] nonebot | Checking for matchers in priority 1...
05-09 22:27:39 [INFO] nonebot | Event will be handled by Matcher(type='message', module=func_tests)
05-09 22:27:39 [DEBUG] nonebot | Running Matcher(type='message', module=func_tests)
05-09 22:27:39 [DEBUG] nonebot | Running handler Dependent(call=_)
05-09 22:27:39 [INFO] nonebot | Matcher(type='message', module=func_tests) running complete
05-09 22:27:39 [DEBUG] nonebot | Checking for matchers completed
05-09 22:28:54 [SUCCESS] nonebot | mirai2 1943125575 | [GroupMessage]: {'self_id': 1943125575, 'type': 'GroupMessage', 'message_chain': [{'type': 'Plain', 'data': {'text': '/start'}}], 'source': {'id': 18989, 'time': '2023-05-09T14:28:54+00:00'}, 'sender': {'id': 1070330078, 'name': 'Well404', 'special_title': '', 'permission': 'OWNER', 'join_timestamp': 1664369051, 'last_speak_timestamp': 1683642534, 'mute_time_remaining': 0, 'group': {'id': 705321823, 'name': 'test', 'permission': 'MEMBER'}}, 'quote': None, 'to_me': False}
05-09 22:28:54 [DEBUG] nonebot | Checking for matchers in priority 1...
05-09 22:28:54 [INFO] nonebot | Event will be handled by Matcher(type='message', module=func_tests)
05-09 22:28:54 [DEBUG] nonebot | Running Matcher(type='message', module=func_tests)
05-09 22:28:54 [DEBUG] nonebot | Running handler Dependent(call=_)
05-09 22:28:54 [INFO] nonebot | Matcher(type='message', module=func_tests) running complete
05-09 22:28:54 [DEBUG] nonebot | Checking for matchers completed
05-09 22:28:54 [SUCCESS] nonebot | mirai2 1943125575 | [FriendMessage]: {'self_id': 1943125575, 'type': 'FriendMessage', 'message_chain': [], 'source': {'id': 62270, 'time': '2023-05-09T14:28:54+00:00'}, 'sender': {'id': 1070330078, 'nickname': 'Well404', 'remark': 'Well404'}, 'quote': None}
05-09 22:28:54 [WARNING] nonebot | Error while parsing command for event
Traceback (most recent call last):
File "c:\github\nonebot-plugin-segbuilder\bot.py", line 18, in <module>
nonebot.run()
File "c:\github\nonebot-plugin-segbuilder\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
uvicorn.run(
File "c:\github\nonebot-plugin-segbuilder\.venv\lib\site-packages\uvicorn\main.py", line 578, in run
server.run()
File "c:\github\nonebot-plugin-segbuilder\.venv\lib\site-packages\uvicorn\server.py", line
61, in run
return asyncio.run(self.serve(sockets=sockets))
File "c:\users\well404\appdata\local\programs\python\python38\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "c:\users\well404\appdata\local\programs\python\python38\lib\asyncio\base_events.py",
line 603, in run_until_complete
self.run_forever()
File "c:\users\well404\appdata\local\programs\python\python38\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()
File "c:\users\well404\appdata\local\programs\python\python38\lib\asyncio\base_events.py",
line 570, in run_forever
self._run_once()
File "c:\users\well404\appdata\local\programs\python\python38\lib\asyncio\base_events.py",
line 1859, in _run_once
handle._run()
File "c:\users\well404\appdata\local\programs\python\python38\lib\asyncio\events.py", line
81, in _run
self._context.run(self._callback, *self._args)
File "c:\github\nonebot-plugin-segbuilder\.venv\lib\site-packages\nonebot\adapters\mirai2\utils.py", line 80, in process_event
await handle_event(bot, event)
> File "c:\github\nonebot-plugin-segbuilder\.venv\lib\site-packages\nonebot\message.py", line 280, in handle_event
TrieRule.get_value(bot, event, state)
File "c:\github\nonebot-plugin-segbuilder\.venv\lib\site-packages\nonebot\rule.py", line 107, in get_value
message_seg: MessageSegment = message[0]
File "c:\github\nonebot-plugin-segbuilder\.venv\lib\site-packages\nonebot\internal\adapter\message.py", line 254, in __getitem__
return super().__getitem__(arg1)
IndexError: list index out of range
初步断定可能是 mirai 方面的问题,先发个issue留个记录
没错,又双叒叕是我
这个问题一开始没有发现,因为发送/接收各种消息类型已经没有问题了
直到有一次,在开发环境中使用ctrl+c发现终止不了nb进程了(
发现日志一直显示Waiting for application startup,但可以正常发送/接收消息
v 0.0.9
下面是之前正常的情况(v 0.0.6)
目前发现这会导致@driver.on_startup无法启动(可能导致一些插件运行异常)
driver=get_driver()
@driver.on_startup
async def _():
logger.warning("succ")
见上图,无法输出succ,一直卡在startup
mah 2.4.0 nonebot2 2.0.0b2 python 3.10.0
已按照wiki正确配置
不是很急( 辛苦了
您好,请问bot在处理加群请求的时候报这个错是为什么呀
return await bot.api.post('/resp/memberJoinRequestEvent',
AttributeError: 'functools.partial' object has no attribute 'post'
通过和拒绝都一样,看起来是我没有post方法
调用的代码是
await event.approve(bot)
有判断event是MemberJoinRequestEvent类
在使用quote类型的MessageSegment时,无法通过 mather.send(quote + "some text")
的方式正常发出,其中 quote 的构建方式如下所示,其中的内容与下方示例字典一致,可以确认的是 quote 的构建是没有问题的
在发送后,其中 quote 部分会被直接丢弃,发送的消息仅会保留 some text
部分。
我注意到,在bot的send方法中包含了quote字段,但根据 mah的文档,此 quote 仅需要被回复消息的 message_id,也不是 MessageSegment 中的 quote
https://github.com/ieew/nonebot_adapter_mirai2/blob/main/nonebot/adapters/mirai2/bot.py#L39
RT.
member_info = await bot.member_pro_file(target=event.sender.group.id,member_id=event.sender.id)
friend_info = await bot.friend_pro_file(target=event.sender.id)
nonebot.exception.ActionFailed: mirai V2 | {'code': 6, 'msg': '指定操作不支持'}
mirai-api-http:2.4.0
nonebot_adapter_mirai2:0.0.11
也有可能是我使用方法有误或者上游出现问题×
新增事件 GroupSyncMessage
FriendSyncMessage
TempSyncMessage
StrangerSyncMessage
在写一个插件,需要在满足特定条件时(不是群消息触发)向指定群直接发送特定信息,请问有什么方法可以实现吗,谢谢!
给出变量:MESSAGE: str (消息) GROUP: int (群号)
mirai-api-http 已支持独立鉴权的反向 ws ,因此可以考虑对反向 ws 提供支持了。
nonebot_adapter_mirai2 0.0.10
及nonebot_adapter_mirai2 0.0.11
无法与mirai-api-http-v2.5.0
建立连接
0.0.10
连接mirai-api-http-v2.5.0
提示Connection Error
0.0.11
连接mirai-api-http-v2.5.0
提示Connection Timeout
这两个版本连接mirai-api-http-v2.4.0
均正常
报错内容为:server rejected WebSocket connection: HTTP 404
nb版本为:2.0.0-beta.2
完整的运行日志如下:
root@localhost:~/bot# nb run
03-04 02:43:27 [SUCCESS] nonebot | NoneBot is initializing...
03-04 02:43:27 [INFO] nonebot | Current Env: prod
03-04 02:43:27 [SUCCESS] nonebot | Succeeded to import "nonebot.plugins.single_session"
03-04 02:43:29 [SUCCESS] nonebot | Succeeded to import "nonebot.plugins.echo"
03-04 02:43:29 [SUCCESS] nonebot | Running NoneBot...
03-04 02:43:29 [INFO] uvicorn | Started server process [5511]
03-04 02:43:29 [INFO] uvicorn | Waiting for application startup.
03-04 02:43:29 [INFO] uvicorn | Application startup complete.
03-04 02:43:29 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
03-04 02:43:39 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:43:52 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:44:06 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:44:19 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:44:32 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:44:45 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:44:58 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:45:11 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:45:24 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:45:37 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:45:50 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
03-04 02:46:03 [WARNING] nonebot | Mirai V2 | server rejected WebSocket connection: HTTP 404
^C03-04 02:46:06 [INFO] uvicorn | Shutting down
03-04 02:46:06 [INFO] uvicorn | Waiting for application shutdown.
03-04 02:46:06 [INFO] uvicorn | Application shutdown complete.
03-04 02:46:06 [INFO] uvicorn | Finished server process [5511]
配置文件如下:
adapters:
- http
- ws
debug: false
enableVerify: true
verifyKey: AmiyaBot
singleMode: false
cacheSize: 4096
adapterSettings:
http:
host: 127.0.0.1
port: 8096
cors: [*]
ws:
host: 127.0.0.1
port: 8060
reservedSyncId: -1
driver=nonebot.drivers.fastapi+nonebot.drivers.httpx+nonebot.drivers.websockets
VERIFY_KEY=AmiyaBot
MIRAI_HOST=127.0.0.1
MIRAI_PORT=8096
MIRAI_QQ=[3181952556]
nb控制台日志:
Task exception was never retrieved
future: <Task finished name='Task-86' coro=<process_event() done, defined at /usr/local/lib/python3.8/dist-packages/nonebot/adapters/mirai2/utils.py:96> exception=AttributeError("'NoneType' object has no attribute 'type'")>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nonebot/adapters/mirai2/utils.py", line 103, in process_event
event = process_at(bot, event)
File "/usr/local/lib/python3.8/dist-packages/nonebot/adapters/mirai2/utils.py", line 60, in process_at
at = event.message_chain.extract_first(MessageType.AT)
File "/usr/local/lib/python3.8/dist-packages/nonebot/adapters/mirai2/message.py", line 408, in extract_first
if (not type) or (first.type in type):
AttributeError: 'NoneType' object has no attribute 'type'
nb版本:2.0.0-beta.2
mirai-http-api版本:2.4.0
nonebot-adapter-mirai2==0.0.19
nonebot2==2.0.0rc2
nonebot-adapter-mirai2 的实现:
nonebot_adapter_mirai2/nonebot/adapters/mirai2/message.py
Lines 332 to 348 in b756273
mirai-api-http 文档中的描述:
mirai-api-http | ForwardMessage 消息类型
mah 中的 nodeList
为 object
类型,而项目中对 node_list
的类型标注为 str
。
这个地方ApiNotAvailable
有一个参数
MiraiAdapterException
的__init__
不接受参数nonebot_adapter_mirai2/nonebot/adapters/mirai2/exception.py
Lines 8 to 11 in b756273
File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/mirai2/utils.py", line 101, in fetch_response
raise ApiNotAvailable('timeout') from None
TypeError: __init__() takes 1 positional argument but 2 were given
描述问题:
mirai2适配器下发送本地语音有问题
如何复现?
from nonebot.adapters.mirai2.message import MessageSegment
await command.finish(MessageSegment.voice(path="/../../xxx.mp3"))
不知道是什么问题,试了下上传本地图片是没问题的
环境信息:
@bot /帮助
,带有on_command("帮助", rule=to_me())
的响应器会被执行on_command("帮助", rule=to_me())
不会执行,on_command("帮助")
也不会执行。但是收到/帮助 @bot
时会执行以前没有这个问题,原因应该是#37 (comment) ,需要把at弹出消息链,on_command
才能正常工作。(或者难道是on_command
本来就不应该响应这种消息,以前是不正常的,现在才是正确的?)
在2.0.0-beta.2版本下按照wiki中的.env文件格式编辑运行之后会报下面的错
(上略) pydantic.error_wrappers.ValidationError: 1 validation error for Config mirai_qq field required (type=value_error.missing)
经过排查后是Config类中的mirai_qq配置项没有传入,如果说SUPERUSER是NoneBot的超级用户,那么.env
中应该含有与其值相同的MIRAI_QQ配置项,实测加入后也解决了报错的问题,请问这是wiki中的疏漏吗?
在做机器人的时候偶然发现这个适配器不能正确处理开头不是@的消息。
例如,当用户发送Hello @Bot
的时候,接收到的event
中的to_me
属性为False
,而不是True
适配器版本0.0.17
09-01 19:46:35 [SUCCESS] nonebot | MIRAI V2 **** | [FriendInputStatusChangedEvent]: {'self_id': ****, 'type': 'FriendInputStatusChangedEvent', 'inputting': False, 'friend': {'id': ****, 'nickname': 'むきゆー', 'remark': 'むきゆー'}}
09-01 19:46:35 [WARNING] nonebot | Error while parsing command for event
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Program\Files\python\38\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "D:\Program\Files\python\38\lib\multiprocessing\spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "D:\Program\Files\python\38\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "D:\Program\Files\python\38\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\uvicorn\_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "D:\Program\Files\python\38\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "D:\Program\Files\python\38\lib\asyncio\base_events.py", line 603, in run_until_complete
self.run_forever()
File "D:\Program\Files\python\38\lib\asyncio\base_events.py", line 570, in run_forever
self._run_once()
File "D:\Program\Files\python\38\lib\asyncio\base_events.py", line 1859, in _run_once
handle._run()
File "D:\Program\Files\python\38\lib\asyncio\events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\nonebot\adapters\mirai2\utils.py", line 71, in process_event
await handle_event(bot, event)
> File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\nonebot\message.py", line 293, in handle_event
TrieRule.get_value(bot, event, state)
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\nonebot\rule.py", line 79, in get_value
if event.get_type() != "message":
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\nonebot\adapters\mirai2\event\base.py", line 104, in get_type
raise ValueError("Event has no message!")
ValueError: Event has no message!
09-01 19:46:35 [DEBUG] nonebot | Checking for matchers in priority 1...
09-01 19:46:35 [ERROR] nonebot | Rule check failed for <Matcher from plugins.群好友刷新, type=message, priority=1, temp=False>.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Program\Files\python\38\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "D:\Program\Files\python\38\lib\multiprocessing\spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "D:\Program\Files\python\38\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "D:\Program\Files\python\38\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\uvicorn\_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "D:\Program\Files\python\38\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "D:\Program\Files\python\38\lib\asyncio\base_events.py", line 603, in run_until_complete
self.run_forever()
File "D:\Program\Files\python\38\lib\asyncio\base_events.py", line 570, in run_forever
self._run_once()
File "D:\Program\Files\python\38\lib\asyncio\base_events.py", line 1859, in _run_once
handle._run()
File "D:\Program\Files\python\38\lib\asyncio\events.py", line 81, in _run
self._context.run(self._callback, *self._args)
> File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\nonebot\message.py", line 130, in _check_matcher
if not await Matcher.check_perm(
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\nonebot\internal\matcher.py", line 272, in check_perm
event_type = event.get_type()
File "D:\_个人\python项目\机器人插件环境\venv\Lib\site-packages\nonebot\adapters\mirai2\event\base.py", line 104, in get_type
raise ValueError("Event has no message!")
ValueError: Event has no message!
如题
forward_message
应该改成 forward
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.