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]) – The asyncio.AbstractEventLoop to use for asynchronous operations. Defaults to None, 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.

client_id

The client ID of the poster.

get_key(service: str) → str

Gets an API key.

Parameters

service (str) – The service key to get.

kill_loop()

Cancels the current posting loop.

manual_post(server_count, service=None, user_count=None, voice_connections=None) → dbots.http.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.

post(service=None) → dbots.http.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.

set_key(service: str, key: str) → str

Sets an API key.

Parameters
  • service (str) – The service key to set.

  • key (str) – The API key to use.

shard_count

The shard count of the poster.

shard_id

The shard ID of the poster.

start_loop(interval=1800) → dbots.poster.AsyncLoop

Creates a loop that posts to all services every n seconds.

Parameters

interval (Optional[int]) – The amount of time (in seconds) to post to all services again.

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.

BASE_URL

The base URL that the service uses for API requests.

Type

Optional[str]

token

The token that will be used for the service.

Type

str

http

The HTTP client the service is using.

Type

HTTPClient

static get(key: str)

Gets a service from a key.

Parameters

key (str) – The name of the service to get.

has_token

Whether or not the service class has a token.

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:.

body

The body of the response. The response is auto-parsed to json if available.

Type

dict or str

text

The text body of the response.

Type

str

raw

The raw response from aiohttp.

Type

aiohttp.ClientResponse

status

The HTTP status code of the response.

Type

int

method

The method the request used.

Type

str

url

The URL of the response.

Type

str

Services

class dbots.Arcane(token=None, **options)

Represents the Arcane Bot Center service.

class dbots.Blist(token=None, **options)

Represents the Blist service.

