URL argument type for slash commands #3292
Unanswered
xSke
asked this question in
API Feature Requests & Ideas
Replies: 1 comment
-
Better yet, some kind of Regular Expression or "fake" Regular Expression (to prevent users from killing Discord's servers) would be nice |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
An attachment type, similar to
string
, that performs client-side validation that the input is a valid URL.Why This is Needed
I have a lot of commands in my bot that can take eg. links to images to use, links to files elsewhere, etc... and it's nice to have some sort of first-class indication that an argument needs to be an URL.
Alternatives Considered
The alternative would be just using a string argument, and performing the validation on the bot end. That works, but it's not as clean for the user.
Additional Details
This isn't super important, but it'd be a nice quality-of-life addition, depending on how difficult new argument types are to add on your end.
Beta Was this translation helpful? Give feedback.
All reactions