Skip to main content

This package offers you a more user friendly and easier way to interact with the discord-botlist.eu HTTP api.

Project description

dbleupy

This package offers you a more user friendly and easier way to interact with the discord-botlist.eu HTTP api.

Installing

Python 3.4 or higher is required - In the example py-cord was used, but other libs can be used as well.

To install the library you can just run the following command:

pip install dbleupy

Quick Example (belongs in the on_ready event)

from dbleupy import dbleu_postservercount, dbleu_getbotvotes, dbleu_getbotdata

dbleuKEY = "APIKEY" # Get it from https://dev.discord-botlist.eu

r = dbleu_getbotvotes(dbleuKEY, log_disable=False/True)
print(r.content)
# GET ALL BOT VOTES

r = dbleu_getbotdata(dbleuKEY, log_disable=False/True)
print(r.content)
# GET BOTDATA

dbleu_postservercount(dbleuKEY, bot/self.bot)
# POST SERVERCOUNT 
# IMPORTANT: The second parameter must be the discord.ext.commands.bot.Bot object

Example with auto post

from dbleupy import dbleu_postservercount, dbleu_getbotvotes, dbleu_getbotdata
from discord.ext import tasks

dbleuKEY = "APIKEY" # Get it from https://dev.discord-botlist.eu

r = dbleu_getbotvotes(dbleuKEY, log_disable=False/True)
print(r.content)
# GET ALL BOT VOTES

r = dbleu_getbotdata(dbleuKEY, log_disable=False/True)
print(r.content)
# GET BOTDATA

@tasks.loop(minutes=5)
async def auto_post():
    dbleu_postservercount(dbleuKEY, bot/self.bot, log_disable=False/True)
    # IMPORTANT: The second parameter must be the discord.ext.commands.bot.Bot object

auto_post.start()
# POST SERVERCOUNT every 5 mins.

Links

Documentation: https://docs.discord-botlist.eu

Official Website: https://discord-botlist.eu

Official Discord Server: https://discord.gg/FR3cA5dWK6

Discord-botlist.eu Developers: https://dev.discord-botlist.eu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbleupy-3.0.0.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file dbleupy-3.0.0.tar.gz.

File metadata

  • Download URL: dbleupy-3.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for dbleupy-3.0.0.tar.gz
Algorithm Hash digest
SHA256 d7896addfa983322c7c5413f9cc3fd4afe88e877584907c136523724026dd0ff
MD5 58ea57c555273178ad1ad6d4bbf5e4cd
BLAKE2b-256 e32d1280bd83b65228b1c48a3621768c78bf527be30fea57b91a69f362bee519

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page