Adding new commands - stationaryStation/StationBot Wiki

Oh, so you want to create commands?

This is a great place to start your new and improved bot!


How commands are made

Create a file with your desired command name (File name doesn't matter) inside the /StationBot/Commands/{folder Name}/{filename.js}

Let's take for example the simple st:test command

module.exports = {

  // Command Name
  name: "test",

  // Command Description
  description: "Tests the bot in case of stupid errors",

  // Set to false if there isn't arguments in your command
  args: true,

  // How your command should be used
  usage: "<testArg>",

  // Command Cooldown (In seconds)
  cooldown: 1,

//Execute the Command with the variables "message" and "args"
  execute(message, args) {
  }`Arguments: ${args[0]}`)

Then you run the bot and then the command (In this case is st:test) and it should work as usual (Same with st:{yourCommandName})

So that's it!

You successfully added a custom command to StationBot!

The process is the same for all commands so no need to worry about adding your command to index.js nor adding your command to the help command, it's all automatic! (This applies only to versions 1.2.0 Pre-Release 1 and above)