name2key
From SmartBots Developers Docs
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: | |||
Function returns a Promise with the following data: | |||
success | bool | true if command completed successfully | |
error | string | error string if command has failed | |
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);
}
});
- name2key