From 8817e2dff71f4736f4f8c9011457d20e63ec4ca3 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 12 Oct 2022 22:22:37 +0200 Subject: Reorganise command plugins --- src/plugins/uwuify.ts | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'src/plugins/uwuify.ts') diff --git a/src/plugins/uwuify.ts b/src/plugins/uwuify.ts index 8c8d790..2cf0f76 100644 --- a/src/plugins/uwuify.ts +++ b/src/plugins/uwuify.ts @@ -1,32 +1,13 @@ import definePlugin from "../utils/types"; import { findOption, RequiredMessageOption } from "../api/Commands"; -// words have a chance of ending with these const endings = [ - "owo", - "UwU", - ">w<", - "^w^", - "ā—wā—", - "ā˜†wā˜†", - "š—Øš˜„š—Ø", - "(į—’į—Øį—•)", - "(ā–°Ė˜vĖ˜ā–°)", - "( Ā“ ā–½ ` ).ļ½”ļ½ā™”", - "*unbuttons shirt*", - ">3<", - ">:3", - ":3", - "murr~", - "ā™„(怂U Ļ‰ U怂)", - "(Ė˜ĪµĖ˜)", - "*screams*", - "*twerks*", - "*sweats*", + "owo", "UwU", ">w<", "^w^", "ā—wā—", "ā˜†wā˜†", "š—Øš˜„š—Ø", "(į—’į—Øį—•)", "(ā–°Ė˜vĖ˜ā–°)", + "( Ā“ ā–½ ` ).ļ½”ļ½ā™”", "*unbuttons shirt*", ">3<", ">:3", ":3", "murr~", + "ā™„(怂U Ļ‰ U怂)", "(Ė˜ĪµĖ˜)", "*screams*", "*twerks*", "*sweats*", ]; -// replacement words -const words = [ +const replacements = [ ["love", "wuv"], ["mr", "mistuh"], ["dog", "doggo"], @@ -45,7 +26,6 @@ const words = [ ]; -// uwuify command function uwuify(message: string): string { return message .split(" ") @@ -58,7 +38,7 @@ function uwuify(message: string): string { } // replacing the words based on the array on line 29 - for (let [find, replace] of words) { + for (let [find, replace] of replacements) { if (w.includes(find)) { w = w.replace(find, replace); owofied = true; @@ -111,7 +91,10 @@ function uwuify(message: string): string { export default definePlugin({ name: "UwUifier", description: "Simply uwuify commands", - authors: [{ name: "ECHO", id: 712639419785412668n }], + authors: [{ + name: "ECHO", + id: 712639419785412668n + }], dependencies: ["CommandsAPI"], commands: [ -- cgit