#16 Update variable name
Some checks failed
DRB Server Build / drb_server_build (push) Successful in 36s
DRB Tests / drb_mocha_tests (push) Failing after 1m13s

This commit is contained in:
Logan Cusano
2024-05-11 14:40:10 -04:00
parent 03c940e07c
commit a4d07db766

View File

@@ -57,15 +57,15 @@ export async function execute(nodeIo, interaction) {
const joinSelectedNode = async (selectedNodeSocketId) => {
const openSocket = await nodeIo.sockets.sockets.get(selectedNodeSocketId);
// Get the open ID for this connection\
const discordToken = await getAvailableTokensInGuild(nodeIo, interaction.guild.id);
console.log("Available discord tokens: ", discordToken);
const ss = await getAvailableTokensInGuild(nodeIo, interaction.guild.id);
console.log("Available discord tokens: ", discordTokens);
if (discordToken.length >= 1) {
if (discordTokens.length >= 1) {
// TODO - Implement a method to have preferred tokens (bot users) for specific systems
console.log("Joining selected open socket:", selectedNodeSocketId, system.name, channelToJoin.id, openSocket.node.name, discordToken[0].token);
console.log("Joining selected open socket:", selectedNodeSocketId, system.name, channelToJoin.id, openSocket.node.name, discordTokens[0].token);
// Ask the node to join the selected channel and system
await requestNodeJoinSystem(openSocket, system.name, channelToJoin.id, discordToken[0].token);
await requestNodeJoinSystem(openSocket, system.name, channelToJoin.id, discordTokens[0].token);
}
else {
return await interaction.editReply({ content: `<@${interaction.member.id}>, there are no free bots. Free up or create a new bot ID (discord app) to listen to this system.`, ephemeral: true })