#Ephemeral is not working

32 messages · Page 1 of 1 (latest)

somber tangleBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

sick lintel
crystal wharf
#

The defer needs to have the ephemeral: true

somber tangleBOT
#

guide Interactions: Replying to slash commands - Ephemeral responses
read more

sick lintel
sick lintel
crystal wharf
#

I mean, together

sick lintel
#

"together"?

crystal wharf
#

Note that if you want your response to be ephemeral, you must pass an ephemeral flag to the InteractionDeferOptions here:

await interaction.deferReply({ ephemeral: true });

It is not possible to edit a reply to be ephemeral later.

crystal wharf
#

Have you saved the file and restarted the bot?

sick lintel
#

yes

crystal wharf
#

Can you send you code again please?

sick lintel
#

yes

crystal wharf
#

Hmm

#

This should work ngl

#

Let me test here

sick lintel
crystal wharf
#

Remove the fetchReply and assign a const to Date.now() before the defer

#

Try this

sick lintel
#

can you send me this-
im beginner

#

just the line

#

Im sorry-

crystal wharf
#

More like:

// defer logic
const newMessage = `...${Date.now() - interaction.createdTimestamp}...`
// Reply logic
sick lintel
#

i just removed fetch reply and its working

#

but now the ping ist NaN

#

But why should it change because I removed fetchreply

crystal wharf
#

Bc message.createdTimestamp wont be a number anymore

#

Use the snippet I sent you

sick lintel
#

I am thankful you helped me- this is actually amazing someone helped me that quick

#

Thank you