From 21f0a0cf7e373daca6ef2405ef9e05d1b625e0b8 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Fri, 21 Jul 2023 02:04:10 +1000 Subject: added lowest bin url to /neustats repo (#774) --- .../notenoughupdates/commands/dev/NEUStatsCommand.kt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/main') 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 } -- cgit