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

Improve implementation of command data #2258

Merged
merged 3 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,20 @@
public interface CommandData extends SerializableData
{
/**
* The maximum length the name of a command can be.
* The maximum length the name of a command can be. ({@value})
*/
int MAX_NAME_LENGTH = 32;

/**
* The maximum length the description of a command can be.
* The maximum length the description of a command can be. ({@value})
*/
int MAX_DESCRIPTION_LENGTH = 100;

/**
* The maximum amount of options/subcommands/groups that can be added to a command or subcommand. ({@value})
*/
int MAX_OPTIONS = 25;

/**
* Sets the {@link LocalizationFunction} for this command
* <br>This enables you to have the entirety of this command to be localized.
Expand All @@ -68,10 +73,10 @@ public interface CommandData extends SerializableData
* Configure the command name.
*
* @param name
* The name, 1-32 characters (lowercase and alphanumeric for {@link Command.Type#SLASH})
* The name, 1-{@value #MAX_NAME_LENGTH} characters (lowercase and alphanumeric for {@link Command.Type#SLASH})
*
* @throws IllegalArgumentException
* If the name is not between 1-32 characters long, or not lowercase and alphanumeric for slash commands
* If the name is not between 1-{@value #MAX_NAME_LENGTH} characters long, or not lowercase and alphanumeric for slash commands
*
* @return The builder instance, for chaining
*/
Expand Down
Loading