Skip to content

Commit

Permalink
finish updooter
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeine01 committed Jun 5, 2022
1 parent ee3d4cd commit 76f4f8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main/kotlin/org/caffeine/chaos/LoginPrompt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ suspend fun loginPrompt(client: Client) = coroutineScope {
println("\u001B[38;5;255mGuilds: \u001B[38;5;33m$guilds")
//prints line separator lol
printSeparator()
//checks if client is up to date
if (client.config.updater.enabled) {
update(client)
}
}
4 changes: 4 additions & 0 deletions src/main/kotlin/org/caffeine/chaos/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ suspend fun main(): Unit = coroutineScope {
//web ui benched for now
/* val ui = WebUI()
launch { ui.init(client) } */
//checks if client is up to date
if (client.config.updater.enabled) {
update(client)
}
client.login(config)
} catch (e: Exception) {
//if it cant read the config then it logs that its invalid
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/org/caffeine/chaos/Updoot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ suspend fun update(client: Client) = coroutineScope{
}
}
}
return@coroutineScope
}
log("\u001B[38;5;47mClient is up to date!", "UPDATER:")
}

private suspend fun updateStatus(): Updoot {
Expand Down

0 comments on commit 76f4f8c

Please sign in to comment.