support managed APIs
This commit is contained in:
parent
d1611dd0b0
commit
b65f6b33ef
1 changed files with 5 additions and 10 deletions
15
index.ts
15
index.ts
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addPreSendListener, removePreSendListener } from "@api/MessageEvents";
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
@ -34,7 +33,7 @@ const badRegexesSlurs = ["\\bn{1,}(i|!|1){1,}(b|g){2,}(a|@|e|3){1,}?"];
|
|||
const badVerbsGeneral = ["kill", "destroy"];
|
||||
const badNounsGeneral = ["shit", "bullshit", "bitch", "bastard", "die", "brainless"];
|
||||
/** * FUN ***/
|
||||
const badNounsFun = ["kotlin", "avast", "fres"];
|
||||
const badNounsFun = ["kotlin", "avast"];
|
||||
/** * REPLACEMENTS ***/
|
||||
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 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"];
|
||||
|
@ -76,14 +75,10 @@ export default definePlugin({
|
|||
default: true
|
||||
}
|
||||
}),
|
||||
async start() {
|
||||
this.preSend = addPreSendListener((_channelId, msg) => {
|
||||
const newContent = this.replaceBadVerbs(this.replaceBadNouns(msg.content));
|
||||
msg.content = newContent;
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
removePreSendListener(this.preSend);
|
||||
onBeforeMessageSend: (c, msg) => {
|
||||
// @ts-ignore
|
||||
const newContent = this.replaceBadVerbs(this.replaceBadNouns(msg.content));
|
||||
msg.content = newContent;
|
||||
},
|
||||
getEnabledBadNouns() {
|
||||
const thingToReturn: string[] = [];
|
||||
|
|
Loading…
Reference in a new issue