def apply_message_parser(parser):
    """
    Decorator that passes the result of a message parser to a handler as kwargs.

    The parser will only be passed a `message` kwarg.
    """
    def inner_decorator(handler):
        def wrapped(client, message):
            parser_result = parser(message=message)
            handler(client=client, message=message, **parser_result)
        return wrapped
    return inner_decorator