Commands Plugin
This plugin has been created for centralized work with commands in context of Plugins system of plagubot. Pass BotCommandFullInfo in your Plugin.setupDI section to declare some command. You may use CommandsKeeper for flexible setup of commands in runtime.
Functions
Link copied to clipboard
Uses CommandsKeeper from koin. Subscribe on CommandsKeeper.scopesCommands to follow changed in scopes and take all the available keys in the CommandsKeeper and set commands for each key
open suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin)
Content copied to clipboard
Link copied to clipboard
Creating CommandsKeeper and pass it to the DI. It uses org.koin.core.scope.Scope.getAll to get all the BotCommandFullInfo instances declared in the DI.