mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-03 03:35:24 +02:00
Posting stats for bots.discord.pw
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import aiohttp
|
||||
import json
|
||||
|
||||
class DiscordBotsOrg(): # https://discordbots.org
|
||||
def __init__(self, client_id, token):
|
||||
@ -9,4 +10,15 @@ class DiscordBotsOrg(): # https://discordbots.org
|
||||
headers = {"Authorization": self.token}
|
||||
payload = {"server_count": count}
|
||||
async with aiohttp.ClientSession() as aioclient:
|
||||
await aioclient.post(self.url, data=payload, headers=headers)
|
||||
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:
|
||||
t = await aioclient.post(self.url, json=payload, headers=headers)
|
Reference in New Issue
Block a user