GraiaProject / Application

一个设计精巧, 协议实现完备的, 基于 mirai-api-http 的即时聊天软件自动化框架.
https://graia-document.vercel.app/
GNU Affero General Public License v3.0
438 stars 63 forks source link

Kanata匹配问题 #52

Closed I-love-study closed 4 years ago

I-love-study commented 4 years ago

描述你遇到的问题:

使用Kanata的时候,当同时有FullMatch和RequireParam时,假如发送信息只能够匹配FullMatch,就会触发错误

复现步骤: 该 BUG 会在进行以下操作后出现: 1.在bcc的dispatchers里填写 Kanata([FullMatch('anime'), RequireParam(name = 'tag')]) 2.发送‘amine’

发生错误的代码

@bcc.receiver(GroupMessage, headless_decoraters = [Depend(judge.active_check_message)], dispatchers = [Kanata([FullMatch('anime'), RequireParam(name = 'tag')])])
async def anime(app: GraiaMiraiApplication, group: Group, message: MessageChain, member: Member, tag: MessageChain):
    ...

控制台日志输出截图:

image

运行环境:

额外信息:

GreyElaina commented 4 years ago

老bug了.