mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2025-09-09 02:00:05 +00:00
fixes/fill of docs
This commit is contained in:
@@ -25,9 +25,19 @@ interface Plugin {
|
||||
database: Database,
|
||||
params: JsonObject
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Override this method in cases when you want to declare common bot behaviour. In case you wish to use FSM, you
|
||||
* should override the method with receiver [BehaviourContextWithFSM]
|
||||
*/
|
||||
suspend fun BehaviourContext.setupBotPlugin(
|
||||
koin: Koin
|
||||
) {}
|
||||
/**
|
||||
* Override this method in cases when you want to declare full behaviour of the plugin. It is recommended to declare
|
||||
* common logic of plugin in the [setupBotPlugin] with [BehaviourContext] receiver and use override this one
|
||||
* for the FSM configuration
|
||||
*/
|
||||
suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin) {
|
||||
(this as BehaviourContext).setupBotPlugin(koin)
|
||||
}
|
||||
|
Reference in New Issue
Block a user