mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-05 20:55:25 +02:00
add some features maybe?
This commit is contained in:
@ -4,7 +4,7 @@ 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, shard_count, shard_id):
|
||||
headers = {"Authorization": self.token}
|
||||
payload = {"server_count": count, "shard_count": shard_count, "shard_no": shard_id}
|
||||
@ -15,9 +15,9 @@ 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, shard_count, shard_id):
|
||||
headers = {"Authorization": self.token}
|
||||
payload = {"server_count": count, "shard_count": shard_count, "shard_id": shard_id}
|
||||
async with aiohttp.ClientSession() as aioclient:
|
||||
await aioclient.post(self.url, json=payload, headers=headers)
|
||||
await aioclient.post(self.url, json=payload, headers=headers)
|
||||
|
Reference in New Issue
Block a user