@classmethod
def name(cls):
    """
        Returns the command name, as used by players talking to the bot.

        The default implementation handles two frequent conventions:

        - if class name starts with Cmd, strips this prefix, lowercases and returns
          the rest

        - if class name ends with Command, strips this suffix, lowercases and returns
          the rest

        - otherwise just lowercases the class name.

        So, for example, class CmdObserve will be by default handling command "observe",
        "MailCommand" will handle "mail", and "ListGames" will handle "listgames".

        Of course, the method can be just overridden to support any other name.
        """
    n = cls.__name__
    if n.startswith('Cmd'):
        return n[3:].lower()
    elif n.endswith('Command'):
        return n[:-7].lower()
    else:
        return n.lower()
