ForwardAnywhere: Fix Patch

This commit is contained in:
thororen1234 2025-12-02 19:59:34 -05:00
parent bb8d5082e9
commit 533e49c4c1
No known key found for this signature in database
3 changed files with 5 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"name": "@equicord/types",
"private": false,
"version": "1.13.4",
"version": "1.13.6",
"description": "",
"types": "index.d.ts",
"scripts": {

View file

@ -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",
}
},
{

View file

@ -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<typeof import("ts-pattern"), "match" | "P"> = mapMangledModuleLazy("@ts-pattern/matcher", {
export const { match, P }: Pick<typeof TSPattern, "match" | "P"> = mapMangledModuleLazy("@ts-pattern/matcher", {
match: filters.byCode("return new"),
P: filters.byProps("when")
});