Event Command

From StealthBot Wiki
Revision as of 18:51, 21 October 2010 by Neco (talk | contribs) (Example)
(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.


Sub Event_Command(objCmd)
    ' ...
End Sub



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