Skip to content

Instantly share code, notes, and snippets.

@jacc
Last active December 27, 2018 19:32
Show Gist options
  • Save jacc/480eca54bdd96d711ff05d514b946d68 to your computer and use it in GitHub Desktop.
Save jacc/480eca54bdd96d711ff05d514b946d68 to your computer and use it in GitHub Desktop.
Post to DBL using discord.py instead of using DBLPy
import requests
url = "https://discordbots.org/api/bots/<your bot id>/stats"
payload = {"server_count": str(len(bot.guilds))}
headers = {"Authorization": 'dbl token'}
r = requests.post(url, data=payload, headers=headers)
await print("[+] Guild change detected, posting guild count to DBL")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment