Compare commits

..

3 Commits

Author SHA1 Message Date
Logan Cusano
565fd5af37 Updated join voice log
All checks were successful
DRB Build Tests / drb_build_and_test (push) Successful in 1m27s
2024-04-26 21:30:27 -04:00
Logan Cusano
f04154d361 Remove client build test for now 2024-04-26 21:29:10 -04:00
Logan Cusano
383663e980 #30 Update discordBot
- Added voice states intent
2024-04-26 21:28:49 -04:00
3 changed files with 3 additions and 2 deletions

View File

@@ -41,9 +41,10 @@ export async function autocomplete(nodeIo, interaction) {
*/ */
export async function execute(nodeIo, interaction) { export async function execute(nodeIo, interaction) {
// Check if the user is in a VC // Check if the user is in a VC
if (!interaction.member.voice.channel) { return await interaction.editReply({ content: `<@${interaction.member.id}>, you need to enter a voice channel before use the command`, ephemeral: true }) } if (!interaction.member.voice.channel) { return await interaction.editReply({ content: `<@${interaction.member.id}>, you need to enter a voice channel before you use this command`, ephemeral: true }) }
// Grab the channel if the user is connected to VC // Grab the channel if the user is connected to VC
const channelToJoin = interaction.member.voice.channel; const channelToJoin = interaction.member.voice.channel;
console.log(`The user '${interaction.member.id}' is in the voice channel '${channelToJoin}'`);
// Get the selected system option from the command interaction // Get the selected system option from the command interaction
const selectedSystem = interaction.options.getString('system'); const selectedSystem = interaction.options.getString('system');

View File

@@ -74,7 +74,7 @@ export function addEnabledEventListeners(serverClient, _eventsPath = "./events")
} }
// The discord client // The discord client
export const serverClient = new Client({ intents: [GatewayIntentBits.Guilds] }); export const serverClient = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates] });
// Run when the bot is ready // Run when the bot is ready
serverClient.on('ready', async () => { serverClient.on('ready', async () => {