All Projects → Kenny2github → discord-ext-slash

Kenny2github / discord-ext-slash

Licence: MIT license
Support slash commands with an extension to Rapptz/discord.py

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to discord-ext-slash

Eruditus
Discord CTF helper bot for CyberErudites
Stars: ✭ 34 (+88.89%)
Mutual labels:  discord-py, slash-commands
dislash.py
A Python wrapper for discord slash-commands and buttons, designed to extend discord.py.
Stars: ✭ 172 (+855.56%)
Mutual labels:  discord-py, slash-commands
hata
Async Discord API wrapper.
Stars: ✭ 156 (+766.67%)
Mutual labels:  slash-commands
Dredd
A multipurpose Discord bot written in python language and enhanced discord.py library.
Stars: ✭ 105 (+483.33%)
Mutual labels:  discord-py
discord-sniper
🔰 Discord Nitro, Giveaway and Privnote sniper! Made with Python
Stars: ✭ 120 (+566.67%)
Mutual labels:  discord-py
axiol
🚀 An advanced Python Discord bot for everyone
Stars: ✭ 39 (+116.67%)
Mutual labels:  discord-py
serverless-discord-bot
A serverless Discord Bot template built for AWS Lambda based on Discord's slash commands and the slash-create library.
Stars: ✭ 37 (+105.56%)
Mutual labels:  slash-commands
cogwatch
Automatic hot-reloading for your discord.py command files.
Stars: ✭ 17 (-5.56%)
Mutual labels:  discord-py
modis
A highly modular Discord bot designed for anyone to customise and self-host.
Stars: ✭ 16 (-11.11%)
Mutual labels:  discord-py
hawking
The retro text-to-speech bot for Discord
Stars: ✭ 24 (+33.33%)
Mutual labels:  discord-py
Klaus-Bot
All files for my discord bot made in Python using discord.py.
Stars: ✭ 16 (-11.11%)
Mutual labels:  discord-py
streamcord
A Discord bot that interacts with the popular streaming service Twitch.tv
Stars: ✭ 83 (+361.11%)
Mutual labels:  discord-py
gitbot
The most popular Discord dev toolkit with 400k+ users 🚀✨
Stars: ✭ 59 (+227.78%)
Mutual labels:  discord-py
slash-commands
slash commands handler to make your bot support slash commands.
Stars: ✭ 59 (+227.78%)
Mutual labels:  slash-commands
FireBot
A Discord Bot I made using Python and discord.py
Stars: ✭ 52 (+188.89%)
Mutual labels:  discord-py
coding-bot-v4
A discord bot for The Coding Realm
Stars: ✭ 26 (+44.44%)
Mutual labels:  discord-py
discord-super-utils
A modern python module including many useful features that make discord bot programming extremely easy.
Stars: ✭ 106 (+488.89%)
Mutual labels:  discord-py
RTFMbot
Discord bot for programming, runs code (600+ langs), queries/show docs and references
Stars: ✭ 184 (+922.22%)
Mutual labels:  discord-py
mammot
Discord bot Slash Command framework for TypeScript
Stars: ✭ 29 (+61.11%)
Mutual labels:  slash-commands
gencord
A simple, beginner-friendly, and easy-to-use library for interacting with the Discord API, with minimal syntax.
Stars: ✭ 20 (+11.11%)
Mutual labels:  slash-commands

Support slash commands.

Example Usage

from discord.ext import slash
client = slash.SlashBot(
    # normal arguments to commands.Bot()
    command_prefix='.', description="whatever",
    # special option: modify all global commands to be
    # actually guild commands for this guild instead,
    # for the purposes of testing. Remove this argument
    # or set it to None to make global commands be
    # properly global - note that they take 1 hour to
    # propagate. Useful because commands have to be
    # re-registered if their API definitions are changed.
    debug_guild=staging_guild_id
)

msg_opt = slash.Option(
    # description of option, shown when filling in
    description='Message to send',
    # this means that the slash command will not be invoked
    # if this argument is not specified
    required=True)

@client.slash_cmd() # global slash command
async def repeat( # command name
    ctx: slash.Context, # there MUST be one argument annotated with Context
    message: msg_opt
):
    """Make the bot repeat what you say""" # description of command
    # respond to the interaction, must be done within 3 seconds
    await ctx.respond(message) # string (or str()able) message

client.run(token)

Notes

  • discord.ext.slash.Context emulates discord.ext.commands.Context, but only to a certain extent. Notably, ctx.message does not exist, because slash commands can be run completely without the involvement of messages. However, channel and author information is still available.
  • All descriptions are required.
  • You must grant the bot applications.commands permissions in the OAuth2 section of the developer dashboard.

See the docs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].