Skip to main content

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

ParameterDescription
optionsCommand options object.
options.nameThe name of the command.
options.aliasesAliases, work the same way as name.
options.typeChannelSpecifies in what type of channels to watch the command. Default is false.
options.codeThe code to be executed when the command is invoked.

Usage Example

<AoiClient>.addCommand({
name: "ping",
typeChannel: "private",
code: `$replyMessage[Bot ping: $ping ms]`,
});