更新到2.0.0-beta.1后 on_command 事件响应器失效 #87
Answered
by
yanyongyu
ninthseason
asked this question in
问答
-
|
如题,例如一个简单的测试程序: from nonebot.plugin.on import on_command
from nonebot import logger
test_command = on_command("test")
@test_command.handle()
async def foo():
logger.debug("响应成功")日志中显然没有成功响应: 01-15 23:58:38 [SUCCESS] nonebot | ONEBOT V11 <QQ号> | [message.group.normal]: Message -1463632254 from <QQ号>@[群:<群号>] "test"
01-15 23:58:38 [DEBUG] nonebot | Checking for matchers in priority 1...我去尝试了文档中的天气预报的样例,同样没有响应。 尝试了讨论 将 nonebot2 升级到 2.0.0-beta.1 的准备工作 中的代码: from nonebot.adapters.onebot.v11 import MessageEvent
from nonebot.plugin import on_command
worker = on_command('测试')
@worker.handle()
async def _(event: MessageEvent) -> None:
print(event.get_plaintext())同样没有响应。 顺带一提, |
Beta Was this translation helpful? Give feedback.
Answered by
yanyongyu
Jan 15, 2022
Replies: 1 comment 1 reply
-
|
请确认一下 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ninthseason
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请确认一下
command_start是否正确配置