Event Command

From StealthBot Wiki Backup
Revision as of 08:20, 1 December 2017 by Davnit (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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