Skip to main content

A Python Wrapper for the DanBotHosting API

Project description

danbot-hosting-py

A Python API Wrapper for the DanBot Hosting API

Installation

For Windows:

pip install danbot-hosting-py

For Linux/MacOS

pip3 install danbot-hosting-py

Quick Example

from discord.ext import commands
from danbot_api import DanBotClient


bot = commands.Bot(command_prefix='>', description="This is a Helper Bot")


@bot.event
async def on_ready():
    DanBotClient(bot, key="your_dbh_key", autopost=True)
    print('Bot is Online')

@bot.event
async def on_dbh_post(data):
    print("Posted Bot Data to DBH. Data Posted:")
    print(data)

@bot.command()
async def ping(ctx):
    await ctx.send('pong!')

bot.run("your bot's token here")

FAQ

How do you get an API key?

Go to the discord server and use the DBH!ApiKey command in a respective text channel there!

I'm having trouble with the module

You may post at the issues section in Github or message me on Discord! (Makiyu^#4707)

Links

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

danbot-hosting-py-1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

danbot_hosting_py-1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file danbot-hosting-py-1.0.tar.gz.

File metadata

  • Download URL: danbot-hosting-py-1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for danbot-hosting-py-1.0.tar.gz
Algorithm Hash digest
SHA256 591ab0eb1956b680e32a54500d096c2accf146139e548a842561a336fc4a2509
MD5 a9fd311799d644019dfac920092d4ca7
BLAKE2b-256 548a782797c5352afe376238c69bd8848784f30dc03bc22b220f0b63f33e59a5

See more details on using hashes here.

File details

Details for the file danbot_hosting_py-1.0-py3-none-any.whl.

File metadata

  • Download URL: danbot_hosting_py-1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for danbot_hosting_py-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae773d8f090418a5fe29272feacd39aa822da612181459f9b56fcddb2dc5837f
MD5 8676be5a95517f86829d21aff958f8bd
BLAKE2b-256 28d41de167f4af5701facf415b61ff3a71e18e40724f2925bdfc28082da9e957

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page