aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2023-07-21 02:04:10 +1000
committerGitHub <noreply@github.com>2023-07-20 18:04:10 +0200
commit21f0a0cf7e373daca6ef2405ef9e05d1b625e0b8 (patch)
tree15b4ee3e4291d27d45c6416d82065d8667bacd9a /src/main
parent7dc0f62b31856a01663b580440ce8ec249179581 (diff)
downloadNotEnoughUpdates-21f0a0cf7e373daca6ef2405ef9e05d1b625e0b8.tar.gz
NotEnoughUpdates-21f0a0cf7e373daca6ef2405ef9e05d1b625e0b8.tar.bz2
NotEnoughUpdates-21f0a0cf7e373daca6ef2405ef9e05d1b625e0b8.zip
added lowest bin url to /neustats repo (#774)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/NEUStatsCommand.kt17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/NEUStatsCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/NEUStatsCommand.kt
index e17e856c..d5a39cb8 100644
--- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/NEUStatsCommand.kt
+++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/NEUStatsCommand.kt
@@ -188,18 +188,23 @@ class NEUStatsCommand {
private fun appendRepoStats(builder: DiscordMarkdownBuilder): DiscordMarkdownBuilder {
val apiData = NotEnoughUpdates.INSTANCE.config.apiData
- if (apiData.repoUser == "" || apiData.repoName == "" || apiData.repoBranch == "") {
- NotEnoughUpdates.INSTANCE.config.executeRunnable(23)
- NotEnoughUpdates.INSTANCE.config.executeRunnable(22)
- builder.append("", "")
+ if (apiData.repoUser.isEmpty() || apiData.repoName.isEmpty() || apiData.repoBranch.isEmpty()) {
+ apiData.repoUser = "NotEnoughUpdates"
+ apiData.repoName = "NotEnoughUpdates-REPO"
+ apiData.repoBranch = "master"
builder.category("Reset Repository location")
- builder.append("", "")
} else {
builder.category("Repo Stats")
builder.append("Last Commit", NotEnoughUpdates.INSTANCE.manager.latestRepoCommit)
- builder.append("Loaded Items", NotEnoughUpdates.INSTANCE.manager.itemInformation.size.toString())
builder.append("Repo Location", "https://github.com/${apiData.repoUser}/${apiData.repoName}/tree/${apiData.repoBranch}")
}
+ builder.append("Loaded Items", NotEnoughUpdates.INSTANCE.manager.itemInformation.size.toString())
+ if (apiData.moulberryCodesApi.isEmpty()) {
+ apiData.moulberryCodesApi = "moulberry.codes"
+ builder.category("Reset API location")
+ } else {
+ builder.append("Lowest Bin API Location", apiData.moulberryCodesApi)
+ }
return builder
}