-
-
Notifications
You must be signed in to change notification settings - Fork 336
Description
问题描述
当消息类型为“回复消息”时,即消息本身为一条回复其他消息的消息时,on_command装饰器无法将其解析为一条指令
复现方法
回复消息的同时,at bot账号并且输入指令
期望的行为
当bot被at时,应该识别“回复消息”类型的指令
日志信息
[2022-06-30 21:33:37,087] INFO in init: received event: message.group.normal
[2022-06-30 21:33:37,089 nonebot] INFO: Self: xxxxx, Message -xxxxxfrom 961531608@[群:758194774]: '[CQ:reply,id=-xxxxx][CQ:at,qq=xxxxx] 整个活 [CQ:at,qq=xxxxx] '
[2022-06-30 21:33:37,089 nonebot] DEBUG: Parsing command: '[CQ:reply,id=-xxxxx][CQ:at,qq=xxxxx] 整个活 '
[2022-06-30 21:33:37,089 nonebot] DEBUG: Matched command start: (empty)
[2022-06-30 21:33:37,089 nonebot] DEBUG: Split command name: ('[CQ:reply,id=-xxxxx][CQ:at,qq=xxxxx]',)
[2022-06-30 21:33:37,089 nonebot] DEBUG: Command ('[CQ:reply,id=-xxxxx][CQ:at,qq=xxxxx]',) not found. Try to match aliases
[2022-06-30 21:33:37,089 nonebot] DEBUG: Alias ('[CQ:reply,id=-1499673145][CQ:at,qq=xxxxx]',) not found. Try to match patterns
[2022-06-30 21:33:37,089 nonebot] DEBUG: Not a known command, ignored
相关代码
@on_command('makeitaquote', aliases=('整个活', '整活'), only_to_me=True)
async def makeitaquote(session: CommandSession):
await session.send('整个活')运行环境
- 操作系统:Windows 10 21H2
- OneBot(CQHTTP)实现及版本:v1.0.0-rc3
- NoneBot 版本:1.9.1
- aiocqhttp 版本:
- Python 版本:3.10.5