Package: dbots
A stats poster and API wrapper for all botlists.Table of ContentsAboutInstallingExamplesExample with clientExample without clientServicesSupported ServicesAdding Custom ServicesAdding a custom post functionContributionOther LinksAboutdbotshelpsDiscordbot developers group all your statistic posting needs into one poster, complete with seperate posting, and a loop to post to all services everynseconds.InstallingPython 3.6 or higher is required!You can install dbots by running this command:# Linux/macOSpython3-mpipinstall-Udbots# Windowspy-3-mpipinstall-UdbotsTo install package from the master branch, do the following:gitclonehttps://github.com/dbots-pkg/dbots.pycddbots.py
python3-mpipinstall-UExamplesExample with clientCurrently, onlydiscord.pyis supported as a usable client. (You can use any derivative ofdiscord.pyas long as it does not interfere with important properties used bydbots.)importdiscordimportdbotsclient=discord.Client()poster=dbots.ClientPoster(client,'discord.py',api_keys={'top.gg':'â€¦','discord.bots.gg':'â€¦'})@client.eventasyncdefon_ready():print('Logged on as',client.user)awaitposter.post()# This posts to all lists every 30 minutes# You can stop the loop with `poster.kill_loop()`poster.start_loop()@poster.eventasyncdefon_auto_post(response):print('Auto-Post:',response)"""You can also define the event you want to get by adding an argument to the decorator.@poster.event('post')async def some_function(response):print(response)"""Example without clientimportdbotsclient_id='1234567890'defserver_count():return100defuser_count():return100defvoice_connections():return0# `server_count`, `user_count`, and `voice_connections` can either be regular functions or coroutinesposter=dbots.Poster(client_id,server_count,user_count,voice_connections,api_keys={'top.gg':'â€¦','discord.bots.gg':'â€¦'})See more exampleshere.ServicesSupported Servicesarcane-center.xyz(docs)blist.xyz(docs)botlist.space(docs)botsdatabase.com(docs)botsfordiscord.com(docs)bots.ondiscord.xyz(docs)carbonitex.net(docs)dblista.pl(docs)discordbots.co(docs)discord.bots.gg(docs)discordapps.dev(docs)discord.boats(docs)discordbotlist.com(docs)discordbot.world(docs)discordextremelist.xyz(docs)bots.discordlabs.org(docs)discordlistology.com(docs)lbots.org(docs)listmybots.com(docs)mythicalbots.xyz(docs)space-bot-list.xyz(docs)topcord.xyz(docs)top.gg(docs)wonderbotlist.com(docs)yabl.xyz(docs)Adding Custom ServicesYou can add custom services by extending from the base service class (dbots.Service) and overriding the_postandaliasesmethod.Make sure to add the custom service class to the service keymap. (dbots.Service.SERVICE_KEYMAP) An example of adding a custom service can be shownhere.Adding a custom post functionYou can add a custom post event by definingon_custom_postin the initialization of a Poster.This function can be used when executingposter.post('custom')and when all services are being posted to.
An example of adding a custom post function can be shownhere.ContributionAny contribution may be useful for the package! Make sure when making issues or PRs that the issue has not been addressed yet in a past issue/PR.Other LinksPyPiLibraries.ioDocumentationdbots Github Organization