Ask coding questions

← Back to all posts
i have this problem when i tried "$hello" in my personal discord server
HansLangsdorff (0)

everything is normal just before i tried that command ($hello), the bot is online in my server but it can't perform the command. And this is my error:

Ignoring exception in on_message
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 16, in on_message
await message.channel.send('Hello')
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/abc.py", line 1065, in send
data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py", line 248, in request
raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

Anyone can help me, please :(

Comments
hotnewtop
Coder100 (18872)
  1. make sure that your bot has permission to send messages in your testing server, and in that channel.
  2. make sure your bot token is correct.
VulcanWM (2875)

The error is there because the bot doesn’t have permissions to send messages. Try giving it some pemisssions like admin which will automatically give it all the perms (it is safe because you are the one who coded it)

InvisibleOne (3197)

This error is probably becuase your bot doesn’t have the permissions it needs to send messages to your server, you need to make sure when you set up the bot and application that you give it the access rights that it needs to be able to send messages back to you.

FishballNooodle (211)

Hi
When inviting the bot make sure that you enable send_messages.
If you have already done that make sure that you have not given the bot a role that disable sending messages