Slash commands can't see arguments #6

Closed
opened 2025-02-10 12:47:20 +00:00 by kami · 2 comments

Since the introduction of Discord slash commands, commands no longer detect subcommands and arguments correctly.

One notable example of this is the quote command.

commands like /quote and /quote 1 function as expected, but the system doesn't recognise eg. /quote add My new quote or /quote remove 5.

This is an inherent issue with the differences between textual commands (commands prefixed with !) and slash commands, leading so some code incompatibility when attempting to support both textual and slash commands.

Needs substantial rework before adding new commands to avoid extra work in changing code after-the-fact

Since the introduction of Discord slash commands, commands no longer detect subcommands and arguments correctly. One notable example of this is the quote command. commands like `/quote` and `/quote 1` function as expected, but the system doesn't recognise eg. `/quote add My new quote` or `/quote remove 5`. This is an inherent issue with the differences between textual commands (commands prefixed with `!`) and slash commands, leading so some code incompatibility when attempting to support both textual and slash commands. Needs substantial rework before adding new commands to avoid extra work in changing code after-the-fact
kami added the
bug
label 2025-02-10 12:47:20 +00:00
kami added this to the Devboard project 2025-02-10 12:47:20 +00:00
kami added the
priority
label 2025-02-10 20:13:02 +00:00
Poster
Owner

Okay, so it's literally impossible to implement default behaviour for slash commands.
This essentially means it's impossible to ensure command syntax is identical between twitch/discord textual commands and discord slash commands. As an example:

  • !quote can work to get a random quote.
  • /quote cannot work due to API limitations.

One workaround is possible, but at the cost of UX: add a subcommand for the "default" function. This essentially means that !quote == /quote get as an example.

This will greatly complicate commands integration, not to mention confusion for users who are used to the textual syntax.

One reference to docs about this:
Discord API reference - discord.ext.commands.HybridGroup

Okay, so it's literally impossible to implement default behaviour for slash commands. This essentially means it's impossible to ensure command syntax is identical between twitch/discord textual commands and discord slash commands. As an example: - `!quote` can work to get a random quote. - `/quote` cannot work due to API limitations. One workaround is possible, but at the cost of UX: add a subcommand for the "default" function. This essentially means that `!quote` == `/quote get` as an example. This will greatly complicate commands integration, not to mention confusion for users who are used to the textual syntax. _One reference to docs about this:_ [Discord API reference - discord.ext.commands.HybridGroup](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html?highlight=hybrid_group#discord.ext.commands.HybridGroup.fallback)
kami added
wontfix
and removed
priority
labels 2025-02-14 00:48:12 +00:00
Poster
Owner

Closing this issue as the Discord API docs are clear:
Slash commands cannot be nested in the way I envisioned without Discord reworking the API to allow this.

Feedback poll posted in Discord about what alternative users want most, and development will resume after the poll

Closing this issue as the Discord API docs are clear: Slash commands cannot be nested in the way I envisioned without Discord reworking the API to allow this. [Feedback poll](https://discord.com/channels/896713616089309184/1337829416004485271/1339338324673826889) posted in Discord about what alternative users want most, and development will resume after the poll
kami closed this issue 2025-02-14 00:51:08 +00:00
kami removed this from the Devboard project 2025-02-14 00:51:31 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kami/OokamiPupV2#6
There is no content yet.