1.1.1 • Published 4 years ago

tropicalbotlist.js v1.1.1

Weekly downloads
5
License
MIT
Repository
-
Last release
4 years ago

tropical bot list api wrapper for node.js

Bot List Link

Installation

npm install tropicalbotlist.js --save

Posting Servers Count & Shards Count POST

You can post once every 5 minutes (ratelimits)

Response

Error 429 : [TBL] (429): Your are being ratelimited, 1 request per 5 mins.

Error 404 : [TBL] (404): Can't find server_count.

Error 404 : [TBL] (404): Authorization header not found.

Error 400 : [TBL] (400): server_count not integer.

Error 404 : [TBL] (404): Bot not found!

Error 400 : [TBL] (400): Incorrect authorization token.

Error 404 : [TBL] (404): Go generate auth token for your bot!

Error 400 : [TBL] (400): shard_count not integer.

Success 200 : 200: Your Stats Has Been Posted.

const Discord = require("discord.js")
const client = new Discord.Client()
const prefix = "!";
const TBL = require("tropicalbotlist.js")
const tbl = new TBL.get(client.user.id,"bot-auth-token")

client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}.`)
setInterval(() => {
    tbl.post(client.guilds.cache.size)
    //tbl.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")
1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago