#16 Update variable name
This commit is contained in:
@@ -57,15 +57,15 @@ export async function execute(nodeIo, interaction) {
|
|||||||
const joinSelectedNode = async (selectedNodeSocketId) => {
|
const joinSelectedNode = async (selectedNodeSocketId) => {
|
||||||
const openSocket = await nodeIo.sockets.sockets.get(selectedNodeSocketId);
|
const openSocket = await nodeIo.sockets.sockets.get(selectedNodeSocketId);
|
||||||
// Get the open ID for this connection\
|
// Get the open ID for this connection\
|
||||||
const discordToken = await getAvailableTokensInGuild(nodeIo, interaction.guild.id);
|
const ss = await getAvailableTokensInGuild(nodeIo, interaction.guild.id);
|
||||||
console.log("Available discord tokens: ", discordToken);
|
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
|
// 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
|
// 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 {
|
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 })
|
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 })
|
||||||
|
|||||||
Reference in New Issue
Block a user