From 23ecdf7eeeb8432a3542193ebe8018b672750f47 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Tue, 3 Nov 2020 21:19:30 +0100 Subject: [PATCH] :bug: Emit error instead of throwing it --- src/Player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.js b/src/Player.js index 8db56cf..f06c56d 100644 --- a/src/Player.js +++ b/src/Player.js @@ -171,7 +171,7 @@ class Player extends EventEmitter { }).catch(() => {}) } - if (tracks.length === 0) throw new Error('No tracks found for the specified query.') + if (tracks.length === 0) this.emit('noResults', message, query) this.emit('searchResults', message, query, tracks)