- 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,4 +1,4 @@
import { checkIfDiscordVCConnected, joinDiscordVC, leaveDiscordVC, getDiscordUsername, checkIfClientIsOpen } from '../discordAudioBot/dabWrappers.mjs';
import { checkIfDiscordVCConnected, joinDiscordVC, leaveDiscordVC, getDiscordUsername, checkIfClientIsOpen, getDiscordID } from '../discordAudioBot/dabWrappers.mjs';
import { getCurrentSystem } from '../op25Handler/op25Handler.mjs';
import { checkForUpdates } from './selfUpdater.mjs';
@@ -80,6 +80,15 @@ export const nodeGetUsername = async (guildId, socketCallback) => {
socketCallback(await getDiscordUsername(guildId));
}
/**
* Get the ID of the active client
* @param {any} socketCallback The callback function to return the result to
* @callback {any}
*/
export const nodeGetDiscordID = async (socketCallback) => {
socketCallback(await getDiscordID());
}
/**
* Check if the local node has an open discord client in any server