- java.lang.Object
-
- com.github.alex1304.ultimategdbot.api.Plugin.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Plugin.Builder
addGuildConfigExtension(Class<? extends GuildConfigDao<?>> extensionClass)
Adds a database extension class useful to retrieve configuration for a guild.Plugin
build()
Builds the plugin instance.Plugin.Builder
onReady(Supplier<? extends reactor.core.publisher.Mono<Void>> onReady)
Sets a callback to invoke when the bot is ready.Plugin.Builder
setCommandProvider(CommandProvider commandProvider)
Sets the command provider for this plugin.
-
-
-
Method Detail
-
addGuildConfigExtension
public Plugin.Builder addGuildConfigExtension(Class<? extends GuildConfigDao<?>> extensionClass)
Adds a database extension class useful to retrieve configuration for a guild.- Parameters:
extensionClass
- the class of the extension- Returns:
- this builder
-
setCommandProvider
public Plugin.Builder setCommandProvider(CommandProvider commandProvider)
Sets the command provider for this plugin.- Parameters:
commandProvider
- the command provider- Returns:
- this builder
-
onReady
public Plugin.Builder onReady(Supplier<? extends reactor.core.publisher.Mono<Void>> onReady)
Sets a callback to invoke when the bot is ready. The Mono generated by the supplier is subscribed to when the bot is ready.- Parameters:
onReady
- the callback to run on ready- Returns:
- this builder
-
build
public Plugin build()
Builds the plugin instance.- Returns:
- the plugin instance
-
-