

def _is_bot_message(self, msg):
    if (msg['type'] != 'message'):
        return False
    if (not msg.get('channel', '').startswith('C')):
        return False
    return ((msg.get('user') == self.testbot_userid) or (msg.get('username') == self.testbot_username))

dataset/ETHPy150Open lins05/slackbot/tests/functional/driver.py Driver._is_bot_message/original