teleport_offer

From SmartBots Developers Docs
Bot PlaygroundEvents
Revision as of 17:06, 30 June 2016 by Phil (Talk | contribs) (Created page with "{{DISPLAYTITLE:teleport_offer}} <onlyinclude>Fires when bot receives a teleport offer from another avatar.</onlyinclude> {{API Event Table}} {{API Variable Group|Output}} {{A...")

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

Fires when bot receives a teleport offer from another avatar.

Reference

This event comes with the following event object:

Variable Required Description
Output:
message The text of the message

Example

Bot.on("teleport_offer", function(event) {
        Bot.key2name(event.avatar_uuid)
        .then(function(result) {
          if(result.success) {
            console.log("Got teleport offer from: " + result.slname);
          } else {
            console.log("Error executing key2name: " + result.error);
          }
        });
});

console.log("Bot is listening, teleport offers");