From f9ce2bfaf9f739b9d41e17db069d43cf1a75c665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Mon, 6 Sep 2021 19:10:15 +0300 Subject: [PATCH] Updated play command --- src/client/commands/play.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/client/commands/play.js b/src/client/commands/play.js index bd88b01..000533e 100644 --- a/src/client/commands/play.js +++ b/src/client/commands/play.js @@ -43,7 +43,10 @@ module.exports = { ephemeral: true }); } - if (!query) return interaction.reply(client.messages.noQuery); + if (!query) return interaction.reply({ + content: client.messages.noQuery, + ephemeral: true + }); const permissions = voiceChannel.permissionsFor(interaction.client.user); if (!permissions.has("CONNECT")) { return interaction.reply({ @@ -75,17 +78,15 @@ module.exports = { station = client.stations[number]; } } else { - if (query.length < 3) - return interaction.reply({ - content: client.messageEmojis["error"] + client.messages.tooShortSearch, - ephemeral: true - }); + if (query.length < 3) return interaction.reply({ + content: client.messageEmojis["error"] + client.messages.tooShortSearch, + ephemeral: true + }); const sstation = await client.funcs.searchStation(query, client); - if (!sstation) - return interaction.reply({ - content: client.messageEmojis["error"] + client.messages.noSearchResults, - ephemeral: true - }); + if (!sstation) return interaction.reply({ + content: client.messageEmojis["error"] + client.messages.noSearchResults, + ephemeral: true + }); url = sstation.stream[sstation.stream.default]; station = sstation; }