Esempio n. 1
0
        def match(chat):

            if not match_name(chat, keywords):
                return
            if not match_attributes(chat, **attributes):
                return
            return True
Esempio n. 2
0
        def match(chat):

            if not match_name(chat, name):
                return
            if not match_attributes(chat, **attributes):
                return
            return True
Esempio n. 3
0
 def match(user):
     from wxpy.utils import match_name
     if not match_name(user, name):
         return
     for attr, value in attributes.items():
         if (getattr(user, attr, None) or user.raw.get(attr)) != value:
             return
     return True
Esempio n. 4
0
 def match(group):
     if not match_name(group, keywords):
         return
     if users:
         for _user in users:
             if _user not in group:
                 return
     if not match_attributes(group, **attributes):
         return
     return True
Esempio n. 5
0
 def match(group):
     if not match_name(group, keywords):
         return
     if users:
         for _user in users:
             if _user not in group:
                 return
     if not match_attributes(group, **attributes):
         return
     return True
Esempio n. 6
0
 def match(group):
     if not match_name(group, name):
         return
     if users:
         for user in users:
             if user not in group:
                 return
     for attr, value in attributes.items():
         if (getattr(group, attr, None)
                 or group.raw.get(attr)) != value:
             return
     return True