fix firstResult (#206)

🐛 Fix firstResult
This commit is contained in:
hands8142 2020-12-26 17:53:58 +09:00 committed by GitHub
parent 0a673a84c2
commit e018dcaefe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,7 +174,7 @@ class Player extends EventEmitter {
if (tracks.length === 0) return this.emit('noResults', message, query)
if (firstResult) resolve(tracks[0])
if (firstResult) return resolve(tracks[0])
this.emit('searchResults', message, query, tracks)