Discord error 160002: Cannot reply without permission to read message history
Last verified against Discord Developer Docs - Opcodes and status codes
Cannot reply without permission to read message historyWhat error 160002 means
You sent a message with a message_reference (a reply) in a channel where the bot lacks Read Message History. Replying requires the bot to be able to see the message it is replying to, and Discord enforces that through the Read Message History permission rather than View Channel. The bot can still send ordinary messages in the channel; only the reply form is refused.
This is one of the quieter permission bugs because most bots work for weeks until an admin tightens a channel's overwrites. Reading the triggering message through a gateway event does not count: the event arrived, but the permission to fetch history is what the reply endpoint checks. Setting fail_if_not_exists: false in the reference does not help; that only suppresses the error when the referenced message is missing.
What it looks like
{
"message": "Cannot reply without permission to read message history",
"code": 160002
}Why it happens
- Channel overwrite denies Read Message History to @everyone or the bot's role
- Bot invited without Read Message History in its permission bits
- Replying in a thread where the bot lacks history on the parent
- Verification-gated channels that remove history access from new roles
How to fix Discord error 160002
- 1Grant Read Message History to the bot's role or add a bot-specific allow overwrite in that channel
- 2Catch 160002 and fall back to a plain send without message_reference, optionally mentioning the user
- 3Include Read Message History in your invite URL's permission bitfield
- 4Check effective permissions before choosing reply vs send
How to stop it recurring
Treat replies as a nice-to-have: a send helper that tries a reply and downgrades to a normal message on 160002 keeps the bot working under any permission setup. List Read Message History among the bot's required permissions in your documentation and invite link.
Replies are the most common casualty of a permissions tightening pass because Read Message History looks safe to remove. Include it in the invite bitfield and in any /diagnose output. The permission model behind this is the same one as 50013, and the channel-permission checklist in Discord bot not responding covers both.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
Error 160002 - quick answers
What does Discord error 160002 mean?
You sent a message with a message_reference (a reply) in a channel where the bot lacks Read Message History . Replying requires the bot to be able to see the message it is replying to, and Discord enforces that through the Read Message History permission rather than View Channel. The bot can still send ordinary messages in the channel; only the reply form is refused.
How do I fix Discord error 160002?
1. Grant Read Message History to the bot's role or add a bot-specific allow overwrite in that channel 2. Catch 160002 and fall back to a plain send without message_reference, optionally mentioning the user 3. Include Read Message History in your invite URL's permission bitfield 4. Check effective permissions before choosing reply vs send
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.