Editing a pinned message?
Hello! I have a reply to an interaction that I'd like to edit at a later time.
The ID of the reply is stored in my database, and then the message is pinned to save it:
At a later time in my code when a button is pressed, I want this message to update. So I fetch the pinned messages:
But at this point, I'm stuck. Is there a way to access the message by ID here so that I can edit it?
The following doesn't seem to work:
4 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!
- ✅
Marked as resolved by staffstore an object with channelId and messageId properties so then you can just directly edit the message through client.channels.cache.get(channelid).messages.edit(messageid, newOptions)
you dont need to fetch any messages that way
Thank you! do you know if .edit() will work with embeds as well?
like:
oh, I got it! thank you for the help !