You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The discord API outlines the requirements of slash command names:
Command names must be lower-case and match the regular expression ^[\w-]{1,32}$. Commands (including sub-commands) with upper- or mixed- case names will be rejected by the API with a HTTP 400 (Bad Request) response.
It would be nice if this was type checked beforehand, to prevent invalid request errors later.
Describe the ideal solution
A clear and concise description of what you want to happen.
Template string literals could be used to enforce the format of the string.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Runtime regex assertions, but that's runtime.
The text was updated successfully, but these errors were encountered:
suneettipirneni
changed the title
Use Template String Literal for ApplicationCommandData.name
Use Template String Literal Type for ApplicationCommandData.nameJun 11, 2021
Is your feature request related to a problem? Please describe.
The discord API outlines the requirements of slash command names:
It would be nice if this was type checked beforehand, to prevent invalid request errors later.
Describe the ideal solution
A clear and concise description of what you want to happen.
Template string literals could be used to enforce the format of the string.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Runtime regex assertions, but that's runtime.
The text was updated successfully, but these errors were encountered: