This commit is contained in:
Jonny_Bro (Nikita) 2024-04-29 16:09:43 +05:00
parent 669e420c52
commit 2ed1602c09
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8
2 changed files with 2 additions and 2 deletions

View file

@ -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 });

View file

@ -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 });