Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/wiki/basic-tutorials/interactions/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

@Saladoc Saladoc Jul 20, 2022

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.

Suggested change
- 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

Copy link
Member

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". :-)

- Your app can have a global and guild command with the same name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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

- 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.
Copy link
Member

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:

Suggested change
- 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.

### General
- An app can have up to 100 top-level global commands with unique names
- An app can have up to an additional 100 server commands per server
Expand All @@ -261,4 +262,4 @@ api.batchUpdateSlashCommandPermissions(server, Arrays.asList(builder1, builder2)
- Options can have up to 25 choices
- Maximum of 4000 characters for combined name, description, and value properties for each command and its subcommands and groups
- Limitations on nesting subcommands and groups
- Global rate limit of 200 slash command creates per day per server
- Global rate limit of 200 slash command creates per day per server