MuteNewGuild: Support lurked guilds (#1546)

Co-authored-by: Rawiros <45668076+Rawiros@users.noreply.github.com01~>
This commit is contained in:
Rawir 2023-08-01 05:32:29 +02:00 committed by GitHub
parent 39ad88f433
commit 45bb1af011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ const settings = definePluginSettings({
description: "Suppress All Role @mentions",
type: OptionType.BOOLEAN,
default: true
},
}
});
export default definePlugin({
@ -50,6 +50,13 @@ export default definePlugin({
match: /INVITE_ACCEPT_SUCCESS.+?;(\i)=null.+?;/,
replace: (m, guildId) => `${m}$self.handleMute(${guildId});`
}
},
{
find: "{joinGuild:function",
replacement: {
match: /guildId:(\w+),lurker:(\w+).{0,20}\)}\)\);/,
replace: (m, guildId, lurker) => `${m}if(!${lurker})$self.handleMute(${guildId});`
}
}
],
settings,