giveMoney

From SmartBots Developers Docs
Bot PlaygroundCommands
Revision as of 18:30, 3 July 2016 by Phil (Talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Commands bot to send money (L$) to specific avatar.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.giveMoney(avatar, amou...")

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

Commands bot to send money (L$) to specific avatar.

Bot.giveMoney(avatar, amount, comment);

Reference

This command accepts the following parameters:

Variable Required Description


giveMoney:
avatar yes The avatar UUID.
amount yes The amount of money to give.
comment (optional) Text comment for the money transaction.
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

Bot returns either result=OK on a successful transaction, or result=FAIL&resulttext=text-string to indicate the problem occurred (usually low bot's balance).