aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/muteNewGuild.tsx
diff options
context:
space:
mode:
authorRawir <45668076+Rawiros@users.noreply.github.com>2023-08-01 05:32:29 +0200
committerGitHub <noreply@github.com>2023-08-01 05:32:29 +0200
commit45bb1af0112c0671b77a49d7a6dea398e18fbd38 (patch)
tree84cc659330dbf8fcff5618ec54c2bc095ccb966b /src/plugins/muteNewGuild.tsx
parent39ad88f4337f4a81521ef4fac31a9ef1bae06ca0 (diff)
downloadVencord-45bb1af0112c0671b77a49d7a6dea398e18fbd38.tar.gz
Vencord-45bb1af0112c0671b77a49d7a6dea398e18fbd38.tar.bz2
Vencord-45bb1af0112c0671b77a49d7a6dea398e18fbd38.zip
MuteNewGuild: Support lurked guilds (#1546)
Co-authored-by: Rawiros <45668076+Rawiros@users.noreply.github.com01~>
Diffstat (limited to 'src/plugins/muteNewGuild.tsx')
-rw-r--r--src/plugins/muteNewGuild.tsx9
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,