Creating your first command

Good to know: your product docs aren't just a reference of all your features! use them to encourage folks to perform certain actions and discover the value in your product.

The basics

Add a reference to the command into index.js:

index.js
// ...

// COMMANDS:
new engine.command('!help')

// ...

Then inside another folder called "commands", create a file with the same name as your command (including prefix)

!help.js
function command(msg) {
// what to happen when the command is called

msg.reply('help message')
}

module.exports = command

Last updated