Refactor message handling by creating dedicated handlers for rule34 and yandere plugins, and add default string utility function

This commit is contained in:
fzzinchemical
2025-03-26 19:24:38 +01:00
parent 58c7932481
commit a16b4dcb17
6 changed files with 128 additions and 100 deletions

View File

@@ -1,5 +1,5 @@
import { createBot, Intents, startBot } from "npm:discordeno@18.0.1";
import { messagehandler } from "./messages.ts";
import { yandereMessageHandler } from "./messages.ts";
const BOT_TOKEN = Deno.env.get("BOT_TOKEN") ?? "";
if (!BOT_TOKEN) {
@@ -14,7 +14,7 @@ const bot = createBot({
console.log("Bot is ready!");
},
async messageCreate(bot, message) {
await messagehandler(bot, message);
await yandereMessageHandler(bot, message);
}
}
});