#Help with granting rights to the bot

1 messages · Page 1 of 1 (latest)

daring ferry
#

Here is the code:

`import disnake
from disnake.ext import commands

bot = commands.Bot(command_prefix=".", help_command=None, intents=disnake.Intents.all())

@bot.event
async def on_ready():
print(f"Bot {bot.user} in ready to work!")

bot.run("token")`

There is such an error at startup:

Traceback (most recent call last): File "C:\Users\Rodion\Desktop\myBot\new.py", line 11, in <module> bot.run("token") File "C:\Users\Rodion\Desktop\myBot\.venv\Lib\site-packages\disnake\client.py", line 1126, in run return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\Rodion\Desktop\myBot\.venv\Lib\site-packages\disnake\client.py", line 1105, in runner await self.start(*args, **kwargs) File "C:\Users\Rodion\Desktop\myBot\.venv\Lib\site-packages\disnake\client.py", line 1067, in start await self.connect( File "C:\Users\Rodion\Desktop\myBot\.venv\Lib\site-packages\disnake\client.py", line 992, in connect raise PrivilegedIntentsRequired(exc.shard_id) from None disnake.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.

Earlier, I was told to grant admin rights to the bot. I provided them, but the error did not disappear. I have granted the rights in this order:
OAuth2 - Not - Administrator
I copied the link below and used it to invite the bot to the server. Then I inserted the token from the "Bot" section into the Python code. It didn't help.
Tell me, please, what did I do wrong?

mint hinge
#

#1247800930192195655 message

daring ferry
mint hinge
#

yes, read ur error

#

Earlier, I was told to grant admin rights to the bot. I provided them
u shouldn't do this

daring ferry
#

MessageContentPrefixWarning: Message Content intent is not enabled and a prefix is configured. This may cause limited functionality for prefix commands. If you want prefix command, pass an intents object with message_content set to True. If you don't need any prefix functionality, consider using Interaction Bot. Alternatively, set prefix to disnake.ext.commands.when_mentioned to silence this warning. bot = commands.Bot(command_prefix=".", help_command=None, intents=disnake.Intents.default())

#

intents.message_content = True

#

Yes?

mint hinge
#

can you read the error pls?

#

It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page.

daring ferry
#

And in which section is it located?

daring ferry
mint hinge
#

++

daring ferry
meager owl
daring ferry
severe birch
hollow shale