def api_handler(*, name=None):
    """
        Decorator for API handlers with method names not matching
        their command names.
    :param name: Command name for the function
    :return: Wrapper function to set the name
    """

    def predicate(func):
        func.__api_name__ = name if name else func.__name__
        return func

    return predicate