Skip to content

Commit

Permalink
fix: prevent an unintended breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
EQUENOS committed Dec 11, 2023
1 parent 764324a commit ebdeb33
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions disnake/ext/commands/interaction_bot_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,15 +467,9 @@ def remove_app_command(
Optional[:class:`InvokableApplicationCommand`]
The app command that was removed. If no matching command was found, then ``None`` is returned instead.
"""
if guild_ids is None:
# a global command may end up being a local command if test_guilds were specified
# so we should remove this "global" command from each test guild
if self._test_guilds is not None:
extended_guild_ids = self._test_guilds
else:
extended_guild_ids = (None,)
else:
extended_guild_ids = guild_ids
test_guilds = (None,) if self._test_guilds is None else self._test_guilds
# this is consistent with the behavior of command synchronisation
extended_guild_ids = guild_ids or test_guilds

result = None
for guild_id in extended_guild_ids:
Expand Down

0 comments on commit ebdeb33

Please sign in to comment.