Bot context diagram

The bot can also provide the ability to remember some data through the UserData and ClassData interfaces.

By default, implementation is provided through ConcurrentHashMap but can be changed to your own through UserData and ClassData interfaces using the data storage tools of your choice.

[!CAUTION] Don't forget to hit gradle kspKotlin/or any relevant ksp task to make required codegen bindings available.

To change, all you need to do is put under your implementation @CtxProvider annotation and run gradle ksp task (or build).

@CtxProvider
class MyRedis : UserData<String> {
    // ...
}

See also