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.<T extends Definition>
Collection<T> Gets a subset of all registered
InteractionDefinitionfiltered by theirinvalid reference
type
and the passed
Predicate.<T extends Definition>
TGets the first
InteractionDefinitionwith the giventhatinvalid reference
type
match the passed
Predicate
-
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 registered
InteractionDefinitionfiltered by theirinvalid reference
type
and the passed
Predicate.- Parameters:
type-the
of the neededinvalid reference
type
InteractionDefinitionspredicate- thePredicateto filter theInteractionDefinitions of the passed type- Returns:
- the
InteractionDefinitions matching the provided criteria
-
findFirst
Gets the first
InteractionDefinitionwith the giventhatinvalid reference
type
match the passed
Predicate- Parameters:
type-the
of the neededinvalid reference
type
InteractionDefinitionpredicate- thePredicatethat has to match the neededInteractionDefinition- Returns:
- the frist
InteractionDefinitionmatching the provided criteria
-