This is my version of unb-api.
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'
}
Fields surrounded by [] are optional
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