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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f72cf375d98bc7c322f9d2b4533f6a12e0f3d7ff6635714398c7fe62e252c765 |
|
MD5 | 9f3f08100dfae9a1374f129e90a4a1dd |
|
BLAKE2b-256 | f0f6d7dbb227027e558295f7cecadb4c36b1c8ece8bd7dae4ef5d8413b93eb0c |
Close
Hashes for Discord_Extension_Interaction-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18b5c150e78b0830306630188f1193f1f8d3068c796b2137e41ad55f518030e8 |
|
MD5 | 4bf3f0aea7b36677aa66821540b5a718 |
|
BLAKE2b-256 | 3122079272383b830515c9c0a2806e4e9f1082c1fb0b17b614f675726eb32e80 |