Update Bot to latest Discordeno Version 21.0.0 and add nsfw check for rule34 and yandere api calls

This commit is contained in:
fzzinchemical
2025-04-13 21:53:17 +02:00
parent 7e25e13a77
commit 8e466f69c1
9 changed files with 92 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
import { createBot, Intents, startBot } from "npm:discordeno@18.0.1";
import { createBot, Intents, Message } from "@discordeno";
import { messagehandler } from "./messages.ts";
import { EnvConst, loadConfig } from "@root/core/configLoader.ts";
@@ -12,15 +12,14 @@ const bot = createBot({
ready() {
console.log("Bot is ready!");
},
async messageCreate(bot, message) {
await messagehandler(bot, message);
}
}
});
bot.events.messageCreate = async(message) => {
await messagehandler(bot, message as Message)
}
// Setup desired properties
await startBot(bot);
await bot.start()