From 9fe12594cbb85ca3a28d3efd246353b797e0f620 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sun, 26 Dec 2021 12:57:03 +0500 Subject: [PATCH] fix error --- commands/Music/play.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/Music/play.js b/commands/Music/play.js index b644c657..b315454e 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -27,7 +27,12 @@ class Play extends Command { const perms = voice.permissionsFor(this.client.user); if (!perms.has("CONNECT") || !perms.has("SPEAK")) return message.error("music/play:VOICE_CHANNEL_CONNECT"); - await this.client.player.play(message, args.join(" ")); + try { + await this.client.player.play(message, args.join(" ")); + } catch (e) { + message.error("music/play:ERR_OCCURRED", { error: e }); + console.error(e); + } } };