From 8e70c73a76d3e6d061b11af01520898ab3b54387 Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Sun, 23 Feb 2020 13:17:45 +0100 Subject: [PATCH] I'm positively crying... --- src/main/kotlin/nl/voidcorp/discord/events/OttoListener.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/nl/voidcorp/discord/events/OttoListener.kt b/src/main/kotlin/nl/voidcorp/discord/events/OttoListener.kt index 536b20f..407689f 100644 --- a/src/main/kotlin/nl/voidcorp/discord/events/OttoListener.kt +++ b/src/main/kotlin/nl/voidcorp/discord/events/OttoListener.kt @@ -7,6 +7,7 @@ import net.dv8tion.jda.api.hooks.ListenerAdapter import nl.voidcorp.discord.logger import nl.voidcorp.discord.storage.ConfigStore import org.springframework.stereotype.Service +import kotlin.system.exitProcess @Service class OttoListener(val configStore: ConfigStore) : ListenerAdapter() { @@ -18,6 +19,7 @@ class OttoListener(val configStore: ConfigStore) : ListenerAdapter() { val id = event.jda.shardInfo!!.shardId val reconn = event.responseNumber val version = configStore.version + if(reconn >=10) exitProcess(0) event.jda.presence.activity = Activity.playing("v$version ($id~$reconn)") }