1.0.1 • Published 3 years ago

@jayden8923/unb-js-api v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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

1.0.1

3 years ago

1.0.0

4 years ago