From bb6d2f3d8272a3c137c6cc7cb503bf072135d99d Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:21:28 -0300 Subject: [PATCH] Move ShowHiddenThings fix --- src/plugins/_core/discordFixes/index.tsx | 8 ++++++++ src/plugins/showHiddenThings/index.ts | 11 +---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/plugins/_core/discordFixes/index.tsx b/src/plugins/_core/discordFixes/index.tsx index ecbc1f581..62c1e380d 100644 --- a/src/plugins/_core/discordFixes/index.tsx +++ b/src/plugins/_core/discordFixes/index.tsx @@ -55,6 +55,14 @@ export default definePlugin({ match: /\i\.id===\i\.id\?null:/, replace: "" } + }, + // Fixes mod view depending on Members page being loaded to acquire the member highest role + { + find: "#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}),allowOverflow:", + replacement: { + match: /(role:)\i(?=,guildId.{0,100}role:(\i\[))/, + replace: "$1$2arguments[0].member.highestRoleId]" + } } ], diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index d80691fef..dd0475625 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -65,16 +65,7 @@ export default definePlugin({ replace: "return true", } }, - // fixes a bug where Members page must be loaded to see highest role, why is Discord depending on MemberSafetyStore.getEnhancedMember for something that can be obtained here? - { - find: "#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}),allowOverflow:", - predicate: () => settings.store.showModView, - replacement: { - match: /(role:)\i(?=,guildId.{0,100}role:(\i\[))/, - replace: "$1$2arguments[0].member.highestRoleId]", - } - }, - // allows you to open mod view on yourself + // Allows you to open mod view on yourself { find: 'action:"PRESS_MOD_VIEW",icon:', predicate: () => settings.store.showModView,