APIs - Discord Bot Reviews

APIs


We provide APIs for Discord Bot Reviews.
All endpoints of this API support CORS.
Base URL: https://discordbotreviews.xyz/api

Objects


Bot Object

Parameter Type Description
username string The bot's username
discriminator number The bot's discriminator number
avatar string The bot's avatar
clientID string The bot's Client ID.
prefix string The bot's prefix.
invite_url string The bot's invite URL
support_url string The bot's support server invite code.
short_description string The bot's short description.
long_description string The bot's long description. May contain Markdown.
owner User The bot's submitter user object. May not always be the actual owner and will be missing the "bots" attribute.
owner.bio string The bot owner's biography.
owner.id snowflake The bot owner's ID
owner.username string The bot owner's username
owner.discriminator number The bot owner's discriminator (4 numbers after #)
owner.avatar string The bot owner's avatar URL
owner.certified boolean Returns true if owner is certified.
likes integer The bot's amount of likes.
dislikes integer The bot's amount of dislikes.
unique boolean Returns true if the bot is certified as "Unique".
veryUnique boolean Returns true if the bot is certified as "Very Unique"
website string The bot's website (if there is any).
source string The Bot's source code url (if there is any)
servers integer Bot's submitted server count, returns null if there isn't any.
vanityURL string The bot's vanity URL if they have one.
tags array of strings The bot's tags in an array. (returns null if they don't have any)
comments number The total number of comments on that bot (This will show a number of total comments, including banned user's comments, since banned user's comments are hidden)
commentsdisabled boolean Returns true if comments are disabled on this bot
privaterating boolean Returns true if this bot's rating data is private (Requires authorization header to obtain information about who liked and disliked)


User Object

Parameter Type Description
id string The user's ID.
username string The user's username
discriminator number The user's discriminator (4 numbers after #)
avatar string The user's avatar URL
username string The user's username
bio string The user's biography.
certified boolean Returns true if the user is certified
bots array of bot objects An array of all bots the user owns. THIS IS ONLY AVAILABLE VIA THE /user ENDPOINT AND WILL BE MISSING THE OWNER ATTRIBUTE!!!
website string The user's personal website (Will return null if they don't have one)
background string The user's background profile image (Will return null if they don't have one)
pulsecolor integer The user's custom pulse color (RGB) (Will return null if they don't have one)
certifiedbots array of snowflakes Returns an array of user's bots that are certified
animationtime number The user's background animation time (in seconds)
themecolor number in string The user's theme color
commenttheme string or number The user's comment bubble background color/theme. Can be a number if it's color, string if it's a background URL


Comment Object

Parameter Type Description
id integer The Comment ID
author snowflake The author's ID
username string The author's username
discriminator number The author's discriminator (4 numbers after #)
avatar string The author's avatar URL
content string The Comment's content
time string The JSON date & time when the comment was posted
timestamp number The timestamp when the comment was posted (may be inaccurate for older comments)
hidden boolean returns true if the comment is hidden from the page due to author banned


Endpoints


Getting a bot object by ID:

GET /bot/{bot.clientID}
Returns a bot object if client ID exists in database. Otherwise returns a 404 status.

Get a user object by ID:

GET /user/{user.id}
Returns a user object if client ID exists in database. Otherwise returns a 404 status.

Get all of the bot's comments

GET /bot/{bot.id}/comments
Returns all of the bot's comments in an object.

Get a bot's widget

GET /widget/{bot.id}.png
ALTERNATE WIDGET
GET /widget/2/{bot.id}.png
Returns .png file of the widget

Post server count

POST /bot/{bot.id}/stats
Post your server count to our API. Requires Authorization header

Get bot's ratings

GET /bot/${bot.id}/rating
Returns who liked & disliked the bot

NOTE: Rating data is publicly exposed by default, however, if only you would like to access this then check the 'voting' box on your bot's edit page



NOTE: If you have a vanity URL active, you can use that instead of ID on all bot endpoints.



Libraries



Name Language Author Description Download Link
DBRLib Python 3 SuperNiintendo A example library for DBR API written in Python. Download Link
dbrlib Node.js RaZeFeiXX A small library to interact with our API. Check the download link for full information. Download Link
If you want to submit your own library, please contact us on the Discord Server.


Widgets


Widgets are a way to display your bot within another page.
URL: https://discordbotreviews.xyz/api/widget/{bot.clientID}.png
Widgets will display the name, the owner, and the likes and dislikes of your bot.
To put in a widget on your website, put this into your website's HTML code where you'd like to place it.
<a href="https://discordbotreviews.xyz/bot/[Your bot's ID]"><img src="https://discordbotreviews.xyz/api/widget/[Your bot's ID]" height="175px" width="400px"></a>

It should look similar to this:


There's an alternate widget incase you didn't like the first one
URL: https://discordbotreviews.xyz/api/widget/2/{bot.clientID}.png

<a href="https://discordbotreviews.xyz/bot/[Your bot's ID]"><img src="https://discordbotreviews.xyz/api/widget/2/[Your bot's ID]" height="175px" width="464px"></a>


If you are getting any errors doing this, make sure that you typed in the correct Client ID. If you've confirmed that and it's still not working, please contact us on the Discord Server.

Customization


Widgets can be customized
Query Type Description Available for
header1 hexcolor (without #) The hex color of the top header Both widgets
header2 hexcolor (without #) The hex color of the bottom header Both widgets
body hexcolor (without #) The hex color of the center body Both widgets
removeowneravatar boolean set to 'true' to remove the bot owner's avatar from the widget Both widgets
hideicon boolean set to 'true' to hide the server icon from the widget Both widgets
hidelikes boolean set to 'true' to hide the number of likes from the widget Both widgets
hidedislikes boolean set to 'true' to hide the number of dislikes from the widget Both widgets
hidecomments boolean set to 'true' to hide the number of comments from the widget Both widgets
hideservers boolean set to 'true' to hide the server count from the widget Both widgets
gradient1 hexcolor (without #) Configure the bottom gradient color of the boxes Only for alternate widget (2)
gradient2 hexcolor (without #) Configure the top gradient color of the boxes Only for alternate widget (2)

Example code & preview of customization
https://discordbotreviews.xyz/api/widget/506213298153193483.png?body=0000FF&header1=2f2f2f&header2=2f2f2f&removeowneravatar=true&hideicon=true
Looks like this:


The alternate widget would look like this:
https://discordbotreviews.xyz/api/widget/2/506213298153193483.png?body=0000FF&header1=2f2f2f&header2=2f2f2f&removeowneravatar=true&hideicon=true



Server Count



Post your server count to our api

Headers

Parameter Type Description
Authorization string Your bot's API key (REQUIRED)

Body

Parameter Type Description
server_count number Server count of your bot

You can find your API token in your bot's page.
https://discordbotreviews.xyz/bot/:id/token


Ratings



Get ratings for your bot

NOTE: Authorization header is required if you set your ratings to private, votes are by default public and obtainable by anyone


Headers

Parameter Type Description
Authorization string Your bot's api token (OPTIONAL)

Body response

Parameter Type Description
likers array of user IDs Shows everyone who liked the bot
dislikers array of user IDs Shows everyone who disliked the bot
totallikes number Total number of likes
totaldislikers array of user IDs Total number of dislikes
total number The total counted likes and dislikes
ratiofull number Shows like/dislike ratio by full number (will be negative if it's blow 0)
ratio number Calculated like/dislike ratio in percentage



Examples


Some response examples

NOTE: this hasn't been updated in a while and the response may be different




Example of GET bot

{
"clientID":  "506213298153193483",
"prefix":  "dbr!",
"invite_url":  "https://discordbotreviews.xyz/bot/dbr/add",
"support_url":  "invite",
"short_description":  "DBR is the website bot",
"long_description":  "DBR is the website bot, it logs when someone submits a bot, edits a bot, deletes a bot, or anything about certification status.",
"owner":   {
 "bio":  "making bots using fart power lmao",
 "certified":  true,
 "id":  "469716275786940416"
  },
"likes":  0,
"dislikes":  0,
"unique":  true,
"veryUnique":  false,
"website":  "https://discordbotreviews.xyz/",
"source":  "https://github.com",
"servers":  "1"
}

Example of GET user


{
"id":  "432400084706131989",
"bio":  "One of the owners of DBR | I like trains",
"certified":  false,
"bots":   {
 "Object of bots":  "Returns the same as GET bot (read above)",
  },
"background":  "https://discordbotreviews.xyz/api/icon.png",
"certifiedbots":  [ '506213298153193483' ],
"pulsecolor":  "0, 0, 0",
"animationtime":  "5"
}

Example of GET bot's comments


[  {
"id":  0,
"author":  "432400084706131989",
"content":  "Good bot! I really liked and enjoyed it!",
"time":  "2018-12-20T11:42:27.200Z"  },
{
"id":  1,
"author":  "469716275786940416",
"content":  "Awesome Bot!",
"time":  "2018-12-20T14:42:15.200Z"
}    ]