From d996f15bbeb599243032c34eaa9ad73dfd94538e Mon Sep 17 00:00:00 2001 From: Chiss5618 <78828070+Chiss5618@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:57:31 -0600 Subject: [PATCH] add elite button --- .../skyhanni/config/features/misc/DiscordRPCConfig.java | 5 +++++ .../features/misc/discordrpc/DiscordRPCManager.kt | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java index 6356945d49e8..28a62df2cca7 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/DiscordRPCConfig.java @@ -97,6 +97,11 @@ public String toString() { @ConfigEditorBoolean public Property showSkyCryptButton = Property.of(true); + @Expose + @ConfigOption(name = "Show Button for EliteBot", desc = "Add a button to the RPC that opens your EliteBot profile.") + @ConfigEditorBoolean + public Property showEliteBotButton = Property.of(true); + public enum LineEntry implements HasLegacyId { NOTHING("Nothing", 0), LOCATION("Location", 1), diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt index 6b7a6ad125df..23dd8e613658 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt @@ -135,6 +135,15 @@ object DiscordRPCManager : IPCListener { setStartTimestamp(startTimestamp) setLargeImage(discordIconKey, location) + if (config.showEliteBotButton.get()) { + addButton( + RichPresenceButton( + "https://elitebot.dev/@${LorenzUtils.getPlayerName()}/${HypixelData.profileName}", + "Open EliteBot", + ), + ) + } + if (config.showSkyCryptButton.get()) { addButton( RichPresenceButton(