Skip to main content

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(text="test", embeds=[embed])


bot.run("discord_token")

Installation

pip install -U discord-py-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


Download files

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

Source Distribution

discord-py-slash-command-1.0.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

discord_py_slash_command-1.0.1-py3-none-any.whl (8.6 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