Fix lateinit property initialization order
This commit is contained in:
parent
e7f47b7420
commit
ba913f2bed
|
@ -38,6 +38,7 @@ object Kagebot {
|
|||
|
||||
fun init() {
|
||||
val api = DiscordApiBuilder().setToken(secret).login().join()
|
||||
Globals.api = api
|
||||
try {
|
||||
ConfigParser.initialLoad(RawConfig.read())
|
||||
} catch (e: IllegalArgumentException) {
|
||||
|
@ -53,6 +54,5 @@ object Kagebot {
|
|||
api.addMessageCreateListener { checked { it.process() } }
|
||||
Config.features.eventFeatures().forEach { it.register(api) }
|
||||
CronD.startAll()
|
||||
Globals.api = api
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user