Here is the code:
`import disnake
from disnake.ext import commandsbot = 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?