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