src/Assistant.py
def determine_command_type(command_word):
    """
    Check Settings to get the list of available commands (or default to these lists if no settings found).

    By default, the
    :param command_word:
    :return:
    """
    default_play_commands = ['play']
    default_wiki_commands = ['wiki', 'what', 'who']
    default_search_commands = ['search', 'find', 'google']
    default_open_commands = ['open']

    chosen_action = 'catchall'

    actions_list = [
        PLAY_SETTINGS.get('Commands', default_play_commands),
        WIKI_SETTINGS.get('Commands', default_wiki_commands),
        SEARCH_SETTINGS.get('Commands', default_search_commands),
        OPEN_SETTINGS.get('Commands', default_open_commands)]

    """
    Actions list is a list of all of the options of command words that can trigger that particular action.
    
    Iterate over the list of actions until you find a word that matches; 
    then set the chosen action to the first action in that list to return as the chosen action.
    
    If the command matches nothing, it will stay as 'catchall' by default.
    """
    for command_list in actions_list:
        if command_word in command_list:
            chosen_action = command_list[0]
            break

    return chosen_action

    Check Settings to get the list of available commands (or default to these lists if no settings found).

    By default, the
    :param command_word:
    :return:
    
Check Settings to get the list of available commands (or default to these lists if no settings found).
By default, the
Check Settings to get the list of available commands ( or default to these lists if no settings found ) . By default the
def determine_command_type(command_word):
    default_play_commands = ['play']
    default_wiki_commands = ['wiki', 'what', 'who']
    default_search_commands = ['search', 'find', 'google']
    default_open_commands = ['open']
    chosen_action = 'catchall'
    actions_list = [
        PLAY_SETTINGS.get('Commands', default_play_commands),
        WIKI_SETTINGS.get('Commands', default_wiki_commands),
        SEARCH_SETTINGS.get('Commands', default_search_commands),
        OPEN_SETTINGS.get('Commands', default_open_commands)]
    for command_list in actions_list:
        if command_word in command_list:
            chosen_action = command_list[0]
            break
    return chosen_action
def determine_command_type ( command_word ) : default_play_commands = [ 'play' ] default_wiki_commands = [ 'wiki' , 'what' , 'who' ] default_search_commands = [ 'search' , 'find' , 'google' ] default_open_commands = [ 'open' ] chosen_action = 'catchall' actions_list = [ PLAY_SETTINGS . get ( 'Commands' , default_play_commands ) , WIKI_SETTINGS . get ( 'Commands' , default_wiki_commands ) , SEARCH_SETTINGS . get ( 'Commands' , default_search_commands ) , OPEN_SETTINGS . get ( 'Commands' , default_open_commands ) ] """
    Actions list is a list of all of the options of command words that can trigger that particular action.
    
    Iterate over the list of actions until you find a word that matches; 
    then set the chosen action to the first action in that list to return as the chosen action.
    
    If the command matches nothing, it will stay as 'catchall' by default.
    """ for command_list in actions_list : if command_word in command_list : chosen_action = command_list [ 0 ] break return chosen_action
Check Settings to get the list of available commands (or default to these lists if no settings found).
Check Settings to get the list of available commands ( or default to these lists if no settings found ) .
"""
    Check Settings to get the list of available commands (or default to these lists if no settings found).

    By default, the
    :param command_word:
    :return:
    """ """
    Actions list is a list of all of the options of command words that can trigger that particular action.
    
    Iterate over the list of actions until you find a word that matches; 
    then set the chosen action to the first action in that list to return as the chosen action.
    
    If the command matches nothing, it will stay as 'catchall' by default.
    """
None
command_word
None