mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-28 06:20:12 +00:00
* fix: bot pkg test * Fix code style issues with ESLint * Update Guild.ts * Update Guild.ts * Fix code style issues with ESLint Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: Jonathan Ho <heiheiho000@gmail.com>
26 lines
745 B
TypeScript
26 lines
745 B
TypeScript
import { startBot } from './deps.ts.js';
|
|
import log from './src/utils/logger.ts.js';
|
|
import { fileLoader, importDirectory } from './src/utils/loader.ts.js';
|
|
import { updateApplicationCommands } from './src/utils/updateCommands.ts.js';
|
|
// setup db
|
|
import './src/database/mod.ts.js';
|
|
import { Bot } from './bot.ts.js';
|
|
|
|
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 COMMANDS
|
|
await updateApplicationCommands();
|
|
|
|
// STARTS THE CONNECTION TO DISCORD
|
|
await startBot(Bot);
|