name2key

From SmartBots Developers Docs
Bot PlaygroundCommands
Revision as of 06:56, 29 June 2016 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Converts given resident name to UUID.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.name2key(slname); </syntaxhighlight>...")

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

Converts given resident name to UUID.

Bot.name2key(slname);

Reference

This command accepts the following parameters:

Variable Required Description


Input:
slname yes The name of the resident. Template:Full name required
Output:

Template:API Return Promise

slkey The UUID of the avatar

Examples

var slname = "Glaznah Gassner";

Bot.name2key(slname)
.then(function(result) {
  if(result.success) {
    console.log("The UUID of " + slname + " is ", result.slkey);
  } else {
    console.log("Error executing name2key: " + result.error);
  }
});