mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-27 07:27:03 +01:00
23 lines
934 B
Python
23 lines
934 B
Python
import aiohttp
|
|
|
|
class DiscordBotsOrg(): # https://discordbots.org
|
|
def __init__(self, client_id, token):
|
|
self.url = "https://discordbots.org/api/bots/{}/stats".format(client_id)
|
|
self.token = token
|
|
|
|
async def post(self, count):
|
|
headers = {"Authorization": self.token}
|
|
payload = {"server_count": count}
|
|
async with aiohttp.ClientSession() as aioclient:
|
|
await aioclient.post(self.url, data=payload, headers=headers)
|
|
|
|
class BotsDiscordPw(): # https://bots.discord.pw/
|
|
def __init__(self, client_id, token):
|
|
self.url = "https://bots.discord.pw/api/bots/{}/stats".format(client_id)
|
|
self.token = token
|
|
|
|
async def post(self, count):
|
|
headers = {"Authorization": self.token}
|
|
payload = {"server_count": count}
|
|
async with aiohttp.ClientSession() as aioclient:
|
|
await aioclient.post(self.url, json=payload, headers=headers) |