Posting Stats

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

The packages on this page were not created by Discord's Best Bots 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.py

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

from discord.ext import commands
import discordlists
class DiscordListsPost(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.api = discordlists.Client(self.bot) # Create a Client instance
self.lists.set_auth("discordsbestbots.xyz", "YOURAPIKEY")
self.api.start_loop() # Posts the server count automatically every 30 minute
def setup(bot):
bot.add_cog(DiscordListsPost(bot))

Discord

JDA

install JavaBotBlockAPI https://bintray.com/andre601/maven/JavaBotBlockAPI

// Create an instance of BotBlockAPI
BotBlockAPI api = new BotBlockAPI.Builder()
.addAuthToken("discordsbestbots.xyz", "YOURAPIKEY")
.build();
// Create an instance of RequestHandler for posting
RequestHandler handler = new RequestHandler();
// jda is a JDA instance. You can also use ShardManager instead.
handler.startAutoPosting(jda, api);

Different Library

You'll need to make a direct request to the API, click below for more info.

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