Resolve bug when checking if user is in channel

This commit is contained in:
Logan Cusano
2023-07-01 18:19:53 -04:00
parent 7a0664ad0c
commit a603a53602

View File

@@ -130,8 +130,8 @@ module.exports = {
try{
const guildId = interaction.guild.id;
const presetName = interaction.options.getString('preset');
if (!interaction.member.voice.channel) return interaction.editReply(`You need to be in a voice channel, ${interaction.user}`)
const channelId = interaction.member.voice.channel.id;
if (!channelId) return interaction.editReply(`You need to be in a voice channel, ${interaction.user}`);
log.DEBUG(`Join requested by: ${interaction.user.username}, to: '${presetName}', in channel: ${channelId} / ${guildId}`);
const connections = await getAllConnections();