Files
DRB-CnC/Client/utilities/configHandler.js
Logan Cusano ace762fc76 Finalizing Server webUI
Still needed:
- Way to update clients' versions
- Way to delete nodes
- working dashboard
- working search function
2023-07-22 01:19:54 -04:00

42 lines
1.3 KiB
JavaScript

// Debug
const { DebugBuilder } = require("../utilities/debugBuilder.js");
const log = new DebugBuilder("client", "configController");
// Modules
const { nodeObject } = require("./utilities.js");
const { getPresets } = require("../utilities/updatePresets");
const { readFileSync } = require('fs');
const path = require("path");
require('dotenv').config();
const GuildID = process.env.GUILD_ID;
const ApplicationID = process.env.APPLICATION_ID;
const DeviceID = parseInt(process.env.AUDIO_DEVICE_ID);
const DeviceName = process.env.AUDIO_DEVICE_NAME;
function getGuildID() {
log.DEBUG("Guild ID: ", GuildID);
return GuildID;
}
exports.getGuildID = getGuildID;
function getApplicationID() {
log.DEBUG("Application ID: ", ApplicationID);
return ApplicationID;
}
exports.getApplicationID = getApplicationID;
function getDeviceID(){
log.DEBUG("Device ID: ", DeviceID);
return DeviceID;
}
exports.getDeviceID = getDeviceID;
function getDeviceName(){
log.DEBUG("Device Name: ", DeviceName);
return DeviceName;
}
exports.getDeviceName = getDeviceID;
exports.getFullConfig = () => {
return new nodeObject({_id: process.env.CLIENT_ID, _ip: process.env.CLIENT_IP, _name: process.env.CLIENT_NAME, _port: process.env.CLIENT_PORT, _location: process.env.CLIENT_LOCATION, _nearbySystems: getPresets()});
}