When I try to run the bot, it keeps getting the error:
File "d:\01 Coding\Discord-Bots\chatgpaint\.venv\Lib\site-packages\discord\client.py", line 409, in _run_event
await coro(*args, **kwargs)
File "d:\01 Coding\Discord-Bots\chatgpaint\.venv\Lib\site-packages\discord\bot.py", line 1214, in on_connect
await self.sync_commands()
File "d:\01 Coding\Discord-Bots\chatgpaint\.venv\Lib\site-packages\discord\bot.py", line 761, in sync_commands
app_cmds = await self.register_commands(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\01 Coding\Discord-Bots\chatgpaint\.venv\Lib\site-packages\discord\bot.py", line 538, in register_commands
prefetched_commands = await self._bot.http.get_guild_commands(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\01 Coding\Discord-Bots\chatgpaint\.venv\Lib\site-packages\discord\http.py", line 368, in request
raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access
Bot is added with the bot and applications.commands scopes and Ive also double checked it and re-invited the bot several times with this link (no client id): https://discord.com/oauth2/authorize?client_id=XXXXXXXXXXXXXXXXXXX&permissions=8&integration_type=0&scope=bot+applications.commands
I've tried it with discord.Intents.all() or no intents at all.
Also this only happens when I create a new bot (for testing purposes, not wanna test on prod) but with the exact same code on the prod bot, everything works.