Skip to content

Forbidden: 403 Forbidden (error code: 50007): Cannot send messages to this user #1640

@sentry

Description

@sentry

Sentry Issue: BOT-13C

Forbidden: 403 Forbidden (error code: 50007): Cannot send messages to this user
(2 additional frame(s) were not displayed)
...
  File "bot/utils/lock.py", line 108, in wrapper
    log.debug(
  File "bot/utils/lock.py", line 108, in wrapper
    log.debug(
  File "bot/exts/help_channels/_cog.py", line 583, in notify_session_participants
    await message.author.send(embed=embed)
  File "discord/abc.py", line 935, in send
    data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
  File "discord/http.py", line 241, in request
    raise Forbidden(r, data)

Unhandled exception in on_message.

This is caused when a user turns on help dms, but has dms closed.
We should catch this error and deal with it

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: help channelsRelated to the help channel systemt: bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions