Skip to main content

DBL (Discord Bot Lists) extension library for discord-py-interactions

Project description

interactions-dbl

PyPI PyPI - Status PyPI - License

DBL (Discord Bot Lists) extension library for discord-py-interactions.

Find the supported bot listings here.

Features

  • Update server count on most of the bot listings.

Installation

pip install interactions-dbl

Examples

Using bot.py

import interactions
from interactions.ext.dbl import DBLClient

from config import BOT_TOKEN, TOPGG_TOKEN, DBL_TOKEN

if __name__ == '__main__':
    bot = interactions.Client(
        token=BOT_TOKEN,
        intents=interactions.Intents.DEFAULT
    )


    @bot.event
    async def on_ready():
        auth = {
            "top.gg": TOPGG_TOKEN,
            "discordbotlist.com": DBL_TOKEN
        }
        DBLClient(bot, auth=auth)


    bot.start()

Using cogs

import interactions
from interactions.ext.dbl import DBLClient

from config import TOPGG_TOKEN, DBL_TOKEN


class UpdateCount(interactions.Extension):
    def __init__(self, bot):
        self.bot: interactions.Extension = bot

        auth = {
            "top.gg": TOPGG_TOKEN,
            "discordbotlist.com": DBL_TOKEN
        }
        DBLClient(self.bot, auth=auth)


def setup(client):
    UpdateCount(client)

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

interactions-dbl-1.0.0.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

interactions_dbl-1.0.0-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

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