Posting Stats

Use these code examples to learn how to post your bot's server count!

Some packages on this page were not created by Discord Bots Group and we may not be able to help with issues. You can find support resources below the instructions for a lib.

Choose Library
discord.js
Eris
discord.py
JDA
Discord.Net
Different Library

Choose a library above.

discord.js

You can either use blapi or the DBG wrapper.

blapi

install blapi from npm https://npmjs.com/blapi

const blapi = require('blapi')
blapi.handle(client, { // client = your discord.js client
'discordbots.group', 'YOURAPIKEY'
}, 30) // 30 mins

DBG wrapper

You can also use the official Discord Bots Group Node.js wrapper to post stats:

Eris

install blapi from npm https://npmjs.com/blapi

const blapi = require('blapi')
setInterval(() => {
blapi.manualPost(client.guilds.size, client.user.id, { // client = your Eris client
'discordbots.group': 'YOURAPIKEY'
})
}, 1800000) // every 30 mins

discord.py

install discordlists.py with pip https://pypi.org/project/discordlists.py

import discordlists
class DiscordLists:
def __init__(self, bot):
self.bot = bot
self.lists = discordlists.Client(self.bot)
self.lists.set_auth("discordbots.group", "YOURAPIKEY")
self.lists.start_loop() # Posts the server count automatically every 30 minutes
def setup(bot):
bot.add_cog(DiscordLists(bot)

Discord

Different Library

You'll need to make a direct request to the API, click below for more info. (Go down to (POST) Update server count)

Obviously, in the above examples YOURAPIKEY is your bot's API key. This can be found on your bot's edit page.