Updated play.js

This commit is contained in:
Christer Warén 2021-09-06 19:43:28 +03:00
parent 8316723a6a
commit d1fe9177af

View File

@ -30,15 +30,12 @@ module.exports = {
let url = query ? query.replace(/<(.+)>/g, "$1") : "";
const radio = client.radio.get(interaction.guild.id);
const voiceChannel = interaction.member.voice.channel;
if (!radio) {
if (!voiceChannel)
return interaction.reply({
if (!voiceChannel) return interaction.reply({
content: client.messageEmojis["error"] + client.messages.noVoiceChannel,
ephemeral: true
});
} else {
if (voiceChannel !== radio.voiceChannel)
return interaction.reply({
if (radio) {
if (voiceChannel !== radio.voiceChannel) return interaction.reply({
content: client.messageEmojis["error"] + client.messages.wrongVoiceChannel,
ephemeral: true
});