Skip to content
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

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

Open
Garrise opened this issue Dec 1, 2024 · 0 comments
Open

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

Garrise opened this issue Dec 1, 2024 · 0 comments
Labels
bug? Bug或Bug修复相关

Comments

@Garrise
Copy link

Garrise commented Dec 1, 2024

消息平台适配器

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 Garrise added the bug? Bug或Bug修复相关 label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关
Projects
None yet
Development

No branches or pull requests

1 participant