diff --git a/src/equicordplugins/equicordHelper/index.tsx b/src/equicordplugins/equicordHelper/index.tsx index 303ed429a..f217042fe 100644 --- a/src/equicordplugins/equicordHelper/index.tsx +++ b/src/equicordplugins/equicordHelper/index.tsx @@ -4,7 +4,9 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import { isPluginEnabled } from "@api/PluginManager"; import { definePluginSettings } from "@api/Settings"; +import customRPC from "@plugins/customRPC"; import { Devs, EquicordDevs, GUILD_ID, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, VC_SUPPORT_CHANNEL_IDS } from "@utils/constants"; import { isAnyPluginDev } from "@utils/misc"; import definePlugin, { OptionType } from "@utils/types"; @@ -31,6 +33,11 @@ const settings = definePluginSettings({ type: OptionType.BOOLEAN, description: "Removes the activity section above member list", default: false, + }, + showYourOwnActivityButtons: { + type: OptionType.BOOLEAN, + description: "Discord hides your own activity buttons for some reason", + default: false, } }); @@ -115,6 +122,14 @@ export default definePlugin({ }, ] })), + { + find: ".buttons.length)>=1", + predicate: () => settings.store.showYourOwnActivityButtons && !isPluginEnabled(customRPC.name), + replacement: { + match: /.getId\(\)===\i.id/, + replace: "$& && false" + } + } ], renderMessageAccessory(props) { return ( diff --git a/src/plugins/customRPC/index.tsx b/src/plugins/customRPC/index.tsx index c522eb38f..f87f84ed2 100644 --- a/src/plugins/customRPC/index.tsx +++ b/src/plugins/customRPC/index.tsx @@ -231,7 +231,7 @@ export default definePlugin({ replacement: { match: /.getId\(\)===\i.id/, replace: "$& && false" - } + }, } ],