10.0.0
OVERALL LOGIC OF PLAGUBOT INITIALIZATION AND WORK HAS BEEN CHANGED
First of all, since this update PlaguBot
will use default StartPlugin
logic and will be built on top of it.
All special methods of Plugin
will be called from one of PlaguBot
initialization phases:
-
setupBotClient
will be called fromsingle
initialization oftelegramBot
(insetupDI
phase) -
setupBotPlugin
will be called fromstartPlugin
method in time ofbuildBehaviourWithFSM
initialization -
Plugin
:- Extension
Module.setupDI(Database,JsonObject)
has been dropped. Usedatabase
extension inModule.setupDI(JsonObject)
- Extension
-
Bot
:dev.inmo.plagubot.config.Config
lost itsplugins
section. Now you may retrieve plugins fromKoin
onlydefaultJsonFormat
becameWarning
feature due to the fact of its fully default naturePlaguBot
lost oldstart
method and took two new: withargs
asArray<String>
andinitialConfig
asJsonObject
Migration:
- If you are running bot and doing it using
StartPlugin
launcher, adddev.inmo.plagubot.PlaguBot
explicitly - In plugins: replace your
setupDI
overrides withDatabase
as argument by the same one, butdatabase
will be
available as extension insingle
orfactory
calls (as extension toScope
andKoin
)