Skip to content

Commit

Permalink
Merge pull request #20 from Goksi/main
Browse files Browse the repository at this point in the history
Merge main branch
  • Loading branch information
Goksi authored Jan 27, 2023
2 parents 47cdaa3 + 7c7dd6c commit 64b7e5a
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -227,7 +227,7 @@
<dependency>
<groupId>com.github.Goksi</groupId>
<artifactId>Pterodactyl4J</artifactId>
<version>3c0200a</version>
<version>0018d33</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion src/main/kotlin/tech/goksi/pterobot/PteroBot.kt
Original file line number Diff line number Diff line change
@@ -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") ?: ""
1 change: 1 addition & 0 deletions src/main/kotlin/tech/goksi/pterobot/entities/ServerInfo.kt
Original file line number Diff line number Diff line change
@@ -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) {
2 changes: 1 addition & 1 deletion src/main/resources/embeds/server_info.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
},
{
"name": "Allocation",
"value": "%primaryAllocation",
"value": "%allocationAlias",
"inline": false
},
{

0 comments on commit 64b7e5a

Please sign in to comment.