Files
DRBv3/server/server.js
Logan Cusano 4a0b1004d2 Init Commit
Server
- Working init discord bot
    - Modular events and commands
    - Has access to the socket server
- Working init socket server
    - Need to work on getting access to discord bot
- Working init web server

Currently working on breaking out the init of the socket server

Client
- Working init socket client

Currently working on the discord bot to join voice channels
2024-01-08 00:12:47 -05:00

20 lines
697 B
JavaScript

import { nodeIo, app, server } from './modules/socketServer.mjs';
import { addEnabledCommands, addEnabledEventListeners } from './discordBot/modules/discordBotUtils.mjs'
import { serverClient } from './modules/discordBot.mjs';
import dotenv from 'dotenv';
dotenv.config()
// Startup the node server
server.listen(3000, () => {
console.log('server running at http://localhost:3000');
});
// Config the discord bot with commands and events
await addEnabledEventListeners(serverClient, nodeIo);
await addEnabledCommands(serverClient, nodeIo);
// Startup the discord bot
console.log(`Logging into discord with ID: ${process.env.DISCORD_TOKEN}`);
serverClient.login(process.env.DISCORD_TOKEN);