API Reference¶
The following section outlines the API of dbots.
Classes¶
- class dbots.Poster(client_id, server_count, user_count, voice_connections, on_custom_post=None, **options)¶
A class that posts server count to listing sites.
- Parameters
client_id (
str
) – The client ID used for posting to a service.server_count (function or coroutine) – The function to use when retrieving the amount of servers.
user_count (function or coroutine) – The function to use when retrieving the amount of users.
voice_connections (function or coroutine) – The function to use when retrieving the amount of voice connections.
on_custom_post (Optional[function or coroutine]) – The function to use when posting to a custom service. This function will be used with the named parameters being server_count, user_count and voice_connections.
loop (Optional[
asyncio.AbstractEventLoop
]) – Theasyncio.AbstractEventLoop
to use for asynchronous operations. Defaults toNone
, in which case the default event loop is used via asyncio.get_event_loop().sharding (Optional[
bool
]) – Whether or not to use sharding values.shard_count (Optional[
int
]) – The amount of shards the client has.shard_id (Optional[
int
]) – The shard ID the poster us posting for.proxy (Optional[
str
]) – Proxy URL.proxy_auth (Optional[
aiohttp.BasicAuth
]) – An object that represents proxy HTTP Basic Authorization.api_keys (Optional[
dict
]) – A dictionary of API keys with the key being service keys and values being tokens.
- kill_loop()¶
Cancels the current posting loop.
- async manual_post(server_count, service=None, user_count=None, voice_connections=None) HTTPResponse ¶
Manually posts a server count to a service.
- Parameters
server_count (
int
) – The server count to post to the service.service (Optional[
str
]) – The service to post to. Can be None to post to all services or custom to use the custom post method.user_count (Optional[
int
]) – The user count to post to the service.voice_connections (Optional[
int
]) – The voice connection count to post to the service.
- async post(service=None) HTTPResponse ¶
Posts the current clients server count to a service.
- Parameters
service (Optional[
str
]) – The service to post to. Can be None to post to all services or custom to use the custom post method.
- remove_key(service: str) str ¶
Removes an API key.
- Parameters
service (
str
) – The service key to remove.
- class dbots.Service(token=None, **options)¶
Represents any postable service.
- Parameters
token (Optional[
str
]) – The token that the class will use to authorize requests.proxy (Optional[
str
]) – Proxy URL.proxy_auth (Optional[
aiohttp.BasicAuth
]) – An object that represents proxy HTTP Basic Authorization.
- http¶
The HTTP client the service is using.
- Type
- class dbots.AsyncLoop(timeout, callback)¶
HTTP Classes¶
- class dbots.HTTPClient(base_url=None, proxy=None, proxy_auth=None)¶
Represents an HTTP client that can send requests.
- class dbots.HTTPResponse(response, text)¶
A wrapped response from an
HTTPClient
:.- raw¶
The raw response from
aiohttp
.
Services¶
- class dbots.BladeList(token=None, **options)¶
Represents the BladeList service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.Blist(token=None, **options)¶
Represents the Blist service.
See also
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_reviews(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot’s reviews on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_votes(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the list of people who voted this bot on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_server(server_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the server listed on this service.
- Parameters
server_id (
str
) – The server’s ID.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- get_user_bots(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user’s bots listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- get_user_servers(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user’s servers listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- class dbots.BotsOnDiscord(token=None, **options)¶
Represents the Bots On Discord service.
- check_review(bot_id: str, user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Checks whether or not a user has reviewed a bot.
- class dbots.Carbon(token=None, **options)¶
Represents the Carbonitex service.
See also
- get_bots() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a list of bots on this service.
- class dbots.DBots(token=None, **options)¶
Represents the DBots service.
See also
- get_audit(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot’s audit logs.
- Parameters
bot_id (
str
) – The bot’s ID.
- regen_token(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Regenerates the bot API token.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.DiscordBoats(token=None, **options)¶
Represents the Discord Boats service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- class dbots.DiscordBotList(token=None, **options)¶
Represents the Discord Bot List service.
- class dbots.DiscordBotlistEU(token=None, **options)¶
Represents the DiscordBotlistEU service.
- get_analytics() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets this bot’s analytics.
- get_bot() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets this bot’s data.
- get_votes() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets this bot’s votes.
- class dbots.DiscordBotsGG(token=None, **options)¶
Represents the Discord Bots service.
- get_bot(bot_id: str, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.**query – The query string to append to the URL.
- get_bots(**query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a list of bots on this service.
- Parameters
**query – The query string to append to the URL.
- class dbots.DiscordExtremeList(token=None, **options)¶
Represents the Discord Extreme List service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_statistics() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the statistics of this service.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- class dbots.DiscordLabs(token=None, **options)¶
Represents the Discord Labs service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_votes(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the votes for this bot.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.DiscordListSpace(token=None, **options)¶
Represents the discordlist.space service.
- get_audit_log(bot_id: str, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listing audit log.
- Parameters
bot_id (
str
) – The bot’s ID.**query – The query string to append to the URL.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_analytics(bot_id: str, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the analytics on a bot.
- Parameters
bot_id (
str
) – The bot’s ID.**query – The query string to append to the URL.
- get_bot_owners(bot_id: str, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the owners of the bot listing.
- Parameters
bot_id (
str
) – The bot’s ID.**query – The query string to append to the URL.
- get_bot_reviews(bot_id: str, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the reviews of a bot.
- Parameters
bot_id (
str
) – The bot’s ID.**query – The query string to append to the URL.
- get_bot_votes(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the list of people who voted this bot on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bots(**query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a list of bots on this service.
- Parameters
**query – The query string to append to the URL.
- get_languages(**query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets all the available languages that bots or servers can set as their language.
- Parameters
**query – The query string to append to the URL.
- get_statistics() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the statistics of this service.
- get_tags(**query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets all available tags for use on bots or servers.
- Parameters
**query – The query string to append to the URL.
- get_upvote_leaderboard(bot_id: str, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the top upvoters of this month.
- Parameters
bot_id (
str
) – The bot’s ID.**query – The query string to append to the URL.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- get_user_bots(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user’s bots listed for this service.
- Parameters
user_id (
str
) – The user’s ID.
- get_user_upvote(bot_id: str, user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Checks if a specific user has upvoted the bot.
- class dbots.DiscordListology(token=None, **options)¶
Represents the DiscordListology service.
- get_bot_stats(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot’s stats listed on this service. :param bot_id: The bot’s ID. :type bot_id:
str
- get_guild_stats(guild_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the guild’s stats listed on this service. :param guild_id: The guild’s ID. :type guild_id:
str
- class dbots.DiscordServices(token=None, **options)¶
Represents the DiscordServices service.
- post_commands(bot_id: str, commands: list) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Posts commands info to your bot page.
- class dbots.DiscordsCom(token=None, **options)¶
Represents the Discords.com service (formerly Bots For Discord).
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_votes(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the list of people who voted a bot.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_votes_12h(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the list of people who voted a bot in the last 12 hours.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- get_user_bots(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user’s bots listed for this service.
- Parameters
user_id (
str
) – The user’s ID.
- class dbots.Disforge(token=None, **options)¶
Represents the Disforge service.
- get_homepage() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Retreives the data shown on the homepage.
- get_stats() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Retreives statistics about Disforge.
- class dbots.FatesList(token=None, **options)¶
Represents the FatesList service.
- add_bot_command(bot_id: str, command: dict, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Adds a bot promotion.
- add_promotion(bot_id: str, promotion: dict) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Adds a bot promotion.
- delete_bot_command(bot_id: str, command_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Deletes a bot’s command.
- delete_promotion(bot_id: str, promotion_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Deletes a bot promotion.
- edit_bot_command(bot_id: str, command: dict) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Edits a bot’s command.
- edit_promotion(bot_id: str, promotion: dict) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Edits a bot promotion.
- get_bot(bot_id: str, **query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a bot from the API.
- Parameters
bot_id (
str
) – The bot’s ID.**query – The query string to append to the URL.
- get_bot_commands(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Get a bot’s commands.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_promotion(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a bot promotion.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_random_bot() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a random bot.
- get_votes(bot_id: str, user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the number of votes a user gave to a bot.
- get_votes_timestamped(bot_id: str, user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the number of votes a user gave to a bot with timestamps.
- regenerate_token(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Regenerates the API token.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.InfinityBotList(token=None, **options)¶
Represents the Infinity Bot List service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- class dbots.Listcord(token=None, **options)¶
Represents the Listcord service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_pack(pack_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a bot pack.
- Parameters
pack_id (
str
) – The pack’s ID.
- get_bot_packs() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets all botpacks.
- get_bot_reviews(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a bot’s reviews.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.MotionBotlist(token=None, **options)¶
Represents the MotionBotlist service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a bot.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_votes(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a bot’s reviews.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.SpaceBotsList(token=None, **options)¶
Represents the Space Bots List service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.TopCord(token=None, **options)¶
Represents the TopCord service.
See also
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bots() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Lists every bot on this service.
- class dbots.TopGG(token=None, **options)¶
Represents the Top.gg service.
See also
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_stats(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot’s stats listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_votes(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the list of people who voted this bot on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bots(**query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a list of bots on this service.
- Parameters
**query – The query string to append to the URL.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- class dbots.VoidBots(token=None, **options)¶
Represents the Void Bots service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_analytics(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot’s analytics on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bot_reviews(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot’s reviews on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- class dbots.WonderBotList(token=None, **options)¶
Represents the Wonder Bot List service.
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_user(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user listed on this service.
- Parameters
user_id (
str
) – The user’s ID.
- class dbots.YABL(token=None, **options)¶
Represents the YABL service.
See also
- get_bot(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the bot listed on this service.
- Parameters
bot_id (
str
) – The bot’s ID.
- get_bots() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a list of bots on this service.
- get_bots_by_page(**query) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a page of bots on this service.
- Parameters
**query – The query string to append to the URL.
- get_random_bots() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets 20 random bots from this service.
- get_unverified_bots() HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets a list of unverified bots on this service.
- get_user_bots(user_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Gets the user’s bots listed for this service.
- Parameters
user_id (
str
) – The user’s ID.
- invalidate(bot_id: str) HTTPResponse ¶
This function is a coroutine returning a HTTPResponse.
Invalidates the token being used in the request.