New option types for Slash Commands #3340
Replies: 3 comments
-
I believe this could be generalized to a list of forbidden characters for an option, such that the Discord app would automatically prevent users from typing characters in said list and the API would reject (or trim, but that could cause unexpected results) requests with option values that include forbidden characters. (Edit: as pointed out by @RedDaedalus, regex filtering was denied by Discord in #2609, so I removed this part of the comment.) |
Beta Was this translation helpful? Give feedback.
-
Discord has denied regex validation for options due to concerns over freezing the client, although some form of custom validation would be nice. (See #2609) |
Beta Was this translation helpful? Give feedback.
-
Thank you, I have now updated my comment. |
Beta Was this translation helpful? Give feedback.
-
Description
In addition to the two INTEGER and STRING option types, there should be two new option types. These new types could be INTEGER_NO_SPACE and STRING_NO_SPACE so the Slash Command argument cannot contain spaces.
Why This is Needed
This feature would be useful for arguments which should not contain spaces, e.g. when you enter a prefix as argument. The bot has not to check if it contains spaces and send an error anymore.
Beta Was this translation helpful? Give feedback.
All reactions