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
This commit is contained in:
19
server/server.js
Normal file
19
server/server.js
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user