Move ShowHiddenThings fix

This commit is contained in:
Nuckyz 2025-01-27 20:21:28 -03:00
parent aa64267ddb
commit bb6d2f3d82
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 9 additions and 10 deletions

View file

@ -55,6 +55,14 @@ export default definePlugin({
match: /\i\.id===\i\.id\?null:/, match: /\i\.id===\i\.id\?null:/,
replace: "" 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]"
}
} }
], ],

View file

@ -65,16 +65,7 @@ export default definePlugin({
replace: "return true", 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? // Allows you to open mod view on yourself
{
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
{ {
find: 'action:"PRESS_MOD_VIEW",icon:', find: 'action:"PRESS_MOD_VIEW",icon:',
predicate: () => settings.store.showModView, predicate: () => settings.store.showModView,