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
Close
Hashes for Discord-Extension-Interaction-0.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6181cc77a6dea1f47c617c078b465753ffb84abd8c72cb0deed5ed215db64dc7 |
|
MD5 | 891058dcd8908cd9fd5004b8a3432f82 |
|
BLAKE2b-256 | 5eb81ff1427f0854ac94df0bc03c07b1f028538d7324c0fa481f64bce9cf8920 |
Close
Hashes for Discord_Extension_Interaction-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7850fb6a0f9996561f44e7c35873cbcc6d767c3a735639c63f3c6bac6bc4dab2 |
|
MD5 | 552734c6ae087f355a3a0a07592242da |
|
BLAKE2b-256 | e2695825075f9283091973293c837d2439765f68ef1f5e3ca7e52ff060da4f53 |