Fetch ephemeral message
Is it possible to store the id of a message and then fetch it later on in order to delete it?
I was able to delete the message if i store the promise<message> but otherwise I couldn’t find a way to delete an ephemeral message
16 Replies
• 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.Do I need to save the “message” object in order to do it?
Because I try to avoid storing it
I understand, thank you very much, if you have any example to supply me it would be wonderful , I didn’t mess with thewe hook just yet

is it possible to send ephemeral in webhook?
here im trying to delete the message that i have saved

error:

how can I do that?
I know at the first time the message would be null, I want to delete it at the second time so i can switch between the messages
that is what I am trying to implement
webhookClient.send( { content:'example',flags: MessageFlags.FLAGS.EPHEMERAL})
like this?
But the problem also he cant know who to send it to
I tried so many different ways, cant get it done unfortunately,
This is what i got now:

error:

Thank you very much!, its working!! , can you explain me a little bit about it? more info about '@original'
and info about the advantages of creating a webhook for each channel instead of simply replaying to interactions
In addition, what is more efficient, saving the token of a message and deleting it using a webhook compared to saving the Message.id and then deleting it afterwards
Because if Im saving an id of a message I need to iterate and fetch a message that sent in the channel
for example:

Thank you very much! it clarify everything!
again, I am having trouble deleting the last message, what is the problem over here?



if you can have a look it will be wonderful
I am so sorry, my bad, I successfully stored the id of the message, in fact I am replaying for MenuUserSelection, what I am attempting to do is to edit the embed message in order to show the members that the user have been chosen , when I try to edit the message when interaction is created the error is that it can’t find a message
The same message that contains the components and the embeds
Ohhh, thank you!
Thank you so much