commit b2aca9110e3f23a766845a4a2dca86000c751ef1 Author: nin0 Date: Sat Jun 7 12:12:37 2025 -0400 init diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..8b1440d --- /dev/null +++ b/index.ts @@ -0,0 +1,33 @@ +import { definePluginSettings } from "@api/Settings"; +import { Devs } from "@utils/constants"; +import { sendMessage } from "@utils/discord"; +import definePlugin, { OptionType } from "@utils/types"; +import { UserStore } from "@webpack/common"; + +const ALLOWED_CHANNEL_IDs = ["1026504914131759104"]; + +const settings = definePluginSettings({ + allowedChannels: { + type: OptionType.STRING, + description: "comma separated list", + default: ALLOWED_CHANNEL_IDs.join(",") + } +}); + +export default definePlugin({ + name: "WhoSaidKorn", + description: "Who said KoRn?", + authors: [Devs.nin0dev], + settings, + flux: { + MESSAGE_CREATE(e) { + if (!settings.store.allowedChannels.replaceAll(" ", "").split(",").includes(e.channelId)) return; + if (e.message.author.id === UserStore.getCurrentUser().id) return; + if (["corn", "korn"].every(korn => !e.message.content.includes(korn))) return; + + sendMessage(e.channelId, { + content: "who said korn" + }); + } + } +});