mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-08 08:56:22 +00:00
ShowHiddenThings: Discovery filter bypass is patched
Filtering is now done server-side in Discord
This commit is contained in:
parent
9ccc74bde3
commit
cca5d7dc09
1 changed files with 4 additions and 41 deletions
|
@ -30,9 +30,7 @@ const opt = (description: string) => ({
|
|||
const settings = definePluginSettings({
|
||||
showTimeouts: opt("Show member timeout icons in chat."),
|
||||
showInvitesPaused: opt("Show the invites paused tooltip in the server list."),
|
||||
showModView: opt("Show the member mod view context menu item in all servers."),
|
||||
disableDiscoveryFilters: opt("Disable filters in Server Discovery search that hide servers that don't meet discovery criteria."),
|
||||
disableDisallowedDiscoveryFilters: opt("Disable filters in Server Discovery search that hide NSFW & disallowed servers."),
|
||||
showModView: opt("Show the member mod view context menu item in all servers.")
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
|
@ -40,6 +38,8 @@ export default definePlugin({
|
|||
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
||||
description: "Displays various hidden & moderator-only things regardless of permissions.",
|
||||
authors: [Devs.Dolfies],
|
||||
settings,
|
||||
|
||||
patches: [
|
||||
{
|
||||
find: "showCommunicationDisabledStyles",
|
||||
|
@ -82,43 +82,6 @@ export default definePlugin({
|
|||
match: /\i(?=\?null)/,
|
||||
replace: "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: "prod_discoverable_guilds",
|
||||
predicate: () => settings.store.disableDiscoveryFilters,
|
||||
replacement: {
|
||||
match: /\{"auto_removed:.*?\}/,
|
||||
replace: "{}"
|
||||
}
|
||||
},
|
||||
// remove the 200 server minimum
|
||||
{
|
||||
find: '">200"',
|
||||
predicate: () => settings.store.disableDiscoveryFilters,
|
||||
replacement: {
|
||||
match: '">200"',
|
||||
replace: '">0"'
|
||||
}
|
||||
},
|
||||
// empty word filter
|
||||
{
|
||||
find: '"pepe","nude"',
|
||||
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
||||
replacement: {
|
||||
match: /(?<=[?=])\["pepe",.+?\]/,
|
||||
replace: "[]",
|
||||
},
|
||||
},
|
||||
// patch request that queries if term is allowed
|
||||
{
|
||||
find: ".GUILD_DISCOVERY_VALID_TERM,query:",
|
||||
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
||||
all: true,
|
||||
replacement: {
|
||||
match: /\i\.\i\.get\(\{url:\i\.\i\.GUILD_DISCOVERY_VALID_TERM,query:\{term:\i\},oldFormErrors:!0,rejectWithError:!1\}\)/g,
|
||||
replace: "Promise.resolve({ body: { valid: true } })"
|
||||
}
|
||||
}
|
||||
],
|
||||
settings,
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue