【问题标题】:Discord.js reply to interaction with "only you can see this" messageDiscord.js 以“只有你能看到这个”消息回复交互
【发布时间】:2022-01-22 19:05:28
【问题描述】:

在 discord.js 中,我尝试使用 interaction.reply({content: "test"}) 回复交互,但我不知道如何发送“只有您可以看到”消息。

例子:

我正在使用 discord.js v13

【问题讨论】:

    标签: javascript node.js discord.js


    【解决方案1】:

    这些被称为临时响应,您可以使用replyInteractionReplyOptions 中的ephemeral: true 发送它们,如下所示:

    interaction.reply({ content: 'Only you! :)', ephemeral: true });
    

    这样,除了斜杠命令的执行者之外,其他人都隐藏了消息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-02
      • 2022-01-21
      • 2018-12-26
      • 2022-06-30
      • 2021-02-10
      • 2022-01-24
      • 1970-01-01
      相关资源
      最近更新 更多