Difference between revisions of "Bot Playground/Commands/key2name"
From SmartBots Developers Docs
(Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <TTT_onlyinclude>...</TTT_onlyinclude> <syntaxhighlight lang="javascript"> ... </syntaxhighlight> {{API Command Table}} {{API Required Vars|...") |
|||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
| − | < | + | <onlyinclude>...</onlyinclude> |
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Revision as of 14:57, 1 July 2016
...
...
Reference
This command accepts the following parameters:
| Variable | Required | Description
| |
|---|---|---|---|
| Input: | |||
| ... | yes | ... | |
| ... | yes | ... | |
| Output: | |||
| result | This function does not return anything | ||
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);
}
return Bot.key2name(result.slkey);
})
.then(function(result) {
console.log("Backward key2name check. Name: " + result.slname);
});