|
|
|
@ -4,6 +4,7 @@ import initLocalCommands from "./commands/index.ts";
|
|
|
|
|
import initOnMessage from "./events/onMessage.ts";
|
|
|
|
|
import initAIs from "./ai/index.ts";
|
|
|
|
|
import initDB from "./database.ts";
|
|
|
|
|
import config from "./config.ts";
|
|
|
|
|
|
|
|
|
|
export class GoofyAhhException extends Error {
|
|
|
|
|
constructor(message: string) {
|
|
|
|
@ -19,7 +20,7 @@ initCommands();
|
|
|
|
|
initAIs();
|
|
|
|
|
|
|
|
|
|
await BotEmitter.emit("start", {
|
|
|
|
|
token: Deno.env.get("TOKEN") ?? (() => {
|
|
|
|
|
token: Deno.env.get("TOKEN") ?? config.discord.token ?? (() => {
|
|
|
|
|
throw new GoofyAhhException("No token?");
|
|
|
|
|
})(),
|
|
|
|
|
intents: Intents.Guilds | Intents.GuildMessages | Intents.MessageContent,
|
|
|
|
|