(func=None, event_type=None, thread=False)
this decorator is used to register an event parser that the bot will respond to.
this decorator is used to register an event parser that the bot will respond to.
this decorator is used to register an event parser that the bot will respond to .
def event(func=None, event_type=None, thread=False):
    """
    this decorator is used to register an event parser that the bot will respond to.
    """
    def decorator(func):
        func.__brutal_event = True
        if event_type is not None and type(event_type) in (str, unicode):
            func.__brutal_event_type = event_type

        if thread is True:
            func.__brutal_threaded = True

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            return func(*args, **kwargs)
        return wrapper

    if func is None:
        return decorator
    else:
        return decorator(func)
def event ( func = None , event_type = None , thread = False ) : def decorator ( func ) : func . __brutal_event = True if event_type is not None and type ( event_type ) in ( str , unicode ) : func . __brutal_event_type = event_type if thread is True : func . __brutal_threaded = True @ functools . wraps ( func ) def wrapper ( * args , * * kwargs ) : return func ( * args , * * kwargs ) return wrapper if func is None : return decorator else : return decorator ( func )