Skip to content

Migrate to slash commands#189

Open
cfalas wants to merge 2 commits into
cybermouflons:masterfrom
cfalas:slash
Open

Migrate to slash commands#189
cfalas wants to merge 2 commits into
cybermouflons:masterfrom
cfalas:slash

Conversation

@cfalas
Copy link
Copy Markdown
Contributor

@cfalas cfalas commented Jun 20, 2025

Migrate from !prefix based commands to the newer discord slash commands. This has the following benefits:

  • Removes the need for help commands, since the signature is described while the user is entering the command

    image

  • Removes the need for some of the param-checking (e.g. discord won't let you send a command with a missing argument)

    image

  • Reduces bot-spam for users since only the response shows up as a notification, and some responses (mostly failed) are ephemeral (and only appear to the user who sent the command originally)
    image

This PR also improves the error handling a bit, removing a lot of the duplicate per-command code by moving most of the error handling to be cog-wide instead of per-command.

(The diff is quite large, let me know if I should break it down, and/or invite you to a server so you can test it)

This is needed for discord to show the command lit when you type /
It needs to be rerun whenever the signature of commands changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants