diff options
Diffstat (limited to 'src/plugins/muteNewGuild.tsx')
-rw-r--r-- | src/plugins/muteNewGuild.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/muteNewGuild.tsx b/src/plugins/muteNewGuild.tsx index c1e4301..e77f64a 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, |