Event Command

From StealthBot Wiki Backup
Jump to: navigation, search

This StealthBot scripting event occurs when a user sends to a command either directly to the bot or in the bots channel.

The Event_Command(Command) event is used to handle the resulting output or handling of the specified command via the Command object API.

Syntax

Sub Event_Command(objCmd)
    ' ...
End Sub

Arguments

Example

This will respond with an additional string if someone uses the "whoami" command.

Sub Event_Command(objCmd)
    If LCase(objCmd.Name) = "whoami" Then
        objCmd.Respond "You are also cool!"
    End If
End Sub

See also