Simple Discord Slash Command extension for discord.py.
Project description
discord-py-slash-command
Simple Discord Slash Command extension for discord.py.
Example
import discord
from discord.ext import commands
from discord_slash import SlashCommand
from discord_slash.model import SlashContext
bot = commands.Bot(command_prefix="!", intents=discord.Intents.all())
slash = SlashCommand(bot)
@slash.slash(name="test")
async def _test(ctx: SlashContext):
embed = discord.Embed(title="embed test")
await ctx.send(content="test", embeds=[embed])
bot.run("discord_token")
Installation
pip install -U discord-py-slash-command
Simple note before you use this
Since slash command feature is not officially released,
there will be many breaking changes to this extension and may be unstable,
so I'd recommend waiting until discord officially releases slash command,
and wait until Release 1.1.0, which I'm planning to finish implementing most of the feature.
Or you can wait until discord.py supports slash command.
DOCS
https://discord-py-slash-command.readthedocs.io/en/latest/
See discord-api-docs for some more information
about some formats.
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-py-slash-command-1.0.2.tar.gz
.
File metadata
- Download URL: discord-py-slash-command-1.0.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b456b671bbade51729765de9677dfd763df34ba8c580385195706637c244abed |
|
MD5 | 59aa0b23e774b92894c18644a1661241 |
|
BLAKE2b-256 | 3ed62d401686831ef8fddb15d044e30c510f8a75e93f0867ac1cd1a56f75da82 |
File details
Details for the file discord_py_slash_command-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: discord_py_slash_command-1.0.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed6bea101e3c8b09af131ec239a4e3dd1a07f32263eff39f398ecc2d1c488e7f |
|
MD5 | b4b831d9efc3d185b10ac37985588a41 |
|
BLAKE2b-256 | 73a104334eabf62b80614e83d81be5cb36ccb697d4d49f0926911f2e1670495c |