def greetings(): # TODO check meteo currentHour = datetime.now().hour greeting = 'Good morning' if currentHour >= 17: greeting = 'Good evening' elif currentHour > 12: greeting = 'Good afternoon' utils.jprint(greeting + ' ' + conf.adminName + '.\nHow are you today ?')
def greetings(): # TODO check meteo currentHour = datetime.now().hour greeting = "Good morning" if currentHour >= 17: greeting = "Good evening" elif currentHour > 12: greeting = "Good afternoon" utils.jprint(greeting + " " + conf.adminName + ".\nHow are you today ?")
def detectCommand(userInput): # Check if there is a command matching user input for trigger, commandKey in triggers.items(): if trigger in userInput.lower(): command = commands[commandKey] if "botMessage" in command: utils.jprint(command["botMessage"]) if "sysMessage" in command: utils.jsysprint(command["sysMessage"]) if "command" in command: exec(command["command"]) return True # If there is not utils.jprint(junkIa) return True
def detectCommand(userInput): # Check if there is a command matching user input for trigger,commandKey in triggers.items(): if trigger in userInput.lower(): command = commands[commandKey] if 'botMessage' in command: utils.jprint(command['botMessage']) if 'sysMessage' in command: utils.jsysprint(command['sysMessage']) if 'command' in command: exec(command['command']) return True # If there is not utils.jprint(junkIa) return True
def greetings(userInput): if analyser.isGood(userInput): if "not" in userInput: utils.jprint("\rDo not worry Sir.\nI am here now.") else: utils.jprint("\rI am glad to hear it Sir.") else: utils.jprint(junkIa)
def greetings(userInput): if analyser.isGood(userInput): if 'not' in userInput: utils.jprint('\rDo not worry Sir.\nI am here now.') else: utils.jprint('\rI am glad to hear it Sir.') else: utils.jprint(junkIa)
def askCommand(): utils.jprint('How can I help you ?')
def askCommand(): utils.jprint("How can I help you ?")