-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update commands.md #41
base: master
Are you sure you want to change the base?
Conversation
I dont know why this isnt in discord docs, but having empty space as part of option name gives "regex failed" error
@@ -252,6 +252,7 @@ api.batchUpdateSlashCommandPermissions(server, Arrays.asList(builder1, builder2) | |||
- Your app cannot have two server commands within the same name on the same guild | |||
- Your app can have a global and guild command with the same name | |||
- Multiple apps can have commands with the same names | |||
- Names cannot contain empty spaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is an "empty" space?
Especially compared to a "non-empty" space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poor choice of words on my part. I meant space " " symbol.
I havent tested it with special characters, but if they forbid " ", i'd expect that it only allows a-Z and 0-9
It is mentioned in the Discord Docs https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-naming .
And I would consider saying that spaces are not allowed is not appropiate here as there is even more that is not allowed except for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the changes I ask you to consider, please squash your commits into one.
@@ -252,6 +252,7 @@ api.batchUpdateSlashCommandPermissions(server, Arrays.asList(builder1, builder2) | |||
- Your app cannot have two server commands within the same name on the same guild | |||
- Your app can have a global and guild command with the same name | |||
- Multiple apps can have commands with the same names | |||
- Command names and command option names must match the following regex `^[\w-]{1,32}$` with the unicode flag set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There really should be a description here that's also accessible to people less familiar with regex. A potential phrasing:
- Command names and command option names must match the following regex `^[\w-]{1,32}$` with the unicode flag set. | |
- Command names and command option names must be 1 to 32 characters long | |
- Command names and command option names may only contain letters, numbers, and the underscore (`_`) and dash (`-`) characters. To be precise, they must match the regex `^[\w-]{1,32}$` with the unicode flag set. |
@@ -252,6 +252,7 @@ api.batchUpdateSlashCommandPermissions(server, Arrays.asList(builder1, builder2) | |||
- Your app cannot have two server commands within the same name on the same guild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're touching this up, we might as well fix this typo.
- Your app cannot have two server commands within the same name on the same guild | |
- Your app cannot have two server commands with the same name on the same server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you are at it, We usually call servers "server", not "guild". :-)
@@ -252,6 +252,7 @@ api.batchUpdateSlashCommandPermissions(server, Arrays.asList(builder1, builder2) | |||
- Your app cannot have two server commands within the same name on the same guild | |||
- Your app can have a global and guild command with the same name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Your app can have a global and guild command with the same name | |
- Your app can have a global and server command with the same name |
I dont know why this isnt in discord docs, but having empty space as part of option name gives "regex failed" error