Message editing fails even though message can be fetched
Whenever I want to edit an ephemeral message I get the following error:
[ERROR] Encountered error while handling an interaction handler run method for interaction-handler "release_card" at path "/home/developer/Wishbot/src/interaction-handlers/release_card.js" DiscordAPIError[10008]: Unknown Message
[ERROR] Encountered error while handling an interaction handler run method for interaction-handler "release_card" at path "/home/developer/Wishbot/src/interaction-handlers/release_card.js" DiscordAPIError[10008]: Unknown Message
The message can be correctly fetched though using the channel and message id
let msg = await channel.messages.fetch(interaction.message.id);console.log(msg); //<= Shows the correct message objectreturn await msg.edit({embeds: [msg.embeds],components:[]}); //<= breaks because this message is Unknown
let msg = await channel.messages.fetch(interaction.message.id);console.log(msg); //<= Shows the correct message objectreturn await msg.edit({embeds: [msg.embeds],components:[]}); //<= breaks because this message is Unknown
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
S-IaF
Sapphire - Imagine a Framework
Sapphire is a next-gen object-oriented Discord.js bot framework.