getBalance
Retrieves the current bot's L$ balance.
const result = await Bot.getBalance();
console.log("I have L$" + result.balance);Input
This function does not require any arguments.
Output
Function returns a Promise with the following data:
Variable | Type | Description |
|---|---|---|
| bool | True if command completed successfully |
| string | Error string if command has failed |
| number | The current bot L$ balance |
Comments
This function can be used with a callback:
Bot.getBalance(function(result) {
console.log("I have L$" + result.balance);
});Examples
For a comprehensive balance management script, check the example.