forked from userplugins/vc-goodperson
Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
e55d79519e | |||
b65f6b33ef | |||
d1611dd0b0 | |||
4beec45850 |
1 changed files with 28 additions and 49 deletions
43
index.ts
43
index.ts
|
@ -1,22 +1,9 @@
|
||||||
/*
|
/*
|
||||||
* Vencord, a modification for Discord's desktop app
|
* Vencord, a Discord client mod
|
||||||
* Copyright (c) 2024 nin0dev
|
* Copyright (c) 2025 Vendicated and contributors
|
||||||
*
|
* 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";
|
||||||
|
@ -25,9 +12,6 @@ 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", "pussy", "slut", "tit", "cum", "cock", "blowjob", "sex", "ass", "furry", "bewbs", "boob", "booba", "boobies", "boobs", "booby", "porn", "pron", "pronhub", "r34", "rape", "raped", "raping", "rapist"];
|
||||||
/** * FURRY ***/
|
|
||||||
const badNounsFurry = ["<a:meowing:1284972816906846298>", "meowing", "meow", "miau", "mreow", "mrow", "woof", "nya", ":pleading_catgirl", "purr", "oomf", "oomfie"];
|
|
||||||
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"];
|
||||||
/** * SLURS ***/
|
/** * SLURS ***/
|
||||||
|
@ -58,11 +42,6 @@ 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",
|
||||||
|
@ -84,19 +63,14 @@ export default definePlugin({
|
||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
async start() {
|
onBeforeMessageSend: (c, msg) => {
|
||||||
this.preSend = addPreSendListener((_channelId, msg) => {
|
// @ts-ignore
|
||||||
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);
|
||||||
|
@ -128,6 +102,7 @@ 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;
|
const msg = message;
|
||||||
// @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));
|
||||||
|
@ -140,10 +115,13 @@ export default definePlugin({
|
||||||
guildId
|
guildId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async MESSAGE_UPDATE
|
async MESSAGE_UPDATE
|
||||||
({ guildId, message }) {
|
({ 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) {
|
||||||
|
@ -157,4 +135,5 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue