Slash commands can't see arguments #6
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
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
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
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