Class BotConfig.Builder

  • Enclosing class:
    BotConfig

    public static class BotConfig.Builder
    extends Object
    • Method Detail

      • setDebugLogChannelId

        public BotConfig.Builder setDebugLogChannelId​(@Nullable
                                                      discord4j.rest.util.Snowflake debugLogChannelId)
        Sets the channel ID where the bot will send debug log messages.
        Parameters:
        debugLogChannelId - the debug log channel ID, may be null
        Returns:
        this builder
      • setEmojiGuildIds

        public BotConfig.Builder setEmojiGuildIds​(Set<discord4j.rest.util.Snowflake> emojiGuildIds)
        Sets the guild IDs where the bot will look for emojis.
        Parameters:
        emojiGuildIds - the emoji guild IDs
        Returns:
        this builder
        Throws:
        NullPointerException - if emojiGuildIds is null
      • setStatus

        public BotConfig.Builder setStatus​(@Nullable
                                           discord4j.discordjson.json.gateway.StatusUpdate status)
        Sets the initial bot's status.
        Parameters:
        status - the status, or null to use BotConfig.DEFAULT_STATUS
        Returns:
        this builder
      • setInteractiveMenuTimeout

        public BotConfig.Builder setInteractiveMenuTimeout​(@Nullable
                                                           Duration interactiveMenuTimeout)
        Sets the timeout after which interactive menus will automatically close.
        Parameters:
        interactiveMenuTimeout - the interactive menu timeout, or null to use BotConfig.DEFAULT_INTERACTIVE_MENU_TIMEOUT
        Returns:
        this builder
      • setMessageCacheMaxSize

        public BotConfig.Builder setMessageCacheMaxSize​(int messageCacheMaxSize)
        Sets the maximum size of the message cache.
        Parameters:
        messageCacheMaxSize - the message cache max size
        Returns:
        this builder
        Throws:
        IllegalArgumentException - if messageCacheMaxSize is negative
      • setRestBufferSize

        public BotConfig.Builder setRestBufferSize​(int restBufferSize)
        Sets the buffer size for Discord REST requests.
        Parameters:
        restBufferSize - the REST buffer size
        Returns:
        this builder
        Throws:
        IllegalArgumentException - if restBufferSize is zero or negative