GraiaProject / Ariadne

一个优雅且完备的 Python QQ 自动化框架,基于 Mirai API HTTP v2。 Powered by Graia Project.
https://graia.cn/ariadne
GNU Affero General Public License v3.0
753 stars 45 forks source link

[Bug]发送群消息时若包含At元素则会出现异常 #7

Closed eeehhheee closed 3 years ago

eeehhheee commented 3 years ago

问题 发送群消息时若包含At元素则会出现异常,经调试应该是生成data时某些Graia的元素没有删除导致对MAH API的调用失败

如何复现

 @bcc.receiver(GroupMessage)
    async def reply(app: Ariadne, chain: MessageChain, group: Group, member: Member):
        if chain.asDisplay() == "Hi!":
            await app.sendGroupMessage(group, MessageChain.create([At(member.id), Plain("Hello World!")]))

预期行为 发送的消息包含At元素

使用环境:

日志/截图 image image

BlueGlassBlock commented 3 years ago

应该是 model.dict() 的锅......

正在修复.