Skip to content
This repository was archived by the owner on Apr 8, 2023. It is now read-only.
This repository was archived by the owner on Apr 8, 2023. It is now read-only.

Error #2

Description

@OGCoder01

Ignoring exception in command ob:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "main.py", line 42, in ob
await member.send("!obfuscate")
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/abc.py", line 1012, in send
channel = await self._get_channel()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/member.py", line 292, in _get_channel
ch = await self.create_dm()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/member.py", line 142, in general
return await getattr(self._user, x)(*args, **kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/user.py", line 764, in create_dm
data = await state.http.start_private_message(self.id)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py", line 254, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50007): Cannot send messages to this user

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50007): Cannot send messages to this user

Fix?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions