【问题标题】:Slash commands and embed issues斜线命令和嵌入问题
【发布时间】:2021-06-24 15:32:19
【问题描述】:

我想使用新的斜杠命令功能制作“帮助”命令。另外我想隐藏嵌入消息,所以只有消息作者才能看到它:

@slash.slash(name='help', description='Help command', guild_ids=guild_ids)
@commands.has_role(804318858873536522)
async def help(ctx):
    embed=discord.Embed(title='Help', description='Heres the help', colour=discord.Colour.blue())
    await ctx.send(embed=embed, hidden=True)

当我执行这个命令时,我得到这个错误:

discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message

如果我删除“隐藏”参数,它工作正常。但正如我所说,我希望只有作者才能看到这条消息。那么有没有办法发送这样的嵌入?

【问题讨论】:

    标签: python python-3.x discord discord.py


    【解决方案1】:

    这似乎是一个错误。发送嵌入本身就可以工作,hidden=Truecontent='...' 一起工作。如果可能的话,将您的嵌入更改为内容。

    顺便说一句,很抱歉将此作为答案,我没有足够的声誉来发表评论。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-22
      • 1970-01-01
      • 2022-01-25
      • 1970-01-01
      • 2021-06-11
      • 1970-01-01
      • 2014-11-17
      • 2021-08-28
      相关资源
      最近更新 更多