UnbelievaBoat API
Installation
npm install unb-api
Documentation
Full API documentation is located at https://unbelievaboat.com/api/docs
Example
const { Client } = require('unb-api');
const client = new Client('TOKEN');
const guildID = '305129477627969547';
const userID = '261674810914897931';
client.getUserBalance(guildID, userID).then(user => console.log(user));
Constructor
new Client(token, [options])
Methods
getUserBalance(guild_id, user_id)
Returns: Promise<User>
setUserBalance(guild_id, user_id, { cash, bank }, reason)
Returns: Promise<User>
editUserBalance(guild_id, user_id, { cash, bank }, reason)
Returns: Promise<User>
getGuildLeaderboard(guild_id)
Returns: Promise<User[]>
Structures
User
Type | Property | Description |
---|
Number | rank? | Leaderboard rank of the user. This is only present on getUserBalance() and getGuildLeaderboard() |
String | user_id | User ID of the discord user. |
Number | cash | User's cash balance. |
Number | bank | User's bank balance. |
Number | total | User's total balance. |
Support
Discord Server