最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Discord.js reply to interaction with "only you can see this" message - Stack Overflow

programmeradmin3浏览0评论

In discord.js I'm trying to reply to an interaction using interaction.reply({content: "test"}), but I couldn't figure out how to send an "only you can see this" message.

Example:

I am using discord.js v13

In discord.js I'm trying to reply to an interaction using interaction.reply({content: "test"}), but I couldn't figure out how to send an "only you can see this" message.

Example:

I am using discord.js v13

Share Improve this question edited Oct 27, 2022 at 21:50 Zsolt Meszaros 23.2k19 gold badges57 silver badges69 bronze badges asked Dec 21, 2021 at 10:38 StephenZStephenZ 731 gold badge1 silver badge3 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 14

These are called ephemeral responses, and you can send them by using ephemeral: true in the reply's InteractionReplyOptions, like this:

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

This way the message is hidden from everyone but the executor of the slash mand.

发布评论

评论列表(0)

  1. 暂无评论