Class BaseCommand<T extends BaseCommand<T>>
java.lang.Object
net.dv8tion.jda.api.interactions.commands.build.BaseCommand<T>
- All Implemented Interfaces:
SerializableData
- Direct Known Subclasses:
SubcommandData
public abstract class BaseCommand<T extends BaseCommand<T>>
extends Object
implements SerializableData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe configured descriptiongetName()
The configured nameThe options for this command.setDescription
(String description) Configure the descriptionConfigure the nametoData()
SerializedDataObject
for this object.
-
Constructor Details
-
BaseCommand
-
-
Method Details
-
setName
Configure the name- Parameters:
name
- The lowercase alphanumeric (with dash) name, 1-32 characters- Returns:
- The builder, for chaining
- Throws:
IllegalArgumentException
- If the name is null, not alphanumeric, or not between 1-32 characters
-
setDescription
Configure the description- Parameters:
description
- The description, 1-100 characters- Returns:
- The builder, for chaining
- Throws:
IllegalArgumentException
- If the name is null or not between 1-100 characters
-
getName
The configured name- Returns:
- The name
-
getDescription
The configured description- Returns:
- The description
-
getOptions
The options for this command.- Returns:
- Immutable list of
OptionData
-
toData
Description copied from interface:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Returns:
DataObject
-