Interface Definitions
- All Known Implementing Classes:
InteractionRegistry
This interface provides read-only access to the indexed Definitions which are used to build and execute interactions.
This may be useful if you want to build a help command for example or get access to individual metadata annotation on
your interaction controller classes (by using Invokable.classDescription()).
-
Method Summary
Modifier and TypeMethodDescriptionall()Gets allInteractionDefinitions that were indexed by JDA-Commands.default <T extends Definition>
SequencedCollection<T> Gets all registeredInteractionDefinitions matching the passed type<T extends Definition>
SequencedCollection<T> Gets a subset of all registeredInteractionDefinitionfiltered by their type and the passedPredicate.<T extends Definition>
T
-
Method Details
-
all
Collection<InteractionDefinition> all()Gets allInteractionDefinitions that were indexed by JDA-Commands.- Returns:
- an immutable collection of all indexes
InteractionDefinitions
-
find
Gets a subset of all registeredInteractionDefinitionfiltered by their type and the passedPredicate.- Parameters:
type- the type of the neededInteractionDefinitionspredicate- thePredicateto filter theInteractionDefinitions of the passed type- Returns:
- the
InteractionDefinitions matching the provided criteria
-
findFirst
- Parameters:
type- the type of the neededInteractionDefinitionpredicate- thePredicatethat has to match the neededInteractionDefinition- Returns:
- the frist
InteractionDefinitionmatching the provided criteria
-
find
Gets all registeredInteractionDefinitions matching the passed type- Parameters:
type- the type of the neededInteractionDefinition- Returns:
- the
InteractionDefinitions matching the provided type
-