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 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "unb-api",
"version": "1.0.0",
"version": "1.0.1",
"description": "API wrapper for UnbelievaBoat Discord Bot API",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -1,1 +0,64 @@

# unb-api
# UnbelievaBoat API
[![Discord](https://discordapp.com/api/guilds/305129477627969547/embed.png)](https://discord.gg/YMJ2dGp)
[![npm](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/unb-api)
[![npm downloads](https://img.shields.io/npm/dt/unb-api.svg?maxAge=3600)](https://www.npmjs.com/package/unb-api)
[![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://github.com/ellerbrock/open-source-badge/)
[![NPM](https://nodei.co/npm/unb-api.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tatsumaki.js/)
## Installation
`npm install unb-api`
## Documentation
Full API documentation is located at [https://unb.pizza/api/docs](https://unb.pizza/api/docs)
### Example
```javascript
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})
```
Returns: `Promise<User>`
#
```
editUserBalance(guild_id, user_id, {cash, bank})
```
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**](https://discord.gg/YMJ2dGp)
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