diff --git a/redbot/core/bot.py b/redbot/core/bot.py index a0c41034e..37537868e 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -1374,14 +1374,15 @@ class RedBase( if permissions_not_loaded: subcommand.requires.ready_event.set() - def remove_command(self, name: str) -> None: + def remove_command(self, name: str) -> Optional[commands.Command]: command = super().remove_command(name) - if not command: - return + if command is None: + return None command.requires.reset() if isinstance(command, commands.Group): for subcommand in command.walk_commands(): subcommand.requires.reset() + return command def clear_permission_rules(self, guild_id: Optional[int], **kwargs) -> None: """Clear all permission overrides in a scope.