message.edit erroring with "Unknown Interaction", but message is found.

The first attachment is what shows if I print the message with
await foundChannel.messages.fetch(body.messageId);
await foundChannel.messages.fetch(body.messageId);
I think the error happens when I try to edit the message (shown in the second attachment) The message I am trying to get comes from an interaction, it's an interaction reply that is ephemeral
No description
No description
2 Replies
d.js toolkit
d.js toolkit8mo 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! - Marked as resolved by OP
Swyftey
SwyfteyOP8mo ago
error:
DiscordAPIError[10008]: Unknown Message
at handleErrors (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:1120:23)
at async SequentialHandler.queueRequest (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:953:14)
at async _REST.request (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:1266:22)
at async GuildMessageManager.edit (C:\Users\maxga\Desktop\Roblox Bot\node_modules\discord.js\src\managers\MessageManager.js:187:15)
at async C:\Users\maxga\Desktop\Roblox Bot\modules\app.js:39:17 {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
color: 5763719,
title: 'ADev_Swyftey was kicked!',
description: ' ',
fields: [ [Object], [Object] ],
footer: {
text: ' | Moderation',
icon_url: 'https://cdn.discordapp.com/embed/avatars/3.png'
}
}
],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 64,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Unknown Message', code: 10008 },
code: 10008,
status: 404,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/1234583153645977620/messages/1234976022383038546'
}
DiscordAPIError[10008]: Unknown Message
at handleErrors (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:1120:23)
at async SequentialHandler.queueRequest (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:953:14)
at async _REST.request (C:\Users\maxga\Desktop\Roblox Bot\node_modules\@discordjs\rest\dist\index.js:1266:22)
at async GuildMessageManager.edit (C:\Users\maxga\Desktop\Roblox Bot\node_modules\discord.js\src\managers\MessageManager.js:187:15)
at async C:\Users\maxga\Desktop\Roblox Bot\modules\app.js:39:17 {
requestBody: {
files: [],
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
color: 5763719,
title: 'ADev_Swyftey was kicked!',
description: ' ',
fields: [ [Object], [Object] ],
footer: {
text: ' | Moderation',
icon_url: 'https://cdn.discordapp.com/embed/avatars/3.png'
}
}
],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 64,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Unknown Message', code: 10008 },
code: 10008,
status: 404,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/1234583153645977620/messages/1234976022383038546'
}
ugh.. the message can't be ephemeral, that was it
Want results from more Discord servers?
Add your server