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, you can just run the following command:
# Linux/macOS
python3 -m pip install -U discord-ext-interaction
# Windows
py -3 -m pip install -U discord-ext-interaction
To install the library with discord.py
# Linux/macOS
python3 -m pip install -U discord-ext-interaction[discordpy]
# Windows
py -3 -m pip install -U discord-ext-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-ext-interaction-0.6.1.tar.gz
.
File metadata
- Download URL: discord-ext-interaction-0.6.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64e2bddc78e153d45a9590fccb10451aecb566b3cb386b7e7d331f6f47bb3cfe |
|
MD5 | 1a6bdfdb6eee0f2398fe9229fce9ff50 |
|
BLAKE2b-256 | 00d6b9626e6381ad3fb7738cf582c6813132557cb3b7cbdb530411009018613f |
File details
Details for the file discord_ext_interaction-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: discord_ext_interaction-0.6.1-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb6fd91ebfc408c5da40b20313c87f036bc0c820b58291e63fba81c2f4f59e4a |
|
MD5 | f1e1fd1479f47ee27eb7ab3411454a87 |
|
BLAKE2b-256 | e327fea64a43d373063b863df227be4047d726e02aa85478a000bb0257f1de64 |