fix(StreamDispatcher): forward error created by AudioPlayer.play()

This commit is contained in:
DevAndromeda 2021-08-12 16:11:33 +05:45
parent 6439590e28
commit 065e028717
No known key found for this signature in database
GPG key ID: FA40E3EC5CB6DCD6

View file

@ -193,7 +193,11 @@ class StreamDispatcher extends EventEmitter<VoiceEvents> {
} }
} }
this.audioPlayer.play(resource); try {
this.audioPlayer.play(resource);
} catch(e) {
this.emit("error", e as AudioPlayerError);
}
return this; return this;
} }