GithubHelp home page GithubHelp logo

pinkythedev / unb-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unbelievaboat/unb-api

1.0 1.0 0.0 15 KB

API wrapper for UnbelievaBoat Discord Bot API

Home Page: https://unbelievable.pizza/api/docs

License: MIT License

JavaScript 100.00%

unb-api's Introduction

UnbelievaBoat API

Discord npm npm downloads Open Source Love NPM

Installation

npm install unb-api

Documentation

Full API documentation is located at https://unb.pizza/api/docs

Example

const { Client } = require('unb-api');
const client = new Client('TOKEN');    // Get your API token from https://unb.pizza/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

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

unb-api's People

Contributors

unbelievable0 avatar

Stargazers

pevveme avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.