Ejemplo n.º 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 ?')
Ejemplo n.º 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 ?")
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 7
0
def askCommand():
    utils.jprint('How can I help you ?')
Ejemplo n.º 8
0
def askCommand():
    utils.jprint("How can I help you ?")