Updated play command

This commit is contained in:
Christer Warén 2021-09-06 18:38:46 +03:00
parent fa4f5e1e09
commit 894a1d82f5

View File

@ -17,7 +17,10 @@ module.exports = {
let message = {}; let message = {};
if(!client.stations) { if(!client.stations) {
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild); message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist); return interaction.reply({
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
ephemeral: true
});
} }
let query = interaction.options?.getString("query") ?? interaction.values?.[0]; let query = interaction.options?.getString("query") ?? interaction.values?.[0];
@ -28,7 +31,7 @@ module.exports = {
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 (!radio) {
if (!interaction.member.voice.channel) if (!voiceChannel)
return interaction.reply({ return interaction.reply({
content: client.messageEmojis["error"] + client.messages.noVoiceChannel, content: client.messageEmojis["error"] + client.messages.noVoiceChannel,
ephemeral: true ephemeral: true