Radar Bot Directory Documentation
This API is accessible from https://radarbotdirectory.xyz/api
post
Sends JSON data to your bot upon vote
get
https://radarbotdirectory.xyz/api
/bot/:id/
Get Bot Info
get
https://radarbotdirectory.xyz/api
/bot/:id/widget
Get Bot Widget
post
https://radarbotdirectory.xyz/api/
bot/:id/stats
Update Bot Statistics
get
https://radarbotdirectory.xyz/lastvoted
/:userid/:botid/
Last Voted

Discord.JS Template

const axios = require('axios')
axios({
method: 'post',
url: 'https://radarbotdirectory.xyz/api/bot/<clientid>/stats',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'Authorization': "<yourapikey>",
},
data: {
guilds: client.guilds.cache.size,
},
}).then(function(res) {
console.log(res)
}).catch(function(err) {
console.log(err)
});

Discord.py Template

import requests
data= {'guilds': len(bot.guilds), "shards": bot.shards}
headers = {'Content-Type': "Application/JSON", "Authorization": "<api_key", Accept: 'application/json'}
resp = requests.post("https://radarbotdirectory.xyz/api/bot/<client_id>/stats", data=data, headers=headers)
print(x.text)
Your API Key can be found at https://radarbotdirectory.xyz/user/<youruserid>
Last modified 6mo ago