@jayden8923/unb-js-api
v1.0.1
Published
My version of the unb api.
Downloads
1
Readme
jayden8923/unb-js-api
This is my version of unb-api.
Example Usage:
const { Client } = require('@jayden8923/unb-js-api');
const apiclient = new Client('api-token');
apiclient.getUserBalance('guildid', 'userid').then(console.log);
Outputs to:
{
rank: 'a rank',
user_id: 'userid',
cash: 'a number/ a string for Infinity',
bank: 'a number/ a string for Infinity',
total: 'a number/ a string for Infinity'
}
Methods
Fields surrounded by [] are optional
Fields surrounded by <> have 2 valid values
getUserBalance(guildid, userid)
setUserBalance(guildid, userid, amount, <bank | cash>, [reason]) Returns Promise
addToUserBalance(guildid, userid, amount, <bank | cash>, [reason]) Set amount to a negative number to decrease the balance Returns Promise