We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 696d617 commit 23c2b36Copy full SHA for 23c2b36
discord/bot.py
@@ -299,11 +299,12 @@ async def register_commands(self) -> None:
299
guild_ids=None,
300
type=i["type"],
301
)
302
- cmd.id = i["id"]
303
- self._application_commands[cmd.id] = cmd
+ if cmd:
+ cmd.id = i["id"]
304
+ self._application_commands[cmd.id] = cmd
305
- # Permissions (Roles will be converted to IDs just before Upsert for Global Commands)
306
- global_permissions.append({"id": i["id"], "permissions": cmd.permissions})
+ # Permissions (Roles will be converted to IDs just before Upsert for Global Commands)
307
+ global_permissions.append({"id": i["id"], "permissions": cmd.permissions})
308
309
update_guild_commands = {}
310
async for guild in self.fetch_guilds(limit=None):
0 commit comments