Description
Summary
The slash commands do not load when using a specific server.
Reproduction Steps
I don't know if it's a Discord problem or a library problem.
But out of nowhere this error appeared when I turned on the bot.
I deleted the bot from the server and then I added it again, and now the commands don't appear if they are registered for a specific server: @slash_command(guild_ids=[...])
In global commands it works without problems.
I use 2.0.0b7 and 2.0.0b5 version on another bot and I get the same error.
This is the message:
Minimal Reproducible Code
Ignoring exception in on_connect
Traceback (most recent call last):
File "/home/Hyperse01/PycharmProjects/Itsuki/venv/lib/python3.10/site-packages/discord/client.py", line 382, in _run_event
await coro(*args, **kwargs)
File "/home/Hyperse01/PycharmProjects/Itsuki/venv/lib/python3.10/site-packages/discord/bot.py", line 1144, in on_connect
await self.sync_commands()
File "/home/Hyperse01/PycharmProjects/Itsuki/venv/lib/python3.10/site-packages/discord/bot.py", line 770, in sync_commands
await self._bot.http.bulk_upsert_command_permissions(self._bot.user.id, guild_id, guild_cmd_perms)
File "/home/Hyperse01/PycharmProjects/Itsuki/venv/lib/python3.10/site-packages/discord/http.py", line 359, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 405 Method Not Allowed (error code: 0): 405: Method Not Allowed
Expected Results
I hope this problem will be solved, because changes to commands or create commands do not take effect on specific servers.
Actual Results
To create new commands or modify commands for specific servers do not work when using: @slash_command(guild_ids=[...])
.
If the command was registered before, it works fine, but it cannot update the changes made.
If a new command is created, it does not appear. But when checking integrations, the command appears on the server as synced.
However, the command does not appear when trying to use it.
I use the example code from the docs, and i get the same error
Code (Obviously I changed the server id to avoid displaying it)
Error
Checking on integrations
Trying to use the command
Intents
intents = discord.Intents.default() intents.members = True
System Information
- Python v3.10.4-final
- py-cord v2.0.0-beta
- py-cord pkg_resources: v2.0.0b7
- aiohttp v3.8.1
- system info: Linux 5.17.4-200.fc35.x86_64 SMP PREEMPT Wed Apr 20 15:37:53 UTC 2022 (Fedora 35 Workstation Edition)
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
Additional Context
I got the same problem using windows, so I don't know what it could be.