Module: Messageflags - Paultje52/BananenBase GitHub Wiki

The message flags module lets you get message flags for commands.

For example, you can name a command ping. But the user can add a flag called avarage to ping multiple times.

Configuration

The message flags module has one option, prefix. When the prefix is -, each argument that starts with - is considered a flag.

Default: -

Example

In the main file

myBot.addModule("messageflags", {
  prefix: "--"
});

In the command run method

run(message) {
  if (message.flags.includes("avarage")) {
    // .ping --avarage
  } else {
    // .ping
  }
}