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:
40
client/modules/clientObjectDefinitions.mjs
Normal file
40
client/modules/clientObjectDefinitions.mjs
Normal file
@@ -0,0 +1,40 @@
|
||||
import dotenv from 'dotenv';
|
||||
dotenv.config()
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class ClientNodeObject {
|
||||
/**
|
||||
*
|
||||
* @param {string} param0._id The ID of the node (Assigned by the client on first boot)
|
||||
* @param {string} param0._name The name of the node (Assigned by the user)
|
||||
* @param {string} param0._location The physical location of the node (Assigned by the user)
|
||||
* @param {object} param0._nearbySystems An object array of nearby systems (Assigned by the user)
|
||||
*/
|
||||
constructor({ _id = undefined, _name = undefined, _location = undefined, _nearbySystems = undefined}) {
|
||||
this.id = _id;
|
||||
this.name = _name;
|
||||
this.location = _location;
|
||||
this.nearbySystems = _nearbySystems;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** The configuration object for the node */
|
||||
export class ClientNodeConfig {
|
||||
constructor({
|
||||
_id = process.env.CLIENT_ID,
|
||||
_name = process.env.CLIENT_NAME,
|
||||
_location = process.env.CLIENT_LOCATION,
|
||||
_nearbySystems = undefined, // TODO - Get the presets when loading the config instead of having to do it after the fact
|
||||
_serverIp = process.env.SERVER_IP,
|
||||
_serverPort = process.env.SERVER_PORT,
|
||||
}) {
|
||||
this.node = new ClientNodeObject({
|
||||
_id:_id, _name:_name, _location:_location, _nearbySystems:_nearbySystems
|
||||
});
|
||||
this.serverIp = _serverIp;
|
||||
this.serverPort = _serverPort;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user