Skip to main content

Framework for Application Commands built on discord.py

Project description

Discord Extension Interaction

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, 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


Download files

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

Source Distribution

discord-ext-interaction-0.6.1.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

discord_ext_interaction-0.6.1-py3-none-any.whl (2.1 kB view hashes)

Uploaded Python 3

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