Beispiel #1
0
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 ?')
Beispiel #2
0
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 ?")
Beispiel #3
0
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
Beispiel #4
0
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
Beispiel #5
0
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)
Beispiel #6
0
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)
Beispiel #7
0
def askCommand():
    utils.jprint('How can I help you ?')
Beispiel #8
0
def askCommand():
    utils.jprint("How can I help you ?")