Class JDACBuilderData
java.lang.Object
com.github.kaktushose.jda.commands.extension.JDACBuilderData
- Direct Known Subclasses:
JDACBuilder
Readonly view of a
JDACBuilder. Acts as a snapshot of the current builder state during jda-commands startup.- Implementation Note:
This class is used to give implementations of
Extensionaccess to properties involved in the creation ofJDACommands.Please note that this class only gives read not write access to the
JDACBuilder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class<?> protected Collection<ClassFinder> protected final JDAContextprotected @Nullable InteractionControllerInstantiatorprotected @Nullable Descriptorprotected @Nullable Embedsprotected Collection<EmojiSource> protected @Nullable ErrorMessageFactoryprotected ExpirationStrategyprotected final Map<Class<? extends Extension.Data>, Extension.Data> protected ExtensionFilterprotected CommandDefinition.CommandConfigprotected InteractionDefinition.ReplyConfigprotected @Nullable GuildScopeProviderprotected @Nullable Collection<Extension<Extension.Data>> protected booleanprotected @Nullable Localizerstatic final org.slf4j.Loggerprotected final Set<Map.Entry<Priority, Middleware>> protected final String[]protected @Nullable PermissionsProviderprotected booleanprotected final Map<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?, ?>> protected final Map<Class<? extends Annotation>, Validator<?, ?>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJDACBuilderData(Class<?> baseClass, String[] packages, JDAContext context) -
Method Summary
Modifier and TypeMethodDescriptionClass<?> the base class provided by the user for classpath scanningcontext()theJDAContextto be usedprotected Embedsembeds(MessageResolver messageResolver) i18n()booleanprotected MessageResolverString[]packages()the packages provided by the user for classpath scanningbooleanMap<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?, ?>> Map<Class<? extends Annotation>, Validator<?, ?>>
-
Field Details
-
log
public static final org.slf4j.Logger log -
baseClass
-
packages
-
context
-
loadedExtensions
-
extensionData
-
extensionFilter
-
controllerInstantiator
-
expirationStrategy
-
permissionsProvider
-
errorMessageFactory
-
guildScopeProvider
-
descriptor
-
localizer
-
emojiSources
-
classFinders
-
middlewares
-
validators
-
typeAdapters
protected final Map<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?,?>> typeAdapters -
globalReplyConfig
-
globalCommandConfig
-
shutdownJDA
protected boolean shutdownJDA -
localizeCommands
protected boolean localizeCommands -
embeds
-
-
Constructor Details
-
JDACBuilderData
-
-
Method Details
-
packages
the packages provided by the user for classpath scanning -
context
theJDAContextto be used -
baseClass
the base class provided by the user for classpath scanning -
globalReplyConfig
- Returns:
- the global
InteractionDefinition.ReplyConfigprovided by the user
-
globalCommandConfig
-
expirationStrategy
- Returns:
- the
ExpirationStrategyto be used
-
shutdownJDA
public boolean shutdownJDA()- Returns:
- whether the JDA instance should be shutdown if the configuration/start of JDA-Commands fails or
JDACommands.shutdown()is called.
-
localizeCommands
public boolean localizeCommands()- Returns:
- whether JDA-Commands should use the
I18nfeature to localize commands.
-
controllerInstantiator
- Returns:
- the
InteractionControllerInstantiatorto be used. Can be added via anExtension
-
localizer
-
permissionsProvider
- Returns:
- the
PermissionsProviderto be used. Can be added via anExtension
-
errorMessageFactory
- Returns:
- the
ErrorMessageFactoryto be used. Can be added via anExtension
-
guildScopeProvider
- Returns:
- the
GuildScopeProviderto be used. Can be added via anExtension
-
descriptor
- Returns:
- the
Descriptorto be used. Can be added via anExtension
-
classFinders
- Returns:
- the
ClassFinders to be used. Can be added via anExtension
-
emojiSources
- Returns:
- the
EmojiSources to be used. Can be added via anExtension
-
mergedClassFinder
- Returns:
- a
ClassFinderthat searches in allClassFinders returned byclassFinders()
-
middlewares
- Returns:
- the
Middlewares to be used. Can be added via anExtension
-
validators
-
typeAdapters
public Map<Map.Entry<io.github.kaktushose.proteus.type.Type<?>, io.github.kaktushose.proteus.type.Type<?>>, TypeAdapter<?,?>> typeAdapters()- Returns:
- the
TypeAdapters to be used. Can be added via anExtension
-
embeds
-
i18n
-
messageResolver
- Returns:
- the used
MessageResolverinstance
-