Skip to content

Commit

Permalink
Move connection failed message to Admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Theaninova committed Jan 8, 2021
1 parent 4c4e4dc commit fcaa837
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 122 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/wulkanat.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

147 changes: 29 additions & 118 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'de.wulkanat'
version '1.4.2'
version '1.4.3'

repositories {
mavenCentral()
Expand Down
8 changes: 5 additions & 3 deletions src/main/kotlin/de/wulkanat/DiscordRpc.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ object DiscordRpc {
var jda: JDA? = null

fun updatePresence(available: Boolean) {
jda ?: return
// jda ?: return

jda!!.presence.activity = Activity.watching(if (available) Admin.message else Admin.offlineMessage)
jda!!.presence.isIdle = !available
// jda!!.presence.activity = Activity.watching(if (available) Admin.message else Admin.offlineMessage)
// jda!!.presence.isIdle = !available
// noop
if (available) Admin.println("Back online") else Admin.error("Gone offline", "Can't reach Hytale server")
}
}

0 comments on commit fcaa837

Please sign in to comment.