From 1c253d25cb1d35aa987d76e07806999c562712d6 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 2 Mar 2025 16:24:26 -0500 Subject: Bringing more features from 2.x; ESLint; API --- bot/src/bot.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bot/src/bot.js') diff --git a/bot/src/bot.js b/bot/src/bot.js index af2aec2..07b13a8 100644 --- a/bot/src/bot.js +++ b/bot/src/bot.js @@ -1,12 +1,14 @@ -import { Client, GatewayIntentBits } from 'discord.js' -import 'dotenv/config' -import { event } from './handler/event.js' -import { commands } from "./handler/commands.js"; +import { Client, GatewayIntentBits } from 'discord.js'; +import 'dotenv/config'; +import { event } from './handlers/event.js'; +import { command } from './handlers/command.js'; +import { apiServer } from '../api/server.js'; const client = new Client({ intents: [GatewayIntentBits.Guilds] }); -commands(client); -event(client); +command(client).then(() => console.log('[i] Command module loaded')); +event(client).then(() => console.log('[i] Event module loaded')); +apiServer(client); if (process.argv.indexOf('--beta') === -1) { client.login(process.env.abtoken).catch(function() { -- cgit v1.2.3