🐛 Emit error instead of throwing it
This commit is contained in:
parent
acdfbba287
commit
23ecdf7eee
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue