Work In Progress
This documentation is in beta. It's missing lots of content, search is broken, and many links go nowhere. These problems will be fixed before release, but there's plenty of work left!
Skip to main content

General Settings

Configure your bot using the provided ExtensibleBot builder. This is Kord Extensions' entry point, and you should provide all of your bot's settings in this builder — including the settings explained by the other pages in this section.

ExtensibleBot(...) { ... }Receiver: ExtensibleBotBuilderFunction Returns: ExtensibleBot

Create and set up your bot, represented by the object returned by this function. Note: The bot won't start until you call the .start() or .startAsync() function.

Function Arguments
tokenType: String

Your bot's token, obtained from the developer dashboard.

General

var botVersionType: String?Default: null

Your bot's version.

Usually provided by the Gradle plugin, but you can also set it manually here.

var devModeType: BooleanDefault: false

Whether your bot is currently running in development mode.

Usually provided by the Gradle plugin, the devMode system property, the DEV_MODE environmental variable, or by setting the ENVIRONMENT environmental variable to dev or development. However, you can also set this manually here.

var dataCollectionModeType: DataCollectionDefault: Standard

Your bot's data collection mode.

Usually provided by the Gradle plugin, the dataCollection system property, or the DATA_COLLECTION environmental variable. However, you can also set this manually here.

For more information, see the data collection page.

Kord

customKordBuilder { ... }Receiver: KordBuilderLambda Returns: Kord

Replace Kord Extensions' default Kord object factory function.

This can be useful if you need to provide a customised Kord instance, but this won't be necessary for most bots.

Lambda Arguments
tokenType: String

Your bot's token, as configured previously.

Miscellaneous

var addDefaultHealthChecksType: BooleanDefault: true

Whether to add Kord Extensions' default health-checks to the health-check registry.

var koinLogLevelType: LevelDefault: ERROR

The logging level used by Koin. You shouldn't need to change this unless you need to debug Koin's internals.

Performance

var autoCompleteContextThreadsType: IntDefault: Runtime.availableProcessors()

Size of the thread-pool used to dispatch AutoCompleteInteractionCreateEvents to their corresponding registries.

var interactionContextThreadsType: IntDefault: Runtime.availableProcessors() * 2

Size of the thread-pool used to dispatch all InteractionCreateEvents to their corresponding registries.

kordEventFilter { ... }Receiver: EventLambda Returns: Boolean

Set your bot's event-filtering predicate for events created by Kord. Returning false from your predicate will prevent Kord Extensions from processing that event, which may help with performance in some situations.

This won't filter events created by Kord Extensions, or any loaded extensions. Your bot may only have one Kord event predicate registered at once --- this function will overwrite the previously registered predicate, if one was set.

kordExEventFilter { ... }Receiver: EventLambda Returns: Boolean

Set your bot's event-filtering predicate for events created by Kord Extensions. Returning false from your predicate will prevent Kord Extensions from processing that event, which may help with performance in some situations.

This won't filter events created by Kord. Your bot may only have one Kord Extensions event predicate registered at once --- this function will overwrite the previously registered predicate, if one was set.