mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-11 02:16:23 +00:00
Initial commit
This commit is contained in:
parent
f686cba398
commit
90a0ed7249
1 changed files with 27 additions and 0 deletions
27
src/plugins/rpcTypeEditor/index.tsx
Normal file
27
src/plugins/rpcTypeEditor/index.tsx
Normal file
|
@ -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;
|
||||||
|
},
|
||||||
|
});
|
Loading…
Reference in a new issue