Events
An event is a callback function that is invoked when something happens with your bot or the surrounding world.
Callbacks are set using the on() function:
Bot.on("instant_message", function(data) {
console.log("bot got a message:", data);
});Events Reference
Messaging | |
Fires when bot receives a message in the local chat | |
Fires when bot receives a message from another avatar or in-world object | |
Fires when another avatar starts typing in IM to the bot (Not available for QubicBot yet) | |
Fires when another avatar stops typing in IM to the bot (Not available for QubicBot yet) | |
Fires when bot receives a teleport offer from another avatar | |
Group Messaging | |
Fires when bot receives a group invite | |
Fires when bot receives a group chat message | |
Fires when bot receives a group notice | |
Inventory | |
Fires when bot receives an inventory offer | |
Fires when bot receives or pays money | |
Friendship | |
Fires when bot receives a friendship offer | |
Movement | |
Fires when bot autopilot successfully completes its journey (Not available for QubicBot yet) | |
Fires when bot autopilot starts (Not available for QubicBot yet) | |
Fires when bot autopilot gets stuck and gives up moving further (Not available for QubicBot yet) | |
Fires when bot in-world location, position, or heading changes (Not available for QubicBot yet) | |
Fires when bot sits on an object | |
Fires when bot teleports, indicating various stages of the teleport (Not available for QubicBot yet) | |
World | |
Reports position from avatars tracked by | |
Fires when bot receives a region restart notification (Not available for QubicBot yet) | |
Fires when bot receives a region restart cancellation notification (Not available for QubicBot yet) | |
Fires when bot receives a scripted dialog with menu buttons | |
Online Status | |
Fires when bot is going to log in to Second Life | |
Fires when bot successfully logs in to Second Life | |
Fires when bot is going offline | |
Fires after bot goes offline (Not available for QubicBot yet) | |
Fires when bot is unable to log in to Second Life (Not available for QubicBot yet) | |
Webhooks | |
Fires when the script’s webhook receives an HTTP request from your server | |