def predicate(self: MessagePredicate, m: discord.Message) -> bool:
    if (not same_context(m)):
        return False
    if isinstance(pattern, str):
        pattern_obj = re.compile(pattern)
    else:
        pattern_obj = pattern
    match = pattern_obj.search(m.content)
    if match:
        self.result = match
        return True
    return False
def predicate(self: MessagePredicate, m: discord.Message) -> bool:
    if (not same_context(m)):
        return False
    if isinstance(pattern, str):
        pattern_obj = re.compile(pattern)
    else:
        pattern_obj = pattern
    match = pattern_obj.search(m.content)
    if match:
        self.result = match
        return True
    return False