Discord · api · fg-0439
Discord bot can send messages in a channel but gets Missing Permissions when replying
DiscordAPIError[50013]: Missing Permissions on message.reply()
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
Replying to a message needs READ_MESSAGE_HISTORY in addition to SEND_MESSAGES, and reading past messages needs it too. Role setups that grant only View Channel and Send Messages miss it.
Fix
Grant Read Message History to the bot role or channel overwrite, or fall back to channel.send when the permission is missing.
Apply
if (!message.channel.permissionsFor(client.user).has(PermissionFlagsBits.ReadMessageHistory)) await message.channel.send(text); else await message.reply(text);
Affects: Discord API v10 create message with message_reference, as of 2026-10
Sources
- https://docs.discord.com/developers/resources/message
- https://docs.discord.com/developers/topics/opcodes-and-status-codes
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp