code: def remove_command(self, name):
          
          command = self.all_commands.pop(name, None)
  
          # does not exist
          if command is None:
              return None
  
          if name in command.aliases:
              # we're removing an alias so we don't want to remove the rest
              return command
  
          # we're not removing the alias so let's delete the rest of them.
          for alias in command.aliases:
              self.all_commands.pop(alias, None)
          return command
docs: Remove a :class:`.Command` or subclasses from the internal list
          of commands.
  
          This could also be used as a way to remove aliases.
  
          Parameters
          -----------
          name: :class:`str`
              The name of the command to remove.
  
          Returns
          --------
          :class:`.Command` or subclass
              The command that was removed. If the name is not valid then
              `None` is returned instead.