Merge branch 'feat/what' into 'master'

I'm positively crying...

See merge request jdejeu/ottobotv2!17
This commit is contained in:
Julius 2020-02-23 12:20:44 +00:00
commit ad0fba90bc

View file

@ -7,6 +7,7 @@ import net.dv8tion.jda.api.hooks.ListenerAdapter
import nl.voidcorp.discord.logger import nl.voidcorp.discord.logger
import nl.voidcorp.discord.storage.ConfigStore import nl.voidcorp.discord.storage.ConfigStore
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import kotlin.system.exitProcess
@Service @Service
class OttoListener(val configStore: ConfigStore) : ListenerAdapter() { class OttoListener(val configStore: ConfigStore) : ListenerAdapter() {
@ -18,6 +19,7 @@ class OttoListener(val configStore: ConfigStore) : ListenerAdapter() {
val id = event.jda.shardInfo!!.shardId val id = event.jda.shardInfo!!.shardId
val reconn = event.responseNumber val reconn = event.responseNumber
val version = configStore.version val version = configStore.version
if(reconn >=10) exitProcess(0)
event.jda.presence.activity = Activity.playing("v$version ($id~$reconn)") event.jda.presence.activity = Activity.playing("v$version ($id~$reconn)")
} }