diff --git a/src/plugins/muteNewGuild.tsx b/src/plugins/muteNewGuild.tsx index c1e43013..e77f64aa 100644 --- a/src/plugins/muteNewGuild.tsx +++ b/src/plugins/muteNewGuild.tsx @@ -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,