- Server can now choose from IDs in the DB
- Implemented an active system to disable some IDs from being used
This commit is contained in:
Logan Cusano
2024-03-24 02:45:34 -04:00
parent bee95ed999
commit fea7ed2c7f
8 changed files with 205 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
import { io } from "socket.io-client";
import { logIntoServerWrapper, nodeCheckStatus, nodeJoinServer, nodeLeaveServer, nodeGetUsername, nodeCheckDiscordClientStatus, nodeCheckCurrentSystem, nodeUpdate } from "./socketClientWrappers.mjs";
import { logIntoServerWrapper, nodeCheckStatus, nodeJoinServer, nodeLeaveServer, nodeGetUsername, nodeCheckDiscordClientStatus, nodeCheckCurrentSystem, nodeUpdate, nodeGetDiscordID } from "./socketClientWrappers.mjs";
/**
* Initialize the socket connection with the server, this will handle disconnects within itself
@@ -36,6 +36,9 @@ export const initSocketConnection = async (localNodeConfig) => {
// Requested to get the discord username in a given guild
socket.on('node-get-discord-username', nodeGetUsername);
// Requested to get the ID of the active discord client
socket.on('node-get-discord-id', nodeGetDiscordID);
// Requested to check if the node is connected to VC in a given guild
socket.on('node-check-connected-status', nodeCheckStatus);