Discord error 10008: Unknown message
Last verified against Discord Developer Docs - Opcodes and status codes
Unknown messageWhat error 10008 means
The message you tried to fetch, edit, delete, pin, react to, or reply to no longer exists at the channel you named. This is one of the most common errors in any bot that stores message IDs, because messages are deleted by users and by other bots constantly and nothing tells you unless you are listening for it.
The message ID must be paired with the correct channel ID. A valid message ID sent to the wrong channel endpoint also resolves as unknown, which trips up code that keeps message IDs in one table and channel IDs in another. Messages in threads are addressed by the thread's ID, not the parent channel's.
Ephemeral interaction responses are a special case: they are not normal messages and you cannot fetch or delete them through the channel messages endpoints. Use the interaction webhook routes with the interaction token instead.
Because message IDs are snowflakes, you can often prove the failure mode offline: (id >> 22) + 1420070400000 is the message's creation time in Unix milliseconds, so a stored ID that decodes to eight months ago in a channel your bot purges weekly was obviously deleted. Races are the other big class: a starboard reacts to a message seconds after a moderator removed it, or a scheduled edit fires after another bot's cleanup pass. The window between "event received" and "API call made" is where messages vanish, and nothing about the event stream warns you unless you subscribe to MESSAGE_DELETE and MESSAGE_DELETE_BULK and reconcile. Note the sibling failure: passing an old-but-existing message to bulk delete produces 50034, not 10008; the two together cover most purge-command bug reports.
What it looks like
{
"message": "Unknown Message",
"code": 10008
}Why it happens
- Message was deleted by a user, a moderator, or another bot before your action ran
- Wrong channel ID for the message (thread vs parent channel, or a different channel entirely)
- Trying to manipulate an ephemeral interaction response through /channels/{id}/messages/{id}
- Reacting to or editing a message from a cached ID after a bulk delete
- Snowflake precision loss on the message ID
How to fix Discord error 10008
- 1Confirm the message still exists with GET /channels/{channel.id}/messages/{message.id} before editing or deleting
- 2For messages in threads, use the thread ID as channel.id
- 3For ephemeral or deferred interaction replies, edit via PATCH /webhooks/{application.id}/{interaction.token}/messages/@original
- 4Handle MESSAGE_DELETE and MESSAGE_DELETE_BULK events to clean stored IDs
- 5Wrap the call and treat 10008 as already-done for idempotent actions like delete
How to stop it recurring
For delete operations, treat 10008 as success: the desired state (message gone) is true. For edits, refetch first if more than a few seconds have passed since you last saw the message. Store channel ID and message ID together so they cannot drift apart.
The message endpoints' pagination and bulk-delete constraints are on the Discord limits page.
Log the decoded snowflake age alongside every 10008 so recurring stale-ID sources stand out in aggregate rather than one ticket at a time.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 10003: Unknown channelUnknown channel
- 50005: Cannot edit a message authored by another userCannot edit a message authored by another user
- 50034: Message too old to bulk deleteA message provided was too old to bulk delete
- 50019: Message can only be pinned to its own channelA message can only be pinned to the channel it was sent in
Error 10008 - quick answers
What does Discord error 10008 mean?
The message you tried to fetch, edit, delete, pin, react to, or reply to no longer exists at the channel you named. This is one of the most common errors in any bot that stores message IDs, because messages are deleted by users and by other bots constantly and nothing tells you unless you are listening for it. The message ID must be paired with the correct channel ID.
How do I fix Discord error 10008?
1. Confirm the message still exists with GET /channels/{channel.id}/messages/{message.id} before editing or deleting 2. For messages in threads, use the thread ID as channel.id 3. For ephemeral or deferred interaction replies, edit via PATCH /webhooks/{application.id}/{interaction.token}/messages/@original 4. Handle MESSAGE_DELETE and MESSAGE_DELETE_BULK events to clean stored IDs 5. Wrap the call and treat 10008 as already-done for idempotent actions like delete
Should I retry after error 10008?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.