From 489ed5527c6848032a9d9f36deacac84dd3d9af0 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sat, 24 May 2025 20:54:03 -0400 Subject: [PATCH] Add Back Deleted Plugins --- README.md | 6 +- src/equicordplugins/moreKaomoji/index.ts | 216 ++++++++++++++++++ src/equicordplugins/moyai/index.ts | 175 ++++++++++++++ .../noRPC.discordDesktop/index.ts | 23 ++ .../partyMode/index.ts | 0 5 files changed, 419 insertions(+), 1 deletion(-) create mode 100644 src/equicordplugins/moreKaomoji/index.ts create mode 100644 src/equicordplugins/moyai/index.ts create mode 100644 src/equicordplugins/noRPC.discordDesktop/index.ts rename src/{plugins => equicordplugins}/partyMode/index.ts (100%) diff --git a/README.md b/README.md index 595f20ed..c3fd00c3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch ### Extra included plugins
-175 additional plugins +181 additional plugins ### All Platforms @@ -109,9 +109,11 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - MessageLoggerEnhanced by Aria - MessageTranslate by Samwich - ModalFade by Kyuuhachi +- MoreKaomoji by JacobTm & voidbbg - MoreStickers by Leko & Arjix - MoreUserTags by Cyn, TheSun, RyanCaoDev, LordElias, AutumnVN, hen - Morse by zyqunix +- Moyai by Megu & Nuckyz - NeverPausePreviews by vappstar - NewPluginsManager by Sqaaakoi - NoAppsAllowed by kvba @@ -122,7 +124,9 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - NoNitroUpsell by thororen - NoOnboarding by omaw & Glitch - NoRoleHeaders by Samwich +- NoRPC by Cyn - NotificationTitle by Kyuuhachi +- PartyMode by UwUDev - PingNotifications by smuki - PinIcon by iamme - PlatformSpoofer by Drag diff --git a/src/equicordplugins/moreKaomoji/index.ts b/src/equicordplugins/moreKaomoji/index.ts new file mode 100644 index 00000000..986b1f33 --- /dev/null +++ b/src/equicordplugins/moreKaomoji/index.ts @@ -0,0 +1,216 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { findOption, OptionalMessageOption } from "@api/Commands"; +import { Devs, EquicordDevs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "MoreKaomoji", + description: "Adds more Kaomoji to discord. ヽ(´▽`)/", + authors: [Devs.JacobTm, EquicordDevs.voidbbg], + commands: [ + { + name: "dissatisfaction", + description: " >﹏<", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + " >﹏<", + }), + }, + { + name: "smug", + description: "ಠ_ಠ", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "ಠ_ಠ", + }), + }, + { + name: "happy", + description: "ヽ(´▽`)/", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "ヽ(´▽`)/", + }), + }, + { + name: "crying", + description: "ಥ_ಥ", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "ಥ_ಥ", + }), + }, + { + name: "angry", + description: "ヽ(`Д´)ノ", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "ヽ(`Д´)ノ", + }), + }, + { + name: "anger", + description: "ヽ(o`皿′o)ノ", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "ヽ(o`皿′o)ノ", + }), + }, + { + name: "joy", + description: "<( ̄︶ ̄)>", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "<( ̄︶ ̄)>", + }), + }, + { + name: "blush", + description: "૮ ˶ᵔ ᵕ ᵔ˶ ა", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "૮ ˶ᵔ ᵕ ᵔ˶ ა", + }), + }, + { + name: "confused", + description: "(•ิ_•ิ)?", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(•ิ_•ิ)?", + }), + }, + { + name: "sleeping", + description: "(ᴗ_ᴗ)", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(ᴗ_ᴗ)", + }), + }, + { + name: "laughing", + description: "o(≧▽≦)o", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "o(≧▽≦)o", + }), + }, + /* + even more kaomoji + */ + { + name: "giving", + description: "(ノ◕ヮ◕)ノ*:・゚✧", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(ノ◕ヮ◕)ノ*:・゚✧", + }), + }, + { + name: "peace", + description: "✌(◕‿-)✌", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "✌(◕‿-)✌", + }), + }, + { + name: "ending1", + description: "Ꮺ ָ࣪ ۰ ͙⊹", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "Ꮺ ָ࣪ ۰ ͙⊹", + }), + }, + { + name: "uwu", + description: "(>⩊<)", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(>⩊<)", + }), + }, + { + name: "comfy", + description: "(─‿‿─)♡", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(─‿‿─)♡", + }), + }, + { + name: "lovehappy", + description: "(*≧ω≦*)", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(*≧ω≦*)", + }), + }, + { + name: "loveee", + description: "(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄)", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄)", + }), + }, + { + name: "give", + description: "(ノ= ⩊ = )ノ", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "(ノ= ⩊ = )ノ", + }), + }, + { + name: "lovegive", + description: "ღゝ◡╹)ノ♡", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "ღゝ◡╹)ノ♡", + }), + }, + { + name: "music", + description: "( ̄▽ ̄)/♫•¨•.¸¸♪", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "( ̄▽ ̄)/♫•¨•.¸¸♪", + }), + }, + { + name: "stars", + description: ".𖥔 ݁ ˖๋ ࣭ ⭑", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + ".𖥔 ݁ ˖๋ ࣭ ⭑", + }), + }, + { + name: "lovegiving", + description: "⸜(。˃ ᵕ ˂ )⸝♡", + options: [OptionalMessageOption], + execute: opts => ({ + content: findOption(opts, "message", "") + " " + "⸜(。˃ ᵕ ˂ )⸝♡", + }), + } + ] +}); diff --git a/src/equicordplugins/moyai/index.ts b/src/equicordplugins/moyai/index.ts new file mode 100644 index 00000000..a0f76b01 --- /dev/null +++ b/src/equicordplugins/moyai/index.ts @@ -0,0 +1,175 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { definePluginSettings } from "@api/Settings"; +import { makeRange } from "@components/PluginSettings/components/SettingSliderComponent"; +import { Devs } from "@utils/constants"; +import { sleep } from "@utils/misc"; +import definePlugin, { OptionType } from "@utils/types"; +import { RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common"; +import { Message, ReactionEmoji } from "discord-types/general"; + +interface IMessageCreate { + type: "MESSAGE_CREATE"; + optimistic: boolean; + isPushNotification: boolean; + channelId: string; + message: Message; +} + +interface IReactionAdd { + type: "MESSAGE_REACTION_ADD"; + optimistic: boolean; + channelId: string; + messageId: string; + messageAuthorId: string; + userId: "195136840355807232"; + emoji: ReactionEmoji; +} + +interface IVoiceChannelEffectSendEvent { + type: string; + emoji?: ReactionEmoji; // Just in case... + channelId: string; + userId: string; + animationType: number; + animationId: number; +} + +const MOYAI = "🗿"; +const MOYAI_URL = "https://github.com/Equicord/Equibored/raw/main/sounds/moyai/moyai.mp3"; +const MOYAI_URL_HD = "https://github.com/Equicord/Equibored/raw/main/sounds/moyai/moyai.wav"; + +const settings = definePluginSettings({ + volume: { + description: "Volume of the 🗿🗿🗿", + type: OptionType.SLIDER, + markers: makeRange(0, 1, 0.1), + default: 0.5, + stickToMarkers: false + }, + quality: { + description: "Quality of the 🗿🗿🗿", + type: OptionType.SELECT, + options: [ + { label: "Normal", value: "Normal", default: true }, + { label: "HD", value: "HD" } + ], + }, + triggerWhenUnfocused: { + description: "Trigger the 🗿 even when the window is unfocused", + type: OptionType.BOOLEAN, + default: true + }, + ignoreBots: { + description: "Ignore bots", + type: OptionType.BOOLEAN, + default: true + }, + ignoreBlocked: { + description: "Ignore blocked users", + type: OptionType.BOOLEAN, + default: true + } +}); + +export default definePlugin({ + name: "Moyai", + authors: [Devs.Megu, Devs.Nuckyz], + description: "🗿🗿🗿🗿🗿🗿🗿🗿", + settings, + + flux: { + async MESSAGE_CREATE({ optimistic, type, message, channelId }: IMessageCreate) { + if (optimistic || type !== "MESSAGE_CREATE") return; + if (message.state === "SENDING") return; + if (settings.store.ignoreBots && message.author?.bot) return; + if (settings.store.ignoreBlocked && RelationshipStore.isBlocked(message.author?.id)) return; + if (!message.content) return; + if (channelId !== SelectedChannelStore.getChannelId()) return; + + const moyaiCount = getMoyaiCount(message.content); + + for (let i = 0; i < moyaiCount; i++) { + boom(); + await sleep(300); + } + }, + + MESSAGE_REACTION_ADD({ optimistic, type, channelId, userId, messageAuthorId, emoji }: IReactionAdd) { + if (optimistic || type !== "MESSAGE_REACTION_ADD") return; + if (settings.store.ignoreBots && UserStore.getUser(userId)?.bot) return; + if (settings.store.ignoreBlocked && RelationshipStore.isBlocked(messageAuthorId)) return; + if (channelId !== SelectedChannelStore.getChannelId()) return; + + const name = emoji.name.toLowerCase(); + if (name !== MOYAI && !name.includes("moyai") && !name.includes("moai")) return; + + boom(); + }, + + VOICE_CHANNEL_EFFECT_SEND({ emoji }: IVoiceChannelEffectSendEvent) { + if (!emoji?.name) return; + const name = emoji.name.toLowerCase(); + if (name !== MOYAI && !name.includes("moyai") && !name.includes("moai")) return; + + boom(); + } + } +}); + +function countOccurrences(sourceString: string, subString: string) { + let i = 0; + let lastIdx = 0; + while ((lastIdx = sourceString.indexOf(subString, lastIdx) + 1) !== 0) + i++; + + return i; +} + +function countMatches(sourceString: string, pattern: RegExp) { + if (!pattern.global) + throw new Error("pattern must be global"); + + let i = 0; + while (pattern.test(sourceString)) + i++; + + return i; +} + +const customMoyaiRe = //gi; + +function getMoyaiCount(message: string) { + const count = countOccurrences(message, MOYAI) + + countMatches(message, customMoyaiRe); + + return Math.min(count, 10); +} + +function boom() { + if (!settings.store.triggerWhenUnfocused && !document.hasFocus()) return; + const audioElement = document.createElement("audio"); + + audioElement.src = settings.store.quality === "HD" + ? MOYAI_URL_HD + : MOYAI_URL; + + audioElement.volume = settings.store.volume; + audioElement.play(); +} diff --git a/src/equicordplugins/noRPC.discordDesktop/index.ts b/src/equicordplugins/noRPC.discordDesktop/index.ts new file mode 100644 index 00000000..51ed1f96 --- /dev/null +++ b/src/equicordplugins/noRPC.discordDesktop/index.ts @@ -0,0 +1,23 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2025 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: "NoRPC", + description: "Disables Discord's RPC server.", + authors: [Devs.Cyn], + patches: [ + { + find: '.ensureModule("discord_rpc")', + replacement: { + match: /\.ensureModule\("discord_rpc"\)\.then\(\(.+?\)}\)}/, + replace: '.ensureModule("discord_rpc")}', + }, + }, + ], +}); diff --git a/src/plugins/partyMode/index.ts b/src/equicordplugins/partyMode/index.ts similarity index 100% rename from src/plugins/partyMode/index.ts rename to src/equicordplugins/partyMode/index.ts