DBL apparently now requires json payload not simple form data for poststats

This commit is contained in:
Jeremy Zhang 2018-08-11 23:25:06 +00:00
parent 80d333403a
commit 14d93b3bd1

View File

@ -9,7 +9,7 @@ class DiscordBotsOrg(): # https://discordbots.org
headers = {"Authorization": self.token} headers = {"Authorization": self.token}
payload = {"server_count": count, "shard_count": shard_count, "shard_no": shard_id} payload = {"server_count": count, "shard_count": shard_count, "shard_no": shard_id}
async with aiohttp.ClientSession() as aioclient: async with aiohttp.ClientSession() as aioclient:
await aioclient.post(self.url, data=payload, headers=headers) await aioclient.post(self.url, json=payload, headers=headers)
class BotsDiscordPw(): # https://bots.discord.pw/ class BotsDiscordPw(): # https://bots.discord.pw/
def __init__(self, client_id, token): def __init__(self, client_id, token):