Get an array with all the commands of artyom.

This method allows you to retrieve all the loaded commands to artyom in the moment that is executed. It won't return the entire command but an array of objects with the following structure:

  • indexes : All the possibilities to activate the command
  • smart : if the command is smart
  • description: If the command has a description.


Load a new command in case that it doesn't exists:

let artyom = new Artyom();

// Some code that adds commands

var commands = artyom.getAvailableCommands();

for(var i = 0;i < commands.length;i++){
    var command = comanddos[i];

    // If NOT exists a command triggered by hello, add it . 
                description:"Says hello to the user",
                indexes:["hello","whats up"],
                    artyom.say("Hey what's your budget");

        break;//Stop search in commands

// Now we can say hello !