Class Plugin.Builder

  • Enclosing class:
    Plugin

    public static class Plugin.Builder
    extends Object
    • 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