Difference between revisions of "Bot Playground/Events"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} Event is a callback function which is invoked when something happens with your bot or surrounding world. Callbacks are set using a special '...")
 
Line 1: Line 1:
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
 
Event is a callback function which is invoked when something happens with your bot or surrounding world.
 
Event is a callback function which is invoked when something happens with your bot or surrounding world.
  

Revision as of 14:06, 28 June 2016

Event is a callback function which is invoked when something happens with your bot or surrounding world.

Callbacks are set using a special on() function:

Bot.on("instant_message", function(data) {
  console.log("bot got a message:", data);
});

Commands reference

Command Description

Messaging

im Bot Playground/Events/im