def register_cmd(cmd_name):
    """Decorator that adds a cmd_name attribute to each method that is a websocket command"""
    def decorator(method):
        method.cmd_name = cmd_name
        return method
    return decorator