def match(chat): if not match_name(chat, keywords): return if not match_attributes(chat, **attributes): return return True
def match(chat): if not match_name(chat, name): return if not match_attributes(chat, **attributes): return return True
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
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
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