From 78d41c6343213cd8ac7fb5976d27ee3e2df412f9 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Fri, 9 Sep 2022 18:33:01 +0500 Subject: [PATCH] =?UTF-8?q?=D0=95=D1=81=D0=BB=D0=B8=20=D0=BE=D1=88=D0=B8?= =?UTF-8?q?=D0=B1=D0=BA=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=B8?= =?UTF-8?q?=D1=81=D0=BA=D0=B5=20=D1=82=D1=80=D0=B5=D0=BA=D0=B0=20=D0=B2?= =?UTF-8?q?=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89=D0=B0=D0=B5=D0=BC=20=D0=B5?= =?UTF-8?q?=D1=91=20=D0=B0=20=D0=BD=D0=B5=20=D0=BC=D0=BE=D0=BB=D1=87=D0=B8?= =?UTF-8?q?=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Music/play.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/Music/play.js b/commands/Music/play.js index 526f1994..24933995 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -69,6 +69,9 @@ class Play extends BaseCommand { searchResult = await client.player.search(query, { requestedBy: interaction.user }); + + if (!searchResult.tracks[0] || !searchResult) + return interaction.editReply({ content: interaction.translate("music/play:NO_RESULT", { query }) }); } } catch (error) { return interaction.editReply({