EquicordHelper: showYourOwnActivityButtons setting

This commit is contained in:
thororen1234 2025-12-14 15:24:53 -05:00
parent 96b9c7e713
commit 7905a49072
No known key found for this signature in database
2 changed files with 16 additions and 1 deletions

View file

@ -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 (

View file

@ -231,7 +231,7 @@ export default definePlugin({
replacement: {
match: /.getId\(\)===\i.id/,
replace: "$& && false"
}
},
}
],