Fix patches with duplicate finds

This commit is contained in:
Nuckyz 2025-01-22 22:44:52 -03:00
parent ed99ae7f23
commit 30647b6bd9
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
6 changed files with 7 additions and 7 deletions

View file

@ -41,7 +41,7 @@ export default definePlugin({
}, },
{ {
// Status emojis // Status emojis
find: "#{intl::GUILD_OWNER}", find: "#{intl::GUILD_OWNER}),children:",
replacement: { replacement: {
match: /(?<=\.activityEmoji,.+?animate:)\i/, match: /(?<=\.activityEmoji,.+?animate:)\i/,
replace: "!0" replace: "!0"

View file

@ -27,7 +27,7 @@ export default definePlugin({
authors: [Devs.D3SOX, Devs.Nickyux], authors: [Devs.D3SOX, Devs.Nickyux],
patches: [ patches: [
{ {
find: "#{intl::GUILD_OWNER}", find: "#{intl::GUILD_OWNER}),children:",
replacement: { replacement: {
match: /,isOwner:(\i),/, match: /,isOwner:(\i),/,
replace: ",_isOwner:$1=$self.isGuildOwner(e)," replace: ",_isOwner:$1=$self.isGuildOwner(e),"

View file

@ -218,7 +218,7 @@ export default definePlugin({
}, },
// in the member list // in the member list
{ {
find: "#{intl::GUILD_OWNER}", find: "#{intl::GUILD_OWNER}),children:",
replacement: { replacement: {
match: /(?<type>\i)=\(null==.{0,100}\.BOT;return null!=(?<user>\i)&&\i\.bot/, match: /(?<type>\i)=\(null==.{0,100}\.BOT;return null!=(?<user>\i)&&\i\.bot/,
replace: "$<type> = $self.getTag({user: $<user>, channel: arguments[0].channel, origType: $<user>.bot ? 0 : null, location: 'not-chat' }); return typeof $<type> === 'number'" replace: "$<type> = $self.getTag({user: $<user>, channel: arguments[0].channel, origType: $<user>.bot ? 0 : null, location: 'not-chat' }); return typeof $<type> === 'number'"

View file

@ -55,7 +55,7 @@ export default definePlugin({
}, },
{ {
// Clicking on replied messages to jump // Clicking on replied messages to jump
find: "flash:!0,returnMessageId", find: '("interactionUsernameProfile',
replacement: [ replacement: [
{ {
match: /.\?(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/, match: /.\?(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,

View file

@ -108,7 +108,7 @@ export default definePlugin({
patches: [ patches: [
{ {
find: "#{intl::MESSAGE_ACTIONS_MENU_LABEL}", find: "#{intl::MESSAGE_ACTIONS_MENU_LABEL}),shouldHideMediaOptions:",
replacement: { replacement: {
match: /favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/, match: /favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,
replace: (m, target) => `${m}reverseImageSearchType:${target}.getAttribute("data-role"),` replace: (m, target) => `${m}reverseImageSearchType:${target}.getAttribute("data-role"),`

View file

@ -67,7 +67,7 @@ export default definePlugin({
}, },
// 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? // 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}", find: "#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}),allowOverflow:",
predicate: () => settings.store.showModView, predicate: () => settings.store.showModView,
replacement: { replacement: {
match: /(role:)\i(?=,guildId.{0,100}role:(\i\[))/, match: /(role:)\i(?=,guildId.{0,100}role:(\i\[))/,
@ -76,7 +76,7 @@ export default definePlugin({
}, },
// allows you to open mod view on yourself // allows you to open mod view on yourself
{ {
find: ".MEMBER_SAFETY,{modViewPanel:", find: 'action:"PRESS_MOD_VIEW",icon:',
predicate: () => settings.store.showModView, predicate: () => settings.store.showModView,
replacement: { replacement: {
match: /\i(?=\?null)/, match: /\i(?=\?null)/,