feat: added time delay to allow for lavalink to start in docker container, added debug flag to skip the wait, if in dev env

This commit is contained in:
moonleay 2023-12-13 18:19:32 +01:00
parent 232a854863
commit ae507dc4aa
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -19,9 +19,11 @@
package net.moonleay.botendo
import net.moonleay.botendo.util.Logger
///Show the splash and launch the Bot
suspend fun main() {
suspend fun main(args: Array<String>) {
println(
"M#\"\"\"\"\"\"\"'M dP dP \n" +
"## mmmm. `M 88 88 \n" +
@ -33,5 +35,9 @@ suspend fun main() {
" "
)
println("Bot v.${net.moonleay.botendo.build.BuildConstants.version}, Kord Extensions v.${net.moonleay.botendo.build.BuildConstants.kordVersion}, LavaKord v.${net.moonleay.botendo.build.BuildConstants.lavaVersion}, Coroutines v.${net.moonleay.botendo.build.BuildConstants.coroutinesVersion}")
if(args.isEmpty() || args[0] != "--debug") {
Logger.out("Waiting 10 seconds for Lavalink to start...")
Thread.sleep(10000)
}
Bot.start()
}