Skip to main content

Framework for Application Commands built on discord.py

Project description

Discord Extension Interaction

Release Release Release

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Discord-Extension-Interaction-0.6.2.tar.gz (31.6 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page