+});
+
+
diff --git a/src/equicordplugins/glide/themeDefinitions.tsx b/src/equicordplugins/glide/themeDefinitions.tsx
new file mode 100644
index 000000000..bc16de893
--- /dev/null
+++ b/src/equicordplugins/glide/themeDefinitions.tsx
@@ -0,0 +1,164 @@
+/*
+ * Vencord, a Discord client mod
+ * Copyright (c) 2024 Vendicated and contributors
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+import { ThemePreset } from ".";
+
+export const themes: ThemePreset[] = [
+ {
+ bgcol: "000000",
+ accentcol: "020202",
+ textcol: "c0d5e4",
+ brand: "070707",
+ name: "Amoled"
+ },
+ {
+ bgcol: "0e2936",
+ accentcol: "0c2430",
+ textcol: "99b0bd",
+ brand: "124057",
+ name: "Solar"
+ },
+ {
+ bgcol: "0e0e36",
+ accentcol: "0e0c30",
+ textcol: "bdbfd8",
+ brand: "171750",
+ name: "Indigo"
+ },
+ {
+ bgcol: "8a2b5f",
+ accentcol: "812658",
+ textcol: "ffedfb",
+ brand: "b23982",
+ name: "Grapefruit"
+ },
+ {
+ bgcol: "410b05",
+ accentcol: "360803",
+ textcol: "f8e6e6",
+ brand: "681109",
+ name: "Crimson"
+ },
+ {
+ bgcol: "184e66",
+ accentcol: "215a72",
+ textcol: "d0efff",
+ brand: "2d718f",
+ name: "Azure"
+ },
+ {
+ bgcol: "1d091a",
+ accentcol: "240d21",
+ textcol: "f3e1f0",
+ brand: "411837",
+ name: "Blackberry"
+ },
+ {
+ bgcol: "1f073b",
+ accentcol: "250b44",
+ textcol: "dfd7e9",
+ brand: "340d63",
+ name: "Porple"
+ },
+ {
+ bgcol: "0a0a0a",
+ accentcol: "0f0f0f",
+ textcol: "c9c9c9",
+ brand: "0a0a0a",
+ name: "Charcoal"
+ },
+ {
+ bgcol: "00345b",
+ accentcol: "002f53",
+ textcol: "e7d8df",
+ brand: "944068",
+ name: "Lofi Pop"
+ },
+ {
+ bgcol: "471b05",
+ accentcol: "4e2009",
+ textcol: "ffffff",
+ brand: "903e14",
+ name: "Oaken"
+ },
+ {
+ bgcol: "040b2b",
+ accentcol: "000626",
+ textcol: "ddd0d0",
+ brand: "040b2b",
+ name: "Deep Blue"
+ },
+ {
+ bgcol: "32464a",
+ accentcol: "2d4145",
+ textcol: "ddd0d0",
+ brand: "32464a",
+ name: "Steel Blue"
+ },
+ {
+ bgcol: "31031f",
+ accentcol: "2c001a",
+ textcol: "ddd0d0",
+ brand: "31031f",
+ name: "Velvet"
+ },
+ {
+ bgcol: "22111f",
+ accentcol: "1d0c1a",
+ textcol: "ddd0d0",
+ brand: "22111f",
+ name: "Really Oddly Depressed Purple"
+ },
+ {
+ bgcol: "2b3959",
+ accentcol: "263454",
+ textcol: "ddd0d0",
+ brand: "2b3959",
+ name: "Light Sky"
+ },
+ {
+ bgcol: "06403d",
+ accentcol: "013b38",
+ textcol: "ddd0d0",
+ brand: "06403d",
+ name: "Tealish"
+ },
+ {
+ bgcol: "273b0b",
+ accentcol: "223606",
+ textcol: "ddd0d0",
+ brand: "273b0b",
+ name: "Leaf (or a tree perhaps)"
+ },
+ {
+ bgcol: "1a2022",
+ accentcol: "151b1d",
+ textcol: "ddd0d0",
+ brand: "1a2022",
+ name: "Steel"
+ },
+ {
+ bgcol: "1e1e2e",
+ accentcol: "181825",
+ textcol: "cdd6f4",
+ brand: "45475a",
+ name: "Catppuccin Mocha"
+ },
+ {
+ bgcol: "303446",
+ accentcol: "292c3c",
+ textcol: "c6d0f5",
+ brand: "414559",
+ name: "Catppuccin Frappé"
+ },
+ {
+ bgcol: "6b422e",
+ accentcol: "754b36",
+ textcol: "ead9c9",
+ brand: "8b5032",
+ name: "Relax"
+ }
+];
diff --git a/src/equicordplugins/googleThat/index.ts b/src/equicordplugins/googleThat/index.ts
new file mode 100644
index 000000000..4c2d30f29
--- /dev/null
+++ b/src/equicordplugins/googleThat/index.ts
@@ -0,0 +1,78 @@
+/*
+ * Vencord, a Discord client mod
+ * Copyright (c) 2024 Vendicated and contributors
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+import { ApplicationCommandOptionType, findOption } from "@api/Commands";
+import { definePluginSettings } from "@api/Settings";
+import { Devs } from "@utils/constants";
+import definePlugin, { OptionType } from "@utils/types";
+function getMessage(opts) {
+ const inputOption = findOption(opts, "input", "");
+
+ const queryURL = "" + searchEngines[settings.store.defaultEngine] + encodeURIComponent(inputOption);
+
+ if (settings.store.hyperlink) {
+ return `[${inputOption}](${queryURL})`;
+ }
+ else {
+ return queryURL;
+ }
+}
+
+const searchEngines = {
+ "Google": "https://www.google.com/search?q=",
+ "Bing": "https://www.bing.com/search?q=",
+ "Yahoo": "https://search.yahoo.com/search?p=",
+ "DuckDuckGo": "https://duckduckgo.com/?q=",
+ "Baidu": "https://www.baidu.com/s?wd=",
+ "Yandex": "https://yandex.com/search/?text=",
+ "Ecosia": "https://www.ecosia.org/search?q=",
+ "Ask": "https://www.ask.com/web?q=",
+ "LetMeGoogleThatForYou": "https://letmegooglethat.com/?q="
+};
+
+const settings = definePluginSettings({
+ hyperlink: {
+ type: OptionType.BOOLEAN,
+ description: "If the sent link should hyperlink with the query as the label",
+ default: true
+ },
+ defaultEngine:
+ {
+ type: OptionType.SELECT,
+ description: "The search engine to use",
+ options: Object.keys(searchEngines).map((key, index) => ({
+ label: key,
+ value: key,
+ default: index === 0
+ }))
+ }
+});
+
+export default definePlugin({
+ name: "GoogleThat",
+ description: "Adds a command to send a google search link to a query",
+ authors: [Devs.Samwich],
+ tags: ["search", "google", "query", "duckduckgo", "command"],
+ dependencies: ["CommandsAPI"],
+ settings,
+ commands: [
+ {
+ name: "googlethat",
+ description: "send a search engine link to a query",
+ options: [
+ {
+ name: "input",
+ description: "The search query",
+ type: ApplicationCommandOptionType.STRING,
+ required: true,
+ }
+ ],
+ execute: opts => ({
+ content: getMessage(opts)
+ }),
+ }
+ ]
+});
diff --git a/src/equicordplugins/grammar/index.ts b/src/equicordplugins/grammar/index.ts
new file mode 100644
index 000000000..c84a1fb27
--- /dev/null
+++ b/src/equicordplugins/grammar/index.ts
@@ -0,0 +1,109 @@
+/*
+ * Vencord, a Discord client mod
+ * Copyright (c) 2024 Vendicated and contributors
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+import { addPreSendListener, removePreSendListener, SendListener, } from "@api/MessageEvents";
+import { definePluginSettings, Settings } from "@api/Settings";
+import { Devs } from "@utils/constants";
+import definePlugin, { OptionType } from "@utils/types";
+
+const presendObject: SendListener = (channelId, msg) => {
+ msg.content = textProcessing(msg.content);
+};
+
+const settings = definePluginSettings(
+ {
+ blockedWords: {
+ type: OptionType.STRING,
+ description: "Words that will not be capitalised",
+ default: ""
+ }
+ });
+
+export default definePlugin({
+ name: "Grammar",
+ description: "Tweaks your messages to make them look nicer and have better grammar",
+ authors: [Devs.Samwich],
+ dependencies: ["MessageEventsAPI"],
+ start() {
+ addPreSendListener(presendObject);
+ },
+ stop() {
+ removePreSendListener(presendObject);
+ },
+ settings
+});
+
+function textProcessing(input: string) {
+ let text = input;
+ text = cap(text);
+ text = apostrophe(text);
+ return text;
+}
+
+function apostrophe(textInput: string): string {
+ const corrected = "wasn't, can't, don't, won't, isn't, aren't, haven't, hasn't, hadn't, doesn't, didn't, shouldn't, wouldn't, couldn't, i'm, you're, he's, she's, it's, they're, that's, who's, what's, there's, here's, how's, where's, when's, why's, let's, you'll, I'll, they'll, it'll, I've, you've, we've, they've, you'd, he'd, she'd, it'd, we'd, they'd, y'all".toLowerCase();
+ const words: string[] = corrected.split(", ");
+ const wordsInputted = textInput.split(" ");
+
+ wordsInputted.forEach(element => {
+ words.forEach(wordelement => {
+ if (removeApostrophes(wordelement) === element.toLowerCase()) {
+ wordsInputted[wordsInputted.indexOf(element)] = restoreCap(wordelement, getCapData(element));
+ }
+ });
+ });
+ return wordsInputted.join(" ");
+}
+
+function getCapData(str: string) {
+ const booleanArray: boolean[] = [];
+ for (const char of str) {
+ booleanArray.push(char === char.toUpperCase());
+ }
+ return booleanArray;
+
+}
+
+function removeApostrophes(str: string): string {
+ return str.replace(/'/g, "");
+}
+
+function restoreCap(str: string, data: boolean[]): string {
+ let resultString = "";
+ let dataIndex = 0;
+
+ for (let i = 0; i < str.length; i++) {
+ const char = str[i];
+ if (!char.match(/[a-zA-Z]/)) {
+ resultString += char;
+ continue;
+ }
+
+ const isUppercase = data[dataIndex++];
+ resultString += isUppercase ? char.toUpperCase() : char.toLowerCase();
+ }
+
+ return resultString;
+}
+
+function cap(textInput: string): string {
+
+ const sentences = textInput.split(/(?<=\w\.)\s/);
+
+ const blockedWordsArray: string[] = Settings.plugins.Grammar.blockedWords.split(", ");
+
+ return sentences.map(element => {
+
+ if (!blockedWordsArray.some(word => element.toLowerCase().startsWith(word.toLowerCase()))) {
+ return element.charAt(0).toUpperCase() + element.slice(1);
+ }
+ else {
+ return element;
+ }
+
+ }).join(" ");
+}
+
diff --git a/src/equicordplugins/homeTyping/index.tsx b/src/equicordplugins/homeTyping/index.tsx
new file mode 100644
index 000000000..f54ef98fe
--- /dev/null
+++ b/src/equicordplugins/homeTyping/index.tsx
@@ -0,0 +1,45 @@
+/*
+ * 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";
+import { findExportedComponentLazy, findStoreLazy } from "@webpack";
+import { useStateFromStores } from "@webpack/common";
+const ThreeDots = findExportedComponentLazy("Dots", "AnimatedDots");
+
+const TypingStore = findStoreLazy("TypingStore");
+
+const PrivateChannelSortStore = findStoreLazy("PrivateChannelSortStore") as { getPrivateChannelIds: () => string[]; };
+
+export default definePlugin({
+ name: "HomeTyping",
+ description: "Changes the home button to a typing indicator if someone in your dms is typing",
+ authors: [Devs.Samwich],
+ TypingIcon() {
+ return It's permanent, if that wasn't obvious.
, confirmColor: Button.Colors.RED, confirmText: "Delete", onConfirm: () => GetPropsAndDeleteGuild(server.id), cancelText: "Cancel" }); + } + else { + GetPropsAndDeleteGuild(server.id); + } + }, + patches: [ + { + find: ".DELETE,onClick(){let", + replacement: { + match: /let \i=(\i).toString\(\)/, + replace: "$self.HandleGuildDeleteModal($1);return;$&" + } + } + ] +}); diff --git a/src/equicordplugins/noRoleHeaders/index.ts b/src/equicordplugins/noRoleHeaders/index.ts new file mode 100644 index 000000000..b74c4da0a --- /dev/null +++ b/src/equicordplugins/noRoleHeaders/index.ts @@ -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: "NoRoleHeaders", + description: "We are all equal!!", + authors: [Devs.Samwich], + patches: [ + { + find: "._areActivitiesExperimentallyHidden=(", + replacement: { + match: /\i.memo\(function\(\i\){/, + replace: "$&return null;" + } + } + ] +}); diff --git a/src/equicordplugins/quoter/components.tsx b/src/equicordplugins/quoter/components.tsx new file mode 100644 index 000000000..f7e350cd9 --- /dev/null +++ b/src/equicordplugins/quoter/components.tsx @@ -0,0 +1,15 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +export function QuoteIcon() { + return ( + + ); +} diff --git a/src/equicordplugins/quoter/index.tsx b/src/equicordplugins/quoter/index.tsx new file mode 100644 index 000000000..6948a22dc --- /dev/null +++ b/src/equicordplugins/quoter/index.tsx @@ -0,0 +1,296 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu"; +import { definePluginSettings } from "@api/Settings"; +import { Devs } from "@utils/constants"; +import { getCurrentChannel } from "@utils/discord"; +import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; +import definePlugin, { OptionType } from "@utils/types"; +import { Button, Menu, Select, Switch, Text, TextInput, UploadHandler, useEffect, UserStore, useState } from "@webpack/common"; +import { Message } from "discord-types/general"; + +import { QuoteIcon } from "./components"; +import { canvasToBlob, fetchImageAsBlob, FixUpQuote, wrapText } from "./utils"; + +enum ImageStyle { + inspirational +} + +const messagePatch: NavContextMenuPatchCallback = (children, { message }) => { + recentmessage = message; + if (!message.content) return; + + const buttonElement = +Failed to render :(
+ }) +}); + +export function TextPlugin({ pluginName, onClose }) { + return ( +