From 6e2262a5d36e9659ec5a29f3907b8bbdd1bc6b89 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:16:52 -0400 Subject: [PATCH] feat(plugin): DisableCameras by Joona --- README.md | 1 + src/equicordplugins/disableCameras/index.tsx | 23 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/equicordplugins/disableCameras/index.tsx diff --git a/README.md b/README.md index 80411982..9bc15a5f 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - CutePats by thororen - DeadMembers by Kyuuhachi - Demonstration by Samwich +- DisableCameras by Joona - DNDWhilePlaying by thororen - DoNotLeak by Perny - DontFilterMe by Samwich diff --git a/src/equicordplugins/disableCameras/index.tsx b/src/equicordplugins/disableCameras/index.tsx new file mode 100644 index 00000000..636844f5 --- /dev/null +++ b/src/equicordplugins/disableCameras/index.tsx @@ -0,0 +1,23 @@ +/* + * 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: "DisableCameras", + description: "Disables cameras in a call by default", + authors: [Devs.Joona], + patches: [ + { + find: 'logger.error("Connect called', + replacement: { + match: /case 12:this.emit\("video",(\i\.user_id).+?;/, + replace: '$&findByProps("setDisableLocalVideo").setDisableLocalVideo($1, "DISABLED");' + } + } + ] +});