Compare commits

..

1 commit
main ... main

Author SHA1 Message Date
81f006c571 added more slurs 2024-10-14 10:27:12 -04:00

View file

@ -1,9 +1,22 @@
/* /*
* Vencord, a Discord client mod * Vencord, a modification for Discord's desktop app
* Copyright (c) 2025 Vendicated and contributors * Copyright (c) 2024 nin0dev
* SPDX-License-Identifier: GPL-3.0-or-later *
*/ * 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 <https://www.gnu.org/licenses/>.
*/
import { addPreSendListener, removePreSendListener } from "@api/MessageEvents";
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
@ -11,15 +24,18 @@ import { FluxDispatcher } from "@webpack/common";
/** * SEXUAL ***/ /** * SEXUAL ***/
const badVerbsSexual = ["fuck", "cum"]; const badVerbsSexual = ["fuck", "cum"];
const badNounsSexual = ["cunt", "yuri", "whore", "dick", "pussy", "slut", "tit", "cum", "cock", "blowjob", "sex", "ass", "furry", "bewbs", "boob", "booba", "boobies", "boobs", "booby", "porn", "pron", "pronhub", "r34", "rape", "raped", "raping", "rapist"]; const badNounsSexual = ["cunt", "yuri", "whore", "dick", "penis", "bbc", "pussy", "pussyole", "slut", "tit", "cum", "cock", "blowjob", "sex", "ass", "furry", "bewbs", "boob", "booba", "boobies", "boobs", "booby", "porn", "pron", "pronhub", "xshare", "xhamster", "r34", "rape", "raped", "raping", "rapist", "womanizer", "nonce", "golden shower", "head"];
/** * FURRY ***/
const badNounsFurry = ["<a:meowing:1284972816906846298>", "meowing", "meow", "miau", "mreow", "mrow", "woof", "nya", ":pleading_catgirl", "purr", "oomf", "oomfie", "femboy"];
const badRegexesFurry = ["mr*eo*w+, mr+p, nya+, mrow+, purr+"];
/** * BRAINROT ***/ /** * BRAINROT ***/
const badNounsBrainrot = ["mewing", "mew", "skibidi", "gyat", "gyatt", "rizzler", "nettspend", "boykisser", "ohio", "rizz", "tickle my toes bruh", "crack my spine like a whip", "hawk tuah"]; const badNounsBrainrot = ["mewing", "mew", "skibidi", "gyat", "gyatt", "rizzler", "nettspend", "boykisser", "ohio", "rizz", "tickle my toes bruh", "crack my spine like a whip", "hawk tuah", "pookie"];
/** * SLURS ***/ /** * SLURS ***/
const badNounsSlurs = ["retard", "faggot", "fag", "faggots", "fags", "retards", "n*g", "n*gg*", "n*gg*r"]; const badNounsSlurs = ["retard", "retards", "retarded", "faggot", "fag", "faggots", "fags", "furfag", "tranny", "trannies", "n*g", "n*gg*", "n*gg*r", "n*glet", "ret*gga", "n*gtard", "n*g-nog", "n*gro", "gringo", "Yank"];
const badRegexesSlurs = ["\\bn{1,}(i|!|1){1,}(b|g){2,}(a|@|e|3){1,}?"]; const badRegexesSlurs = ["\\bn{1,}(i|!|1){1,}(b|g){2,}(a|@|e|3){1,}?"];
/** * GENERAL ***/ /** * GENERAL ***/
const badVerbsGeneral = ["kill", "destroy"]; const badVerbsGeneral = ["kill", "destroy"];
const badNounsGeneral = ["shit", "bullshit", "bitch", "bastard", "die", "brainless"]; const badNounsGeneral = ["shit", "bullshit", "bitch", "bastard", "die", "brainless", "moron", "dumb", "idiot"];
/** * FUN ***/ /** * FUN ***/
const badNounsFun = ["kotlin", "avast"]; const badNounsFun = ["kotlin", "avast"];
/** * REPLACEMENTS ***/ /** * REPLACEMENTS ***/
@ -42,6 +58,11 @@ export default definePlugin({
description: "Block sexual words/hornyspeak", description: "Block sexual words/hornyspeak",
default: true default: true
}, },
blockFurryspeak: {
type: OptionType.BOOLEAN,
description: "Block furryspeak/meowing",
default: true
},
blockBrainrot: { blockBrainrot: {
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
description: "Block things commonly said by Gen Alpha children", description: "Block things commonly said by Gen Alpha children",
@ -63,14 +84,19 @@ export default definePlugin({
default: true default: true
} }
}), }),
onBeforeMessageSend: (c, msg) => { async start() {
// @ts-ignore this.preSend = addPreSendListener((_channelId, msg) => {
const newContent = this.replaceBadVerbs(this.replaceBadNouns(msg.content)); const newContent = this.replaceBadVerbs(this.replaceBadNouns(msg.content));
msg.content = newContent; msg.content = newContent;
});
},
stop() {
removePreSendListener(this.preSend);
}, },
getEnabledBadNouns() { getEnabledBadNouns() {
const thingToReturn: string[] = []; const thingToReturn: string[] = [];
if (this.settings.store.blockBrainrot) thingToReturn.push(...badNounsBrainrot); if (this.settings.store.blockBrainrot) thingToReturn.push(...badNounsBrainrot);
if (this.settings.store.blockFurryspeak) thingToReturn.push(...badNounsFurry);
if (this.settings.store.blockInsults) thingToReturn.push(...badNounsGeneral); if (this.settings.store.blockInsults) thingToReturn.push(...badNounsGeneral);
if (this.settings.store.blockOthers) thingToReturn.push(...badNounsFun); if (this.settings.store.blockOthers) thingToReturn.push(...badNounsFun);
if (this.settings.store.blockSexual) thingToReturn.push(...badNounsSexual); if (this.settings.store.blockSexual) thingToReturn.push(...badNounsSexual);
@ -101,27 +127,8 @@ export default definePlugin({
}, },
flux: { flux: {
async MESSAGE_CREATE async MESSAGE_CREATE
({ guildId, message }) { ({ guildId, message }) {
if(Vencord.Plugins.plugins.GoodPerson.settings?.store.incoming) {
const msg = message;
// @ts-ignore
let newMessageContent = Vencord.Plugins.plugins.GoodPerson.replaceBadVerbs(Vencord.Plugins.plugins.GoodPerson.replaceBadNouns(msg.content));
if (message.content !== newMessageContent) {
newMessageContent += "\n-# <:husk:1280158956341297225> **GoodPerson made this message good. Reload your client to clear changes**";
msg.content = newMessageContent;
FluxDispatcher.dispatch({
type: "MESSAGE_UPDATE",
message: msg,
guildId
});
}
}
},
async MESSAGE_UPDATE
({ guildId, message }) {
if(Vencord.Plugins.plugins.GoodPerson.settings?.store.incoming) {
const msg = message; const msg = message;
if(msg.content.includes("-# <:husk:1280158956341297225> **GoodPerson made this message good. Reload your client to clear changes**")) return;
// @ts-ignore // @ts-ignore
let newMessageContent = Vencord.Plugins.plugins.GoodPerson.replaceBadVerbs(Vencord.Plugins.plugins.GoodPerson.replaceBadNouns(msg.content)); let newMessageContent = Vencord.Plugins.plugins.GoodPerson.replaceBadVerbs(Vencord.Plugins.plugins.GoodPerson.replaceBadNouns(msg.content));
if (message.content !== newMessageContent) { if (message.content !== newMessageContent) {
@ -133,6 +140,20 @@ export default definePlugin({
guildId guildId
}); });
} }
},
async MESSAGE_UPDATE
({ guildId, message }) {
const msg = message;
// @ts-ignore
let newMessageContent = Vencord.Plugins.plugins.GoodPerson.replaceBadVerbs(Vencord.Plugins.plugins.GoodPerson.replaceBadNouns(msg.content));
if (message.content !== newMessageContent) {
newMessageContent += "\n-# <:husk:1280158956341297225> **GoodPerson made this message good. Reload your client to clear changes**";
msg.content = newMessageContent;
FluxDispatcher.dispatch({
type: "MESSAGE_UPDATE",
message: msg,
guildId
});
} }
} }
} }