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