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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file interactions-dbl-1.0.0.tar.gz.

File metadata

  • Download URL: interactions-dbl-1.0.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for interactions-dbl-1.0.0.tar.gz
Algorithm Hash digest
SHA256 744780a24770f9c3c2ffc1235ffdaa109785e4e61c79408be12148bb98b0fc99
MD5 052aa2cc9f110abcdb9362b5c423741b
BLAKE2b-256 22ac4252c3fae4357ddc28ca09dba61629376b122c3d6835f3b0641e866d4272

See more details on using hashes here.

File details

Details for the file interactions_dbl-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for interactions_dbl-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e6b48a5b469c4dec8fedae8f8b8678802c7110e90761365f409adf882197e5a
MD5 5aa13a99e1d925ce76dd3c4460e01ee5
BLAKE2b-256 6d20cff96b856db4d0a1e1456228a179a10fd5df2a0bcf3997b9b59a4b8360af

See more details on using hashes here.

Supported by

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