Set slash command only visible by user

Im new to this and idk how to set a slash command to be only visible by the one doing it
5 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
BakeWithMe
BakeWithMeOP3y ago
else { const expirationTime = timestamps.get(interaction.user.id) + cooldownAmount; const timeLeft = (expirationTime - now) / 1000; if (now < expirationTime && timeLeft > 0.9) { return interaction.reply({ content: ⏰ Wait **\${timeLeft.toFixed(1)}` seconds to use the ${command.name}** command again!`, ephemeral: true }); } timestamps.set(interaction.user.id, now); setTimeout(() => timestamps.delete(interaction.user.id), cooldownAmount); i want a wait message to be only visible by the user doing the command again though of adding ephemeral: true }); but didnt work
Cae
Cae3y ago
Ephemeral does that
BakeWithMe
BakeWithMeOP3y ago
i get a error doing that Error [InteractionNotReplied]: The reply to this interaction has not been sent or deferred.
Cae
Cae3y ago
Try interaction.deferReply
Want results from more Discord servers?
Add your server