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" }); } } });