Discord API · error code

Discord error 50278: Cannot send messages to this user due to no mutual guilds

Permanent - do not retryPermissions and access

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Cannot send messages to this user due to having no mutual guilds

What error 50278 means

Your bot tried to DM a user it shares no server with. Bots can generally only open a DM with users who share at least one guild with them, so once the user leaves every server the bot is in, or the bot is removed from the only shared server, DMs fail with 50278.

This is more specific than 50007, which also covers users who have DMs from server members turned off or who have blocked the bot. Getting 50278 tells you exactly why: there is no shared server left.

Scheduled reminders, subscription notices and "your ticket was closed" DMs sent long after the event are the usual victims, because the user may have left in the meantime.

Retrying does not help until a shared server exists again.

What it looks like

{
  "message": "Cannot send messages to this user due to having no mutual guilds",
  "code": 50278
}

Why it happens

  • User left every server the bot is in
  • Bot was kicked from the only server it shared with the user
  • DM sent to a user ID collected from somewhere other than a shared server
  • Delayed notification queued while the user was still a member

How to fix Discord error 50278

  1. 1Check whether the user is still a member of a guild your bot is in before sending
  2. 2Treat 50278 as a final delivery failure and stop retrying
  3. 3Fall back to a notification in a server channel, or skip the message
  4. 4Remove the user from pending DM queues

How to stop it recurring

Model DMs as optional delivery. Store a fallback channel for important notices, and expire queued DMs when GUILD_MEMBER_REMOVE shows the user left. The DM rate limit that hits bulk senders is on 40003. Do not keep DM-only flows for users who may leave.

Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.

Related codes

Error 50278 - quick answers

What does Discord error 50278 mean?

Your bot tried to DM a user it shares no server with. Bots can generally only open a DM with users who share at least one guild with them, so once the user leaves every server the bot is in, or the bot is removed from the only shared server, DMs fail with 50278. This is more specific than 50007 , which also covers users who have DMs from server members turned off or who have blocked the bot.

How do I fix Discord error 50278?

1. Check whether the user is still a member of a guild your bot is in before sending 2. Treat 50278 as a final delivery failure and stop retrying 3. Fall back to a notification in a server channel, or skip the message 4. Remove the user from pending DM queues

Should I retry after error 50278?

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.