getBalance

From SmartBots Developers Docs
Bot PlaygroundCommands
Revision as of 11:25, 1 November 2016 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Retrieves the current bot's L$ balance.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.getMoney(function(result) { cons...")

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

Retrieves the current bot's L$ balance.

Bot.getMoney(function(result) {
  console.log("I have L$" + result.balance);
});

or using a Promise:

Bot.getMoney()
  .then(function(result) {
    console.log("I have L$" + result.balance);
  });


Reference

This command accepts the following parameters:

Variable Required Description


getBalance:
Output:
Function returns a Promise with the following data:
success bool true if command completed successfully
error string error string if command has failed

Error messages

For a comprehensive balance management script check the Examples section.