Chakra-engine
  • What is my package for?
  • Guides
    • Creating your first command
    • Creating your oauth URL
Powered by GitBook
On this page
  1. Guides

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
PreviousWhat is my package for?NextCreating your oauth URL

Last updated 3 years ago