def predicate(self: MessagePredicate, m: discord.Message) -> bool:
    if (not same_context(m)):
        return False
    match = (_ID_RE.match(m.content) or _CHAN_MENTION_RE.match(m.content))
    if match:
        result = guild.get_channel(int(match.group(1)))
    else:
        result = discord.utils.get(guild.text_channels, name=m.content)
    if (not isinstance(result, discord.TextChannel)):
        return False
    self.result = result
    return True
def predicate(self: MessagePredicate, m: discord.Message) -> bool:
    if (not same_context(m)):
        return False
    match = (_ID_RE.match(m.content) or _CHAN_MENTION_RE.match(m.content))
    if match:
        result = guild.get_channel(int(match.group(1)))
    else:
        result = discord.utils.get(guild.text_channels, name=m.content)
    if (not isinstance(result, discord.TextChannel)):
        return False
    self.result = result
    return True