-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish event doesn't get fired when the dispatcher gets ended while the stream is paused #4062
Comments
This because the callback of _write is never called:
A fix is to call disp._writeCallback, bound here: discord.js/src/client/voice/dispatcher/StreamDispatcher.js Lines 228 to 232 in 828640c
Manually with the end() call: setTimeout(() => { disp.end(); disp._writeCallback(); }, 8000); Or in StreamDispatcher.pause(), but it has been removed in e0f5216, maybe for a reason. |
Hi there, We're working on a new implementation of Discord's Voice API that has better playback quality and is more reliable than what we currently support in Discord.js v12 - check it out at https://github.com/discordjs/voice! The new library solves many of the issues that users are facing, and as part of this, we're dropping built-in support for voice in our next major release. We have a PR (#5402) that adds native support for our new voice library - once this PR is merged, this issue will be closed. You can still use our new voice library before that PR lands - just take a look at our music bot example to see how to get started upgrading your voice code. By using the boilerplate music player in the example, you can make it even easier to upgrade your code. Note that the PR above only reduces some of the boilerplate code you'd otherwise have to write - you do not have to wait for the PR to be merged to start using the new voice library. If you have any questions about this, feel free to:
|
Please describe the problem you are having in as much detail as possible:
Basicaly the same as issue #2648. Calling dispatcher.end() or .destroy() while the stream is paused does not emit the
finish
event.Calling .destroy() willing cause the dispatcher to emit
close
, but nofinish
Include a reproducible code sample here, if possible:
Further details:
12.1.1
,828640c
12.14.1
,13.6.0
The text was updated successfully, but these errors were encountered: