Skip to main content
Module

x/discordeno/template/beginner/mod.ts

Discord API library for Deno
Go to Latest
File
import { startBot } from "./deps.ts";import log from "./src/utils/logger.ts";import { fileLoader, importDirectory } from "./src/utils/loader.ts";import { updateApplicationCommands } from "./src/utils/updateCommands.ts";// setup dbimport "./src/database/mod.ts";import { Bot } from "./bot.ts";
log.info("Starting bot...");
// Forces deno to read all the files which will fill the commands/inhibitors cache etc.await Promise.all( [ "./src/commands", "./src/events", // "./src/tasks", ].map((path) => importDirectory(Deno.realPathSync(path))),);await fileLoader();
// UPDATES YOUR COMMANDS TO LATEST COMMANDSawait updateApplicationCommands();
// STARTS THE CONNECTION TO DISCORDawait startBot(Bot);