An async Discord HTTP Interactions wrapper for discord.py.
Project description
An async Discord HTTP Interactions wrapper for discord.py built with aiohttp.
Documentation
Installing
aiointeractions requires Python 3.8 or newer.
pip install aiointeractions
Example
import asyncio
import discord
import aiointeractions
intents = discord.Intents.none()
# intents are not required because there is no gateway conenction
client = discord.Client(intents=intents)
tree = discord.app_commands.CommandTree(client)
app = aiointeractions.InteractionsApp(client)
discord.utils.setup_logging(root=True)
@tree.command()
async def ping(interaction: discord.Interaction) -> None:
await interaction.response.send_message('Pong!')
async def main():
async with client:
await app.start()
# your bot will now receive interactions
asyncio.run(main())
Fork Support
While some forks may be compatible, discord.py forks will not be supported.
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
aiointeractions-1.2.3.tar.gz
(6.2 kB
view details)
File details
Details for the file aiointeractions-1.2.3.tar.gz
.
File metadata
- Download URL: aiointeractions-1.2.3.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fc81950d62790c0e201d3b1f257afdc8a98fda709e1f3c16f390d78bb905b11 |
|
MD5 | 92ef7ed89b46b247dd66ad803d21d490 |
|
BLAKE2b-256 | 0ee6da28880ab9a540edf1947797dae5f0982e306158001d01b654df4909f5db |