WIP: index.ts update #2
1 changed files with 21 additions and 15 deletions
36
index.ts
36
index.ts
|
@ -20,28 +20,34 @@ import { addPreSendListener, removePreSendListener } from "@api/MessageEvents";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
|
|
||||||
const badVerbs = ["fuck", " cum", "kill", "destroy"];
|
const badVerbs = ["fuck", " cum", "kill", "destroy", "orgasm", "orgasming"];
|
||||||
const badNouns = ["meow", "woof", "nya", ":pleading_catgirl", "cunt", "shit", "bullshit", "ass", "bitch", "nigga", "hell", "whore", "dick", "piss", "pussy", "slut", "tit", "cum", "cock", "retard", "blowjob", "bastard", "kotlin", "die", "sex", "nigger", "brainless", "mant", "manti", "mantik", "mantika", "mantikaf", "mantikafa", "mantikafas", "mantikafasi", "boykisser", "mewing", "mew", "skibidi", "gyat", "gyatt", "rizzler", "avast", "yuri"];
|
const badNouns = ["fag","fucking","dickhead", "motherfucker", "sigma", "asshole", "cunt", "shit", "bullshit", "ass", "bitch", "nigga", "hell", "whore", "dick", "piss", "pussy", "slut", "tit", "cum", "cock", "retard", "blowjob", "bastard", "kotlin", "die", "sex", "nigger", "brainless", "mant", "mew", "skibidi", "gyat", "rizzler", "avast", "yuri", "faggot"];
|
||||||
|
nin0
commented
readd mantika and stuff to bad nouns readd mantika and stuff to bad nouns
froginalog
commented
that was a mistake that was a mistake
|
||||||
const badVerbsReplacements = ["love", "eat", "deconstruct", "marry", "fart", "teach", "display", "plug", "explode", "undress", "finish", "freeze", "beat", "free", "brush", "allocate", "date", "melt", "breed", "educate", "injure", "change"];
|
const badVerbsReplacements = ["move", "draw", "deconstruct", "fly", "fart", "teach", "display", "plug", "explode", "run", "walk", "freeze", "beat", "free", "brush", "allocate", "date", "melt", "breed", "educate", "injure", "change"];
|
||||||
nin0
commented
keep undress, finish, Anime, Anime girl, bath, virus, bathroom, mom keep undress, finish, Anime, Anime girl, bath, virus, bathroom, mom
froginalog
commented
only if you make it toggleable, doesn't even have to be default false, but undress and bath can be incredibly terrible if said instead of a simple swear word, example: I will kill you, I will undress you, this could end up in someone being banned, could it not? I'm not as opposed to anime and anime girl though only if you make it toggleable, doesn't even have to be default false, but undress and bath can be incredibly terrible if said instead of a simple swear word, example: I will kill you, I will undress you, this could end up in someone being banned, could it not? I'm not as opposed to anime and anime girl though
|
|||||||
const badNounsReplacements = ["pasta", "kebab", "cake", "potato", "woman", "computer", "java", "hamburger", "monster truck", "osu!", "Ukrainian ball in search of gas game", "Anime", "Anime girl", "good", "keyboard", "NVIDIA RTX 3090 Graphics Card", "storm", "queen", "single", "umbrella", "mosque", "physics", "bath", "virus", "bathroom", "mom", "owner", "airport", "Avast Antivirus Free"];
|
const badNounsReplacements = ["pasta", "kebab", "cake", "potato", "woman", "computer", "java", "hamburger", "monster truck", "osu!", "Ukrainian ball in search of gas game", "cheese", "wheat", "good", "keyboard", "NVIDIA RTX 3090 Graphics Card", "storm", "queen", "single", "umbrella", "mosque", "physics", "desk", "virus", "bathroom", "corn", "owner", "airport", "Avast Antivirus Free"];
|
||||||
|
|
||||||
function replaceBadNouns(content) {
|
function replaceBadNouns(content: string): string {
|
||||||
// eslint-disable-next-line quotes
|
const regex = new RegExp('\\b(' + badNouns.join('|') + ')(s)?\\b', 'gi');
|
||||||
const regex = new RegExp('\\b(' + badNouns.join('|') + ')\\b', 'gi');
|
|
||||||
|
|
||||||
return content.replace(regex, function (match) {
|
return content.replace(regex, function (match, p1, p2) {
|
||||||
const randomIndex = Math.floor(Math.random() * badNounsReplacements.length);
|
const randomIndex = Math.floor(Math.random() * badNounsReplacements.length);
|
||||||
return badNounsReplacements[randomIndex];
|
let replacement = badNounsReplacements[randomIndex];
|
||||||
|
if (p2) {
|
||||||
|
replacement += 's'; // Keep the plural 's' if the match was plural
|
||||||
|
}
|
||||||
|
return replacement;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceBadVerbs(content) {
|
function replaceBadVerbs(content: string): string {
|
||||||
// eslint-disable-next-line quotes
|
const regex = new RegExp('\\b(' + badVerbs.join('|') + ')(s)?\\b', 'gi');
|
||||||
const regex = new RegExp('\\b(' + badVerbs.join('|') + ')\\b', 'gi');
|
|
||||||
|
|
||||||
return content.replace(regex, function (match) {
|
return content.replace(regex, function (match, p1, p2) {
|
||||||
const randomIndex = Math.floor(Math.random() * badVerbsReplacements.length);
|
const randomIndex = Math.floor(Math.random() * badVerbsReplacements.length);
|
||||||
return badVerbsReplacements[randomIndex];
|
let replacement = badVerbsReplacements[randomIndex];
|
||||||
|
if (p2) {
|
||||||
|
replacement += 's'; // Keep the plural 's' if the match was plural
|
||||||
|
}
|
||||||
|
return replacement;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,4 +67,4 @@ export default definePlugin({
|
||||||
stop() {
|
stop() {
|
||||||
removePreSendListener(this.preSend);
|
removePreSendListener(this.preSend);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue
dont remove meow woof and other bad furryspeak
that was a mistake (but also awww mannnnn)