Record Class CommandDefinition.CommandConfig
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.definitions.interactions.command.CommandDefinition.CommandConfig
- Enclosing interface:
CommandDefinition
public static record CommandDefinition.CommandConfig(net.dv8tion.jda.api.interactions.InteractionContextType[] context, net.dv8tion.jda.api.interactions.IntegrationType[] integration, CommandScope scope, boolean isNSFW, net.dv8tion.jda.api.Permission[] enabledPermissions)
extends Record
Stores the configuration values for registering commands. This acts as a representation of
CommandConfig- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new CommandConfig using the following default values:CommandConfig(CommandConfig config) Constructs a new CommandConfig.CommandConfig(net.dv8tion.jda.api.interactions.InteractionContextType[] context, net.dv8tion.jda.api.interactions.IntegrationType[] integration, CommandScope scope, boolean isNSFW, net.dv8tion.jda.api.Permission[] enabledPermissions) Compact constructor ensuring thatcontextandintegrationis always set. -
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.interactions.InteractionContextType[]context()Returns the value of thecontextrecord component.net.dv8tion.jda.api.Permission[]Returns the value of theenabledPermissionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.dv8tion.jda.api.interactions.IntegrationType[]Returns the value of theintegrationrecord component.booleanisNSFW()Returns the value of theisNSFWrecord component.of(Consumer<CommandDefinition.CommandConfig.Builder> callback) Constructs a new CommandConfig after the givenConsumermodified theCommandDefinition.CommandConfig.Builder.scope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CommandConfig
public CommandConfig(net.dv8tion.jda.api.interactions.InteractionContextType[] context, net.dv8tion.jda.api.interactions.IntegrationType[] integration, CommandScope scope, boolean isNSFW, net.dv8tion.jda.api.Permission[] enabledPermissions) Compact constructor ensuring thatcontextandintegrationis always set. If empty defaults toInteractionContextType.GUILDandIntegrationType.GUILD_INSTALL. -
CommandConfig
public CommandConfig()Constructs a new CommandConfig using the following default values:
InteractionContextType.GUILDIntegrationType.GUILD_INSTALLCommandScope.GLOBAL- isNSFW:
false
-
CommandConfig
Constructs a new CommandConfig.- Parameters:
config- the@CommandConfigto represent
-
-
Method Details
-
of
public static CommandDefinition.CommandConfig of(Consumer<CommandDefinition.CommandConfig.Builder> callback) Constructs a new CommandConfig after the givenConsumermodified theCommandDefinition.CommandConfig.Builder. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
context
public net.dv8tion.jda.api.interactions.InteractionContextType[] context()Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
integration
public net.dv8tion.jda.api.interactions.IntegrationType[] integration()Returns the value of theintegrationrecord component.- Returns:
- the value of the
integrationrecord component
-
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
isNSFW
public boolean isNSFW()Returns the value of theisNSFWrecord component.- Returns:
- the value of the
isNSFWrecord component
-
enabledPermissions
public net.dv8tion.jda.api.Permission[] enabledPermissions()Returns the value of theenabledPermissionsrecord component.- Returns:
- the value of the
enabledPermissionsrecord component
-