【问题标题】:Can't send hidden embed message无法发送隐藏的嵌入消息
【发布时间】:2021-09-29 18:52:04
【问题描述】:

我想发送一条“隐藏”消息,只有消息作者才能看到:

#ping
@slash.slash(name='ping', description="Check Bot's response time", guild_ids=guild_ids)
@commands.has_role(804318858873536522)
async def ping(ctx):
    embed=discord.Embed(title=":ping_pong:Pong!:ping_pong:", colour=discord.Colour.blue(), description=f':ballot_box_with_check:Response time is **{client.latency}**ms')
    await ctx.send(embed=embed, hidden=True)

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

Embed/File is not supported for `hidden`!
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction

*隐藏消息是只有作者才能看到的消息。示例:

【问题讨论】:

  • 有一个名为ephemera 的关键字参数,它采用bool 指示消息是否应该只对用户可见。不确定它是否在您的第三方包中可用

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


【解决方案1】:

看看你收到的这个错误信息:

Embed/File is not supported for `hidden`!

我认为这回答了你的问题,但我不完全确定。

【讨论】:

    【解决方案2】:

    我已经解决了我的问题。这实际上是非常愚蠢的。我需要停止主机上的机器人实例。只有 1 个实例处于活动状态后,斜线命令才会起作用

    【讨论】:

      猜你喜欢
      • 2021-09-15
      • 1970-01-01
      • 1970-01-01
      • 2021-12-01
      • 2020-10-09
      • 2021-12-28
      • 2021-04-26
      • 2021-12-15
      • 2021-08-22
      相关资源
      最近更新 更多