From 90a0ed72492fdae903ec4bc2d614e4f1d9b3d726 Mon Sep 17 00:00:00 2001 From: nin0dev Date: Wed, 22 May 2024 07:28:13 -0400 Subject: [PATCH] Initial commit --- src/plugins/rpcTypeEditor/index.tsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/plugins/rpcTypeEditor/index.tsx diff --git a/src/plugins/rpcTypeEditor/index.tsx b/src/plugins/rpcTypeEditor/index.tsx new file mode 100644 index 000000000..5a4f4dd66 --- /dev/null +++ b/src/plugins/rpcTypeEditor/index.tsx @@ -0,0 +1,27 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "RPCTypeEditor", + description: "Allows editing the type of any Rich Presence. (Configure in settings)", + authors: [Devs.nin0dev], + + patches: [ + { + find: "LocalActivityStore", + replacement: { + match: /LOCAL_ACTIVITY_UPDATE:function\((\i)\)\{/, + replace: "$&$self.patchActivity($1.activity);", + } + } + ], + patchActivity(activity: any) { + activity.type = 2; + }, +});