Interface InteractionDefinition
- All Superinterfaces:
Definition, Invokable
- All Known Subinterfaces:
CommandDefinition, ComponentDefinition<T>, SelectMenuDefinition<T>
- All Known Implementing Classes:
AutoCompleteDefinition, ButtonDefinition, ContextCommandDefinition, EntitySelectMenuDefinition, ModalDefinition, SlashCommandDefinition, StringSelectMenuDefinition
public sealed interface InteractionDefinition
extends Definition, Invokable
permits AutoCompleteDefinition, ModalDefinition, CommandDefinition, ComponentDefinition<T>
Common interface for all definitions that represent an interaction.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordStores the configuration values for sending replies. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateDefinitionId(String className, String methodName) Creates a definition id from the classname and method namedefault StringThe id for this definition.A possibly-emptyCollectionof permissions for this interaction.Methods inherited from interface Definition
displayNameMethods inherited from interface Invokable
classDescription, invoke, methodDescription
-
Method Details
-
createDefinitionId
Creates a definition id from the classname and method name- Parameters:
className- the classname (Class.getName()orClassDescription.name())methodName- the method name (Method.getName()orMethodDescription.name())- Returns:
- the definition id
-
definitionId
The id for this definition. For interaction definition this is the hash code of the full class name and method name combined.- Specified by:
definitionIdin interfaceDefinition
-
permissions
Collection<String> permissions()A possibly-emptyCollectionof permissions for this interaction.- API Note:
- The
PermissionsMiddlewarewill validate the provided permissions.
-