#NEWLINE# def hear( regex , include_me = False , case_sensitive = False , multiline = False , admin_only = False , acl = set ( ) ) : #NEWLINE# #INDENT# def wrap( f ) : #NEWLINE# #INDENT# passed_args = [ ] #NEWLINE# def wrapped_f( * args , **kwargs ) : #NEWLINE# #INDENT# f ( * args , ** kwargs ) #NEWLINE# #UNINDENT# wrapped_f . will_fn_metadata = getattr ( f , 'will_fn_metadata' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# wrapped_f . will_fn_metadata [ 'listener_regex' ] = regex #NEWLINE# wrapped_f . will_fn_metadata [ 'case_sensitive' ] = case_sensitive #NEWLINE# wrapped_f . will_fn_metadata [ 'multiline' ] = multiline #NEWLINE# wrapped_f . will_fn_metadata [ 'listens_only_to_direct_mentions' ] = False #NEWLINE# wrapped_f . will_fn_metadata [ 'listens_only_to_admin' ] = admin_only #NEWLINE# wrapped_f . will_fn_metadata [ 'listener_includes_me' ] = include_me #NEWLINE# wrapped_f . will_fn_metadata [ 'listens_to_messages' ] = True #NEWLINE# wrapped_f . will_fn_metadata [ 'listener_args' ] = passed_args #NEWLINE# wrapped_f . will_fn_metadata [ '__doc__' ] = f . __doc__ #NEWLINE# wrapped_f . will_fn_metadata [ 'listeners_acl' ] = acl #NEWLINE# return wrapped_f #NEWLINE# #UNINDENT# return wrap