Skip to main content

Python library that handles interactions from Discord POST requests.

Project description

discord.http

Python library that handles interactions from Discord POST requests.

✨ NOW SUPPORTS USER COMMANDS ✨

Installing

You need Python >=3.11 to use this library.

Install by using pip install discord.http in the terminal. If pip does not work, there are other ways to install as well, most commonly:

  • python -m pip install discord.http
  • python3 -m pip install discord.http
  • pip3 install discord.http

Quick example

from discord_http import Context, Client

client = Client(
    token="Your bot token here",
    application_id="Bot application ID",
    public_key="Bot public key",
    sync=True
)

@client.command()
async def ping(ctx: Context):
    """ A simple ping command """
    return ctx.response.send_message("Pong!")

client.start()

Need further help on how to make Discord API able to send requests to your bot? Check out the documentation for more detailed information.

Resources

Acknowledgements

This library was inspired by discord.py, developed by Rapptz. We would like to express our gratitude for their amazing work, which has served as a foundation for this project.

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

discord_http-1.3.12.tar.gz (86.1 kB view hashes)

Uploaded Source

Built Distribution

discord.http-1.3.12-py3-none-any.whl (99.8 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