From edfff2a04d822c25c6167d5a21c5b285c60875bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Leki=C4=87?= Date: Thu, 12 Jan 2023 16:32:52 +0100 Subject: [PATCH 1/2] Dk what I was thinking here --- src/main/kotlin/tech/goksi/pterobot/PteroBot.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/tech/goksi/pterobot/PteroBot.kt b/src/main/kotlin/tech/goksi/pterobot/PteroBot.kt index 65989b4..2e9c2d2 100644 --- a/src/main/kotlin/tech/goksi/pterobot/PteroBot.kt +++ b/src/main/kotlin/tech/goksi/pterobot/PteroBot.kt @@ -86,7 +86,7 @@ class PteroBot { EmbedManager.init() jda = default(tokenPair.first!!, enableCoroutines = true, intents = listOf(GatewayIntent.GUILD_MESSAGES)) { disableCache(listOf(CacheFlag.VOICE_STATE, CacheFlag.STICKER, CacheFlag.EMOJI, CacheFlag.SCHEDULED_EVENTS)) - val statusStr = ConfigManager.config.getString("BotInfo.Status") ?: "ONLINE".uppercase() + val statusStr = ConfigManager.config.getString("BotInfo.Status")?.uppercase() ?: "ONLINE" setStatus(OnlineStatus.valueOf(statusStr)) if (ConfigManager.config.getBoolean("BotInfo.EnableActivity")) { val activityString = ConfigManager.config.getString("BotInfo.ActivityName") ?: "" From 4807508f5afd3f24b687a6b449a9a609f9eb808e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Leki=C4=87?= Date: Sun, 22 Jan 2023 16:45:37 +0100 Subject: [PATCH 2/2] Adding %allocationAlias placeholder --- pom.xml | 2 +- src/main/kotlin/tech/goksi/pterobot/entities/ServerInfo.kt | 1 + src/main/resources/embeds/server_info.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 83d5958..2f83cb3 100644 --- a/pom.xml +++ b/pom.xml @@ -227,7 +227,7 @@ com.github.Goksi Pterodactyl4J - 3c0200a + 0018d33 \ No newline at end of file diff --git a/src/main/kotlin/tech/goksi/pterobot/entities/ServerInfo.kt b/src/main/kotlin/tech/goksi/pterobot/entities/ServerInfo.kt index 851b843..0a5710c 100644 --- a/src/main/kotlin/tech/goksi/pterobot/entities/ServerInfo.kt +++ b/src/main/kotlin/tech/goksi/pterobot/entities/ServerInfo.kt @@ -16,6 +16,7 @@ data class ServerInfo(private val server: ClientServer) { val name: String = server.name val node: String = server.node val primaryAllocation: String = server.primaryAllocation.fullAddress + val allocationAlias: String = "${server.primaryAllocation.alias ?: server.primaryAllocation.ip}:${server.primaryAllocation.port}" private val utilization = try { server.retrieveUtilization().execute() } catch (exception: Exception) { diff --git a/src/main/resources/embeds/server_info.json b/src/main/resources/embeds/server_info.json index fc956f9..67bd9b5 100644 --- a/src/main/resources/embeds/server_info.json +++ b/src/main/resources/embeds/server_info.json @@ -25,7 +25,7 @@ }, { "name": "Allocation", - "value": "%primaryAllocation", + "value": "%allocationAlias", "inline": false }, {