You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 8, 2022. It is now read-only.
You maybe have heard something about them. "Slashcommands" or "Contextcommands". They're a new command system added to discord.
For example if you open up a discord chat and type in /, you'll see a bunch of commands popping up, for example /shrug, /spoiler and some more commands. Tehy are called slash commands.
Context commands are a bit more complicated?. They are currently limited to desktop versions of discord (PC, Laptop, ...). You can use them by right-clicking on a user or a message when you head to the Apps tab. There are two types of them. user context commands and message context commands
Usage
Enough talk, let's do some coding.
To create a simple slashcommand, we need to use the ui class which we previously created
@ui.slash.command()
You can create slashcommands with python decorators.
All you gotta do is add that small piece of code before a callbackfunction