Bots

Last updated last month

Methods used to post or retrieve info about bots.

Base Url

https://botsfordiscord.com/api

get
bot info

https://botsfordiscord.com/api
/bot/:id
Obtain JSON encoded information about a specific bot.
Request
Response
Path Parameters
id
required
integer
The ID of the bot you are requesting information on.
200: OK
The website was successfully able to fetch information about the bot.
The content of this response varies.
404: Not Found
The bot you requested is not listed on the website.
{"message":"Bot not found."}

get
bot votes

https://botsfordiscord.com/api
/bot/:id/votes
Obtain JSON encoded voting information about a bot you own, without the necessity of webhooks.
Request
Response
Path Parameters
id
required
integer
The ID of the bot you are requesting voting information on.
Headers
Authorization
required
string
The bot's API token.
Content-Type
required
string
This should be set to application/json
200: OK
The website was successfully able to fetch information about the bot.
{
"hasVoted": [],
"hasVoted24": [],
"votes": 0,
"votes24": 0,
"votesMonth": 0
}
400: Bad Request
You provided the wrong API token for the bot.
{"message":"Invalid authorization token."}
404: Not Found
The bot you requested is not listed on the website.
{"message":"Bot not found."}

get
bot widget

https://botsfordiscord.com/api
/bot/:id/widget
Obtain a widget that can be added to a website through HTML or Markdown.
Request
Response
Path Parameters
id
required
integer
The ID of the bot you are requesting information on.
Query Parameters
theme
optional
string
Set this to dark for a dark themed widget
width
optional
number
Set the width of the widget
200: OK
The website was successfully able to fetch and display the bot's widget.
The content of this response varies.
404: Not Found
The bot you requested is not listed on the website.
{"message":"Bot not found."}

post
bot stats

https://botsfordiscord.com/api
/bot/:id
Update your bot's server count on the website. Authorization is required!
Request
Response
Path Parameters
id
required
integer
The ID of the bot you are posting information about.
Headers
Content-Type
required
string
This should be set to application/json
Authorization
required
string
The bot's API token.
Body Parameters
server_count
required
number
The server count for the bot.
200: OK
Server count was successfully received and updated.
{ message: 'Server count successfully updated.' }
400: Bad Request
You may receive one of the following 400 errors depending on your situation.
//You did not provide any bot token:
{ message: 'Authorization is required.' }
//You did not provide any server count:
{ message: 'Server count is required.' }
//The server count you provided was not a valid number:
{ message: 'Server count must be a valid number.' }
//The token you provided does not match the bot's token:
{ message: 'Invalid authorization token.' }
404: Not Found
The bot you are trying to post information on is not listed.
{ message: 'Invalid bot.' }