From 4301ed889d59d34f7b3364dfc9fc401cf412eae7 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 13 Aug 2024 01:50:17 -0300 Subject: [PATCH] Fix ShowHiddenThings feature & PauseInvitesForever --- src/plugins/pauseInvitesForever/index.tsx | 7 +------ src/plugins/showHiddenThings/index.ts | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/pauseInvitesForever/index.tsx b/src/plugins/pauseInvitesForever/index.tsx index 3f1ce6bf5..666f0af8e 100644 --- a/src/plugins/pauseInvitesForever/index.tsx +++ b/src/plugins/pauseInvitesForever/index.tsx @@ -19,16 +19,11 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; -import { findLazy } from "@webpack"; import { Constants, GuildStore, i18n, RestAPI } from "@webpack/common"; -const InvitesDisabledExperiment = findLazy(m => m.definition?.id === "2022-07_invites_disabled"); - function showDisableInvites(guildId: string) { - // Once the experiment is removed, this should keep working - const { enableInvitesDisabled } = InvitesDisabledExperiment?.getCurrentConfig?.({ guildId }) ?? { enableInvitesDisabled: true }; // @ts-ignore - return enableInvitesDisabled && !GuildStore.getGuild(guildId).hasFeature("INVITES_DISABLED"); + return !GuildStore.getGuild(guildId).hasFeature("INVITES_DISABLED"); } function disableInvites(guildId: string) { diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index f01dc2107..9ffaa7e14 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -51,7 +51,7 @@ export default definePlugin({ }, }, { - find: "2022-07_invites_disabled", + find: "INVITES_DISABLED))||", predicate: () => settings.store.showInvitesPaused, replacement: { match: /\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,