Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unb-api

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unb-api

API wrapper for UnbelievaBoat Discord Bot API

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

UnbelievaBoat API

Discord npm npm downloads Open Source Love NPM

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');    // Get your API token from https://unbelievaboat.com/api/docs

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
TypePropertyDescription
Numberrank?Leaderboard rank of the user. This is only present on getUserBalance() and getGuildLeaderboard()
Stringuser_idUser ID of the discord user.
NumbercashUser's cash balance.
NumberbankUser's bank balance.
NumbertotalUser's total balance.

Support

Discord Server

Keywords

FAQs

Package last updated on 18 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc