Events

From SmartBots Developers Docs
Bot Playground
Revision as of 14:06, 28 June 2016 by Gg (Talk | contribs) (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 '...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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