Handler Command
Use this method to track commands.
note
Now command can be used for multiple tracking purposes (starting from 0.7.0 and above).
Parameters
| Parameter | Description | 
|---|---|
| options | Command options object. | 
| options.name | The name of the command. | 
| options.aliases | Aliases, work the same way as name. | 
| options.typeChannel | Specifies in what type of channels to watch the command. Default is false. | 
| options.code | The code to be executed when the command is invoked. | 
Usage Example
- JavaScript
- Loader
<AoiClient>.addCommand({
  name: "ping",
  typeChannel: "private",
  code: `$replyMessage[Bot ping: $ping ms]`,
});
- ESModule
- Commonjs
export default {
  name: "ping",
  typeChannel: "private",
  code: `$replyMessage[Bot ping: $ping ms]`,
};
module.exports = {
  name: "ping",
  typeChannel: "private",
  code: `$replyMessage[Bot ping: $ping ms]`,
};