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.10 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 work, which served as a foundation and inspiration 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
Hashes for discord.http-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e444d5625f284d99ca7866f6096615261c7e243e10f5aefb374e5df42a0da71 |
|
MD5 | 9d36c1cdfa23f4a281fc4f8848073c91 |
|
BLAKE2b-256 | 47acc079373aab38941791b9dbe910a79564d61785a5d36a45f68bbce55c9801 |