Update Bot to latest Discordeno Version 21.0.0 and add nsfw check for rule34 and yandere api calls
This commit is contained in:
13
src/bot.ts
13
src/bot.ts
@@ -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()
|
||||
Reference in New Issue
Block a user