From d210f799ee032596d32e1d802cf883b696ad723c Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 10 Mar 2022 05:33:54 -0500 Subject: [PATCH] [commands] Fix cog eject behaviour with application commands This was using the old attribute I forgot to change. --- discord/ext/commands/cog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 8d88bf4d6..7a8e93711 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -514,9 +514,8 @@ class Cog(metaclass=CogMeta): if not cls.__cog_is_app_commands_group__: for command in self.__cog_app_commands__: - try: - guild_ids = command.__discord_app_commands_default_guilds__ - except AttributeError: + guild_ids = command._guild_ids + if guild_ids is None: bot.tree.remove_command(command.name) else: for guild_id in guild_ids: