Detect if an Ephemeral message is still onscreen?
I am sending an Ephemeral message containing an embed to the user with interaction.reply.
I store that reply message in a variable to be able to edit it.
From there on, I edit the Embed on a timer.
If the user dismisses the message I'd like to be able to stop that processing. Is this possible?
When I check to see if the message exists by ID, or to fetch it, it always seems to come back OK, I can't see any property on the the message which indicates it's been dismissed.
9 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I don't want to delete it or prevent it from being dismissed, just don't want to continue pushing updates to it if it's no longer relevant. This doesn't seem to result in any discord errors, strangely!
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
it gonna edit the ephemeral msg and not throw an error
same if the user dismissed it
u can try using a collector
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
yep but when the user dismiss the message the interaction isnt expired
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
No error is thrown, it happily edits the message