diff --git a/packages/vencord-types/package.json b/packages/vencord-types/package.json index 887d7f4ce..d5eb7776f 100644 --- a/packages/vencord-types/package.json +++ b/packages/vencord-types/package.json @@ -1,7 +1,7 @@ { "name": "@equicord/types", "private": false, - "version": "1.13.4", + "version": "1.13.6", "description": "", "types": "index.d.ts", "scripts": { diff --git a/src/equicordplugins/forwardAnywhere/index.ts b/src/equicordplugins/forwardAnywhere/index.ts index 9a3b9da5e..4b1a4dd4e 100644 --- a/src/equicordplugins/forwardAnywhere/index.ts +++ b/src/equicordplugins/forwardAnywhere/index.ts @@ -31,8 +31,8 @@ export default definePlugin({ { find: "#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED}", replacement: { - match: /if\(.{0,50}\)(return.{0,25}#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED})/, - replace: "if(false)$1", + match: /(\{if\().{0,50}(\)return.{0,25}#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED})/, + replace: "$1false$2", } }, { diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 9ad235e8f..5d527ca6f 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -18,6 +18,7 @@ import type * as t from "@vencord/discord-types"; import { _resolveReady, filters, findByCodeLazy, findByPropsLazy, findLazy, mapMangledModuleLazy, waitFor } from "@webpack"; +import type * as TSPattern from "ts-pattern"; export let FluxDispatcher: t.FluxDispatcher; waitFor(["dispatch", "subscribe"], m => { @@ -51,7 +52,7 @@ export const useDrag = findByCodeLazy("useDrag::spec.begin was deprecated"); // you cant make a better finder i love that they remove display names sm export const useDrop = findByCodeLazy(".options);return", ".collect,"); -export const { match, P }: Pick = mapMangledModuleLazy("@ts-pattern/matcher", { +export const { match, P }: Pick = mapMangledModuleLazy("@ts-pattern/matcher", { match: filters.byCode("return new"), P: filters.byProps("when") });