LangBot icon indicating copy to clipboard operation
LangBot copied to clipboard

[Bug]: 调用引用组件时失败

Open Garrise opened this issue 2 months ago • 0 comments

消息平台适配器

aiocqhttp(使用 OneBot 协议接入的)

运行环境

Windows11 Python 3.10.14

LangBot 版本

v3.4.0.2

异常情况

下述代码在运行时不产生任何结果,也没有报错:

    @handler(PersonMessageReceived)
    @handler(GroupMessageReceived)
    async def message_received(self, ctx: EventContext):
        msg = ctx.event.message_chain.get_first(Plain).text
        content = "抽一张哈罗牌,请输入'哈罗牌 抽卡'\n通过名字查找一张哈罗牌,请输入'哈罗牌 查看 [牌名]'\n进行一次完整的挂毯式哈罗占卜,请输入'哈罗牌 占卜 [牌组名/属性名]'"
        ctx.add_return("reply", [Quote(id=ctx.event.message_chain.message_id, group_id=ctx.event.launcher_id, sender_id=ctx.event.sender_id, target_id=ctx.event.launcher_id, origin=ctx.event.message_chain), content])
        ctx.prevent_default()

启用的插件

No response

Garrise avatar Dec 01 '24 22:12 Garrise