'Returns True if this message is to the given channel'

def is_to_channel(self, channel):

    if isinstance(channel, Channel):
        channel = channel.name
    if (channel == self.channel):
        return True
    if (channel in self.channel):
        return True
    return False