get_bot(bot_id: str) → dbots.http.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) → dbots.http.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_user(user_id: str) → dbots.http.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_widget_url(bot_id: str, widget_type: str = 'normal', **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • widget_type (Optional[str]) – The type of widget to show.

  • **query – The query string to append to the URL.

class dbots.BotListSpace(token=None, **options)

Represents the botlist.space service.

get_bot(bot_id: str) → dbots.http.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_uptime(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the uptime of a bot listed on this service.

Parameters

bot_id (str) – The bot’s ID.

get_bot_votes(bot_id: str) → dbots.http.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() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of bots on this service.

get_statistics() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the statistics of this service.

get_user(user_id: str) → dbots.http.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) → dbots.http.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_widget_url(bot_id: str, style=1, **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • style (Optional[int]) – The style of the widget.

  • **query – The query string to append to the URL.

class dbots.BotsDataBase(token=None, **options)

Represents the BotsDataBase service.

get_bot(user_id: str) → dbots.http.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) → dbots.http.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_user(user_id: str) → dbots.http.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.BotsForDiscord(token=None, **options)

Represents the Bots For Discord service.

get_bot(bot_id: str) → dbots.http.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) → dbots.http.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_user(user_id: str) → dbots.http.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) → dbots.http.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_widget_url(bot_id: str, **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • **query – The query string to append to the URL.

class dbots.BotsOnDiscord(token=None, **options)

Represents the Bots On Discord service.

check_review(bot_id: str, user_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Checks whether or not a user has reviewed a bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • user_id (str) – The user’s ID.

get_widget_url(bot_id: str, **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • **query – The query string to append to the URL.

class dbots.Carbon(token=None, **options)

Represents the Carbonitex service.

get_bots() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of bots on this service.

class dbots.DBLista(token=None, **options)

Represents the DBLista service.

add_bot(data: dict) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Updates the bot’s listing with the data provided.

Parameters

data (dict) – The data being posted. This should include the ID of the bot.

get_bot(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the bot’s stats on this service.

Parameters

bot_id (str) – The bot’s ID.

get_bots(page: int = 0) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the bot’s stats on this service.

Parameters

page (int) – The page you want to get.

get_rejected_bots() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of rejected bots on this service.

get_unverified_bots() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of unverified bots on this service.

rate_bot(bot_id: str, data: dict) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Adds a rating to a bot on the service.

Parameters
  • bot_id (str) – The bot’s ID.

  • data (dict) – The data being posted. This should include the ID of the bot.

remove_bot(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Removes a bot from the service.

Parameters

bot_id (str) – The bot’s ID.

remove_rating(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Removes a rating from a bot on the service.

Parameters

bot_id (str) – The bot’s ID.

search(query: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Searches for bots on the service.

Parameters

query (str) – The query to search for.

update_bot(data: dict) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Updates the bot’s listing with the data provided.

Parameters

data (dict) – The data being posted. This should include the ID of the bot.

class dbots.DiscordBotsCo(token=None, **options)

Represents the DiscordBots.co service.

get_bot(bot_id: str) → dbots.http.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.DiscordBotsGG(token=None, **options)

Represents the Discord Bots service.

get_bot(bot_id: str, **query) → dbots.http.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) → dbots.http.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.DiscordAppsDev(token=None, **options)

Represents the Discord Apps service.

get_apps(**query) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of applications on this service.

get_bot(bot_id: str) → dbots.http.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(**query) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of bots on this service.

get_rpc_apps(**query) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of RPC applications on this service.

update_bot(bot_id: str, data: dict) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Updates the bot with the data provided.

Parameters
  • bot_id (str) – The bot’s ID.

  • data (dict) – The data being posted.

class dbots.DiscordBoats(token=None, **options)

Represents the Discord Boats service.

get_bot(bot_id: str) → dbots.http.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) → dbots.http.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_widget_url(bot_id: str, **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • **query – The query string to append to the URL.

user_voted(bot_id: str, user_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Checks whether or not a user has reviewed a bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • user_id (str) – The user’s ID.

class dbots.DiscordBotList(token=None, **options)

Represents the Discord Bot List service.

class dbots.DiscordBotWorld(token=None, **options)

Represents the Discord Bot World service.

get_bot(bot_id: str) → dbots.http.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_likes(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the list of people who liked this bot on this service.

Parameters

bot_id (str) – The bot’s ID.

get_bot_stats(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the bot’s stats on this service.

Parameters

bot_id (str) – The bot’s ID.

get_bots() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of bots on this service.

get_user(user_id: str) → dbots.http.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.DiscordExtremeList(token=None, **options)

Represents the Discord Extreme List service.

get_bot(bot_id: str) → dbots.http.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_likes(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the list of people who liked this bot on this service.

Parameters

bot_id (str) – The bot’s ID.

get_bot_stats(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the bot’s stats on this service.

Parameters

bot_id (str) – The bot’s ID.

get_statistics() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the statistics of this service.

get_user(user_id: str) → dbots.http.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) → dbots.http.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.DiscordListology(token=None, **options)

Represents the DiscordListology service.

get_bot_stats(bot_id: str) → dbots.http.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) → dbots.http.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

user_voted_bot(bot_id: str, user_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Checks whether or not a user has voted for a bot on this service. :param bot_id: The bot’s ID. :type bot_id: str :param user_id: The user’s ID. :type user_id: str

user_voted_guild(guild_id: str, user_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Checks whether or not a user has voted for a guild on this service. :param guild_id: The guild’s ID. :type guild_id: str :param user_id: The user’s ID. :type user_id: str

class dbots.LBots(token=None, **options)

Represents the LBots service.

get_bot_favorites(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the list of people who favorited this bot on this service.

Parameters

bot_id (str) – The bot’s ID.

get_panel_guild_settings(bot_id: str, guild_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets the list of people who favorited this bot on this service.

Parameters
  • bot_id (str) – The bot’s ID.

  • guild_id (str) – The guild’s ID.

invalidate(bot_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Invalidates the token being used in the request.

Parameters

bot_id (str) – The bot’s ID.

update_panel_guilds(bot_id: str, guild_id: str, data: dict) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a guilds settings from the bot’s panel.

Parameters
  • bot_id (str) – The bot’s ID.

  • guild_id (str) – The guild’s ID.

  • data (dict) – The data being posted.

user_favorited(bot_id: str, user_id: str) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Checks whether or not a user has favorited a bot on this service.

Parameters
  • bot_id (str) – The bot’s ID.

  • user_id (str) – The user’s ID.

class dbots.ListMyBots(token=None, **options)

Represents the List My Bots service.

get_bot(bot_id: str) → dbots.http.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_status_widget_url(bot_id: str, **query) → str

Gets the status widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • **query – The query string to append to the URL.

get_user_bots(user_id: str) → dbots.http.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_widget_url(bot_id: str, **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • **query – The query string to append to the URL.

class dbots.MythicalBots(token=None, **options)

Represents the Mythical Bots service.

get_bot(bot_id: str) → dbots.http.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) → dbots.http.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_widget_url(bot_id: str, **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • **query – The query string to append to the URL.

class dbots.SpaceBotsList(token=None, **options)

Represents the Space Bots List service.

get_bot(bot_id: str) → dbots.http.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.

get_bot(bot_id: str) → dbots.http.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.TopGG(token=None, **options)

Represents the Top.gg service.

get_bot(bot_id: str) → dbots.http.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) → dbots.http.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) → dbots.http.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) → dbots.http.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) → dbots.http.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_widget_url(bot_id: str, small_widget: str = None, **query) → str

Gets the widget URL for this bot.

Parameters
  • bot_id (str) – The bot’s ID.

  • small_widget (Optional[str]) – The sub-path name to turn the widget into a badge. (i.e. owner)

  • **query – The query string to append to the URL.

user_voted(bot_id: str, user_id: str) → dbots.http.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.

  • user_id (str) – The user’s ID.

class dbots.WonderBotList(token=None, **options)

Represents the Wonder Bot List service.

get_bot(bot_id: str) → dbots.http.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) → dbots.http.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.

get_bot(bot_id: str) → dbots.http.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() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of bots on this service.

get_bots_by_page(**query) → dbots.http.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() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets 20 random bots from this service.

get_unverified_bots() → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Gets a list of unverified bots on this service.

get_user_bots(user_id: str) → dbots.http.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) → dbots.http.HTTPResponse

This function is a coroutine returning a HTTPResponse.

Invalidates the token being used in the request.