Kord Extensions Help

Kord Customization

For advanced use-cases, Kord Extensions allows you to customize the underlying Kord instance in a number of ways.

Builders

Builder

Receiver

Parameters

Description

customKordBuilder

token: String, builder: KordBuilder.()

Register a callable that constructs and returns a Kord instance. This is intended to be used to replace the Kord instance with a subtype.

Note: Failure to call the supplied builder parameter will prevent Kord Extensions from running its own KordBuilder hooks, or those that were registered via the kord function.

eventFilter

Event

Register a predicate which filters Kord events from the Kord Extensions events flow, which may be an optimization in some situations.

Only one predicate may be registered. Registering a new predicate will overwrite the previous one.

kord

KordBuilder

Register a hook that allows you to directly interact with the KordBuilder being used to construct the current Kord instance, allowing you to customize it without replacing the Kord with your own custom subtype.

Registered hooks will be run in order after Kord Extensions' own hooks, so you can use this to override the changes it makes if required.

Last modified: 20 November 2024