(info) This AI is still in early stages of development.

chat.on()

Define a chat command and it's handler function.

 

Syntax

chat.on(command, handler);

Parameters

ParameterTypeMandatoryNotesChat Ver
commandString(tick)

The chat command to register.

(warning) Must not contain spaces! Always lower case.

0.1
handlerCommand Handler Function(tick)The function that will be called when a user issues the command.0.1

Return Values

ValueTypeNotesChat Ver
<error>ErrorParameters specified were invalid (see error message for details).0.1
trueBooleanThe command handler was registered successfully.0.1

Example

chat.on("help", myHelpHandlerFn);
Availability BETA

Requires:

Contents

Jump to:

Chat API

Topics: