From 73d1688f7e99a18f9f03e14588eacd8c7a377ea9 Mon Sep 17 00:00:00 2001 From: Chissl <78828070+Chissl@users.noreply.github.com> Date: Tue, 7 Jan 2025 11:53:57 -0600 Subject: [PATCH] Improvement: Add EliteBot profile link to rich presence (#3169) Co-authored-by: Chiss5618 <78828070+Chiss5618@users.noreply.github.com> --- .../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(