Home > Enterprise >  Discord.js reply to interaction with "only you can see this" message
Discord.js reply to interaction with "only you can see this" message

Time:12-22

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:

enter image description here

I am using discord.js v13

CodePudding user response:

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 command.

  • Related