Python library that handles interactions from Discord POST requests.
Project description
discord.http
Python library that handles interactions from Discord POST requests.
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
- Documentations
- Discord server
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file discord.http-1.0.22.tar.gz
.
File metadata
- Download URL: discord.http-1.0.22.tar.gz
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e77d22fa0756dd5c603df0132e25a2b46d200ef7e0ebc8aa5588ed114dddf8c |
|
MD5 | f9bb04a85a91bde20e283d09933ed0b2 |
|
BLAKE2b-256 | 3ad5669523cab2ec0fbc739624ec4f2ed824949470a8cbfe6b8f0df31843c908 |
File details
Details for the file discord.http-1.0.22-py3-none-any.whl
.
File metadata
- Download URL: discord.http-1.0.22-py3-none-any.whl
- Upload date:
- Size: 86.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9b6e28bcca8963461582591569b73338b8a8e42ad4ffb499c7ae6b7c1019c0e |
|
MD5 | aef01082826134395e2a7d6055acc2cd |
|
BLAKE2b-256 | 606cd0c4941096b137db7f4b48ad7ae4209842b5d6d62b45925d3b7cb0d0be03 |