From de5bc5d37b68f55eb8752e427a2a9175be55f636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Wed, 1 May 2024 10:06:01 +0200 Subject: [PATCH] fix for #311 (#315) * fix for #311 --- src/commands/voice.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/voice.js b/src/commands/voice.js index 49e3828fb..03debb4e1 100644 --- a/src/commands/voice.js +++ b/src/commands/voice.js @@ -61,7 +61,10 @@ module.exports = { await DiscordMessages.sendVoiceMessage(interaction, client.intlGet(interaction.guildId, 'commandsVoiceBotJoinedVoice')); client.log(client.intlGet(null, 'infoCap'), client.intlGet(interaction.guildId, 'commandsVoiceJoin', - { name: voiceChannel.name, id: voiceChannel.id, guild: voiceChannel.guild.name })); + { name: voiceChannel && voiceChannel.name ? voiceChannel.name : client.intlGet(interaction.guildId, 'unknown'), + id: voiceChannel && voiceChannel.id ? voiceChannel.id : client.intlGet(interaction.guildId, 'unknown'), + guild: voiceChannel && voiceChannel.guild.name ? voiceChannel.guild.name : client.intlGet(interaction.guildId, 'unknown')} + )); } else { await DiscordMessages.sendVoiceMessage(interaction,