# paradisebotsapi.js

> The main wrapper for paradise bot list to post server count and shard count

Latest version **1.0.1** (published 2020-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install paradisebotsapi.js
pnpm add paradisebotsapi.js
yarn add paradisebotsapi.js
bun add paradisebotsapi.js
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-09-03 |
| First published | 2020-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/paradisebotsapi.js) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ParadiseBotList |
| Maintainers | toxic-dev |

## Links

- npm: https://www.npmjs.com/package/paradisebotsapi.js
- Repository: https://github.com/ParadiseBotList/paradisebotsapi.js
- Homepage: https://github.com/ParadiseBotList/paradisebotsapi.js#readme
- Issues: https://github.com/ParadiseBotList/paradisebotsapi.js/issues
- npm.io page: https://npm.io/package/paradisebotsapi.js

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Recent versions

- 1.0.1 (latest) — 2020-09-03

## README

# Paradise Bot List API Wrapper for Node.JS

[Bot List Link](https://paradisebots.net/)


*Installation*

`npm install paradisebotsapi.js --save`

<hr>

**Posting Servers Count & Shards Count** `POST`

`You can post once every 5 minutes (ratelimits)`

<hr>

**Response**

[ Error ] 429 : `[PBL] (429): Your are being ratelimited, 1 request per 5 mins.`

[ Error ] 404 : `[PBL] (404): Can't find server_count.`

[ Error ] 404 : `[PBL] (404): Authorization header not found.`

[ Error ] 400 : `[PBL] (400): server_count not integer.`

[ Error ] 404 : `[PBL] (404): Bot not found!`

[ Error ] 400 : `[PBL] (400): Incorrect authorization token.`

[ Error ] 404 : `[PBL] (404): Go generate auth token for your bot!`

[ Error ] 400 : `[PBL] (400): shard_count not integer.`


[ Success ] 200 : **[200]: Your Stats Has Been Posted.**

```js
const Discord = require("discord.js")
const client = new Discord.Client()
const prefix = "!";
const PBL = require("paradisebotlist.js")
const pbl = new PBL.get(client.user.id,"bot-auth-token")

client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}.`)
setInterval(() => {
    pbl.post(client.guilds.cache.size)
    //pbl.post(client.guilds.cache.size, client.shard.count)
    //to post shard count!
})

client.on("message", message => {
    if(message.author.bot) return
    if(message.content == prefix + "ping"){
        message.reply(`Pong! it took ${client.ws.ping}`)
    }
})

client.login("token")

```

---
_Source: https://npm.io/package/paradisebotsapi.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
