Framework for Application Commands built on discord.py
Project description
Discord Extension Interaction
Introduce
Slash Command is supported through discord.py.
Based on discord.ext.commands, compatible with existing frames.
Compatibility list
Moudle Name | Version | Tested |
---|---|---|
discord.py | v2.3.0 | ✔️ |
Pycord | v2.4.1 | ❌ |
- Plans to support py-cord, but
discord-extension-interaction
is not supported now.
Installing
Python 3.9 or higher is required.
To install the library without full voice support, you can just run the following command:
# Linux/macOS
python3 -m pip install -U discord-extension-interaction
# Windows
py -3 -m pip install -U discord-extension-interaction
To install the library with discord.py
# Linux/macOS
python3 -m pip install -U discord-extension-interaction[discordpy]
# Windows
py -3 -m pip install -U discord-extension-interaction[discordpy]
To install the development version, do the following:
$ git clone https://github.com/gunyu1019/discord-extension-interaction
$ cd discord-extension-interaction
$ python3 -m pip install -U .
Quick Example
from discord.ext import interaction
from discord import Intents
intents = Intents.default()
bot = interaction.Client(global_sync_command=True, intents = intents)
@interaction.command(description="This is ping")
async def ping(ctx: interaction.ApplicationContext):
await ctx.send("pong!")
return
bot.add_interaction(ping)
bot.run("TOKEN")
You can find more examples in the examples directory.
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-Extension-Interaction-0.6.2.tar.gz
.
File metadata
- Download URL: Discord-Extension-Interaction-0.6.2.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52067530d78034d1164a0370dbce0e522ad30ebaf8e582b3312b4d72b2f0f40a |
|
MD5 | 7bf9c68a2500485172d06c652f8391cd |
|
BLAKE2b-256 | 33e31e62a3f903c51e5a619761cc09abd36d67f69eca116b1ee91500a2362781 |
File details
Details for the file Discord_Extension_Interaction-0.6.2-py3-none-any.whl
.
File metadata
- Download URL: Discord_Extension_Interaction-0.6.2-py3-none-any.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 427890282df8db6dd9493ac660b8b8e6fb2d6e936f43716874e78d0c1bbe28ce |
|
MD5 | adb92f7cd94b721103b690d1c991da77 |
|
BLAKE2b-256 | 028a89d59ad8b6b53e02aacf4cb1d673e3705f5a5c112bf9ed3fb21b5463e164 |