From dc2ea3ff0b449489ee32bf066b9c8854791f5d86 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 6 Oct 2024 23:50:57 +0200 Subject: added support for custom_message --- .../java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt | 1 + src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt index 0fe893723..41d0f701c 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt @@ -11,6 +11,7 @@ data class RepoErrorData( @Expose @SerializedName("message_exact") private var rawMessageExact: List?, @Expose @SerializedName("message_starts_with") private var rawMessageStartsWith: List?, @Expose @SerializedName("replace_message") var replaceMessage: String?, + @Expose @SerializedName("custom_message") var customMessage: String?, @Expose @SerializedName("affected_versions") var affectedVersions: List = listOf(), ) { val messageExact get() = rawMessageExact ?: emptyList() diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt index fecdb6cdd..25b485c5a 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt @@ -190,6 +190,10 @@ object ErrorManager { finalMessage = it hideError = false } + repoError.customMessage?.let { + ChatUtils.userError(it) + return null + } break } } -- cgit