Difference between revisions of "Bot Playground/Events"
From SmartBots Developers Docs
Jump to: navigation, search
Line 18: | Line 18: | ||
{{API_Table_end}} | {{API_Table_end}} | ||
+ | |||
+ | |||
+ | {{NavMenu}} |
Revision as of 15:09, 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);
});
Events reference
Command | Description | |
---|---|---|
Messaging | ||
instant_message | Fires when bot receives a message from another avatar or in-world object. |
- Events