From 2ed1602c09db42e5f483e0b106e8fb5d2c65f5f0 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Mon, 29 Apr 2024 16:09:43 +0500 Subject: [PATCH] fix =) --- commands/Music/play.c.js | 2 +- commands/Music/play.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/Music/play.c.js b/commands/Music/play.c.js index 8330a12e..1d98b053 100644 --- a/commands/Music/play.c.js +++ b/commands/Music/play.c.js @@ -30,7 +30,7 @@ class PlayContext extends BaseCommand { const query = links[0], voice = interaction.member.voice; - if (!voice) return interaction.error("music/play:NO_VOICE_CHANNEL", null, { edit: true }); + if (!voice.channel) return interaction.error("music/play:NO_VOICE_CHANNEL", null, { edit: true }); const perms = voice.channel.permissionsFor(client.user); if (!perms.has(PermissionsBitField.Flags.Connect) || !perms.has(PermissionsBitField.Flags.Speak)) return interaction.error("music/play:VOICE_CHANNEL_CONNECT", null, { edit: true }); diff --git a/commands/Music/play.js b/commands/Music/play.js index 658b8f0c..d8c5f21a 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -41,7 +41,7 @@ class Play extends BaseCommand { const query = interaction.options.getString("query"), voice = interaction.member.voice; - if (!voice) return interaction.error("music/play:NO_VOICE_CHANNEL", null, { edit: true }); + if (!voice.channel) return interaction.error("music/play:NO_VOICE_CHANNEL", null, { edit: true }); const perms = voice.channel.permissionsFor(client.user); if (!perms.has(PermissionsBitField.Flags.Connect) || !perms.has(PermissionsBitField.Flags.Speak)) return interaction.error("music/play:VOICE_CHANNEL_CONNECT", null, { edit: true });