Skip to content

Instantly share code, notes, and snippets.

View chrischambers's full-sized avatar

Chris Chambers chrischambers

View GitHub Profile
@chrischambers
chrischambers / discljord-slash-commands.md
Last active January 10, 2025 21:07 — forked from JohnnyJayJay/discljord-slash-commands.md
Quick primer for slash commands in discljord

Working with Slash Commands in discljord

At the end of 2020, Discord introduced a new feature that is available to bots: Slash Commands.
Slash Commands belong to a new feature category called "Interactions" which finally allows bots to enhance the Discord UI. As such, the way slash commands (and upcoming interactions such as clickable buttons aka. "components") work is quite different from other parts of the API.

What exactly are Slash Commands?

Slash commands are Discord entities that you can create, edit and delete through requests. Registered commands have a name and a description and are accessible in Discord clients by typing /name.
There are two types of commands: guild and global. As the names indicate, commands of the former type are only accessible in one specific guild