fix: collector handler should return void

This commit is contained in:
Snowflake107 2021-06-09 19:27:28 +05:45
parent 713ad111dd
commit 311df79adc

View file

@ -172,7 +172,7 @@ export class Player extends EventEmitter {
collector.on('collect', ({ content }) => {
if (content === 'cancel') {
collector.stop();
return this.emit(PlayerEvents.SEARCH_CANCEL, message, query, tracks);
return void this.emit(PlayerEvents.SEARCH_CANCEL, message, query, tracks);
}
if (!isNaN(content) && parseInt(content) >= 1 && parseInt(content) <= tracks.length) {