-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法正确识别“回复”类型消息中的指令 #299
Comments
reply 目前不支援。主要是不知道 reply 該不該適用於 only_to_me
…On Thu., Jun. 30, 2022, 09:48 Carbene, ***@***.***> wrote:
*问题描述*
当消息类型为“回复消息”时,即消息本身为一条回复其他消息的消息时,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: *, Message -from
961531608@[群:758194774]: '[CQ:reply,id=-][CQ:at,qq=*] 整个活 [CQ:at,qq=
*] ' [2022-06-30 21:33:37,089 nonebot] DEBUG: Parsing command:
'[CQ:reply,id=-*][CQ:at,qq=
*] 整个活 ' [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=-*][CQ:at,qq=
*]',) [2022-06-30 21:33:37,089 nonebot] DEBUG: Command ('[CQ:reply,id=-*
][CQ:at,qq=
*]',) not found. Try to match aliases [2022-06-30 21:33:37,089 nonebot]
DEBUG: Alias ('[CQ:reply,id=-1499673145][CQ:at,qq=*]',) 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
—
Reply to this email directly, view it on GitHub
<#299>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKGVB2MFZOFST4J4XGICFTVRWQTRANCNFSM52JNWP6A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
考虑试试only_to_me=False? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
当消息类型为“回复消息”时,即消息本身为一条回复其他消息的消息时,
on_command
装饰器无法将其解析为一条指令复现方法
回复消息的同时,at bot账号并且输入指令
期望的行为
当bot被at时,应该识别“回复消息”类型的指令
日志信息
相关代码
运行环境
The text was updated successfully, but these errors were encountered: