def checkTrue(self,message): ##Logic to find if flag is set ##first see if invoked invokedFlag = isAcademicInvoked.isAcademicInvoked(message) isInvoked = invokedFlag.isTrue Msg = message['text'].lower() isKeyPhrase = ( "automation" in Msg ) if (isKeyPhrase and isInvoked): self.isTrue = True
def checkTrue(self, message): ##Logic to find if flag is set ##first see if invoked invokedFlag = isAcademicInvoked.isAcademicInvoked(message) isInvoked = invokedFlag.isTrue ##see if keyword is in message Msg = message['text'].lower() isKeyPhrase = ("spin the wheel" in Msg) if (isKeyPhrase and isInvoked): self.isTrue = True
def checkTrue(self, message): ##Logic to find if flag is set ##first see if invoked invokedFlag = isAcademicInvoked.isAcademicInvoked(message) isInvoked = invokedFlag.isTrue ##see if keyword is in message Msg = message['text'].lower() Msg = Msg.replace('@academic', '').replace('[[academic]]', '') isKeyPhrase = ("update" in Msg) if (isKeyPhrase and isInvoked): self.willLike = True self.isTrue = True