Class BotConfig
java.lang.Object
com.github.alex1304.ultimategdbot.api.BotConfig
public class BotConfig extends Object
Holds the bot's configuration.
- See Also:
builder(String)
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBotConfig.Builder -
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_COMMAND_PREFIXstatic StringDEFAULT_FLAG_PREFIXstatic DurationDEFAULT_INTERACTIVE_MENU_TIMEOUTstatic intDEFAULT_MESSAGE_CACHE_MAX_SIZEstatic intDEFAULT_REST_BUFFER_SIZEstatic DurationDEFAULT_REST_TIMEOUTstatic discord4j.discordjson.json.gateway.StatusUpdateDEFAULT_STATUS -
Method Summary
Modifier and Type Method Description static BotConfig.Builderbuilder(String token)Creates a new builder ofBotConfig.StringgetCommandPrefix()Gets the prefix to use for commands.Optional<discord4j.rest.util.Snowflake>getDebugLogChannelId()Gets the channel ID where the bot will send debug log messages, if present.Set<discord4j.rest.util.Snowflake>getEmojiGuildIds()Gets the guild IDs where the bot will look for emojis.StringgetFlagPrefix()Gets the prefix to use for command flags.DurationgetInteractiveMenuTimeout()Gets the timeout after which interactive menus will automatically close.intgetMessageCacheMaxSize()Gets the maximum size of the message cache.PaginationControlsgetPaginationControls()Gets the pagination controls to use for interactive menus.intgetRestBufferSize()Gets the buffer size for Discord REST requests.DurationgetRestTimeout()Gets the timeout to apply on each Discord REST request.discord4j.discordjson.json.gateway.StatusUpdategetStatus()Gets the initial bot's status.StringgetToken()Gets the bot token.
-
Field Details
-
DEFAULT_COMMAND_PREFIX
- See Also:
- Constant Field Values
-
DEFAULT_FLAG_PREFIX
- See Also:
- Constant Field Values
-
DEFAULT_STATUS
public static final discord4j.discordjson.json.gateway.StatusUpdate DEFAULT_STATUS -
DEFAULT_INTERACTIVE_MENU_TIMEOUT
-
DEFAULT_MESSAGE_CACHE_MAX_SIZE
public static final int DEFAULT_MESSAGE_CACHE_MAX_SIZE- See Also:
- Constant Field Values
-
DEFAULT_REST_TIMEOUT
-
DEFAULT_REST_BUFFER_SIZE
public static final int DEFAULT_REST_BUFFER_SIZE
-
-
Method Details
-
getToken
Gets the bot token.- Returns:
- the bot token
-
getCommandPrefix
Gets the prefix to use for commands.- Returns:
- the command prefix
-
getFlagPrefix
Gets the prefix to use for command flags.- Returns:
- the flag prefix
-
getDebugLogChannelId
Gets the channel ID where the bot will send debug log messages, if present.- Returns:
- the debug log channel ID, if present
-
getEmojiGuildIds
Gets the guild IDs where the bot will look for emojis.- Returns:
- the emoji guild IDs
-
getStatus
public discord4j.discordjson.json.gateway.StatusUpdate getStatus()Gets the initial bot's status.- Returns:
- the status
-
getPaginationControls
Gets the pagination controls to use for interactive menus.- Returns:
- the pagination controls
-
getInteractiveMenuTimeout
Gets the timeout after which interactive menus will automatically close.- Returns:
- the interactive menu timeout
-
getMessageCacheMaxSize
public int getMessageCacheMaxSize()Gets the maximum size of the message cache.- Returns:
- the message cache max size
-
getRestTimeout
Gets the timeout to apply on each Discord REST request.- Returns:
- the REST timeout
-
getRestBufferSize
public int getRestBufferSize()Gets the buffer size for Discord REST requests.- Returns:
- the REST buffer size
-
builder
Creates a new builder ofBotConfig.- Parameters:
token- the bot token- Returns:
- a new builder
- Throws:
NullPointerException- if token is null
-