Can I edit an embed in a different channel when clicking a button?

Title^
4 Replies
d.js toolkit
d.js toolkit16mo ago
- 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!
ByteSwiper
ByteSwiper16mo ago
Yes, first you will need the message ID for the message with the embed. I don’t have my computer on me atm but just get the channel from the channels cache on the bot (client.channels.cache.get) once you get the channel, just do channel.messages.fetch(MESSAGEIDGERE). Make sure to use await or promiseify it. then once you get the message simply just do the edit function just like you would edit any other message. If you have any questions do let me know, I’ll be here. Unfortunately my laptop is broken so I can only help to an extent.
edocsil
edocsil16mo ago
You do still also need to respond to the button interaction or it will show an error to the user
ByteSwiper
ByteSwiper16mo ago
ah yes, defer will do
Want results from more Discord servers?
Add your server