mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Add broadcast.destroy();
This commit is contained in:
parent
dc640017cd
commit
0df17b1634
1 changed files with 8 additions and 1 deletions
|
|
@ -339,10 +339,17 @@ class VoiceBroadcast extends EventEmitter {
|
|||
}
|
||||
|
||||
/**
|
||||
* End the current broadcast, all subscribed dispatchers will also end
|
||||
* Stop the current stream from playing without unsubscribing dispatchers.
|
||||
*/
|
||||
end() {
|
||||
this.killCurrentTranscoder();
|
||||
}
|
||||
|
||||
/**
|
||||
* End the current broadcast, all subscribed dispatchers will also end
|
||||
*/
|
||||
destroy() {
|
||||
this.end();
|
||||
for (const container of this._dispatchers.values()) {
|
||||
for (const dispatcher of container.values()) {
|
||||
dispatcher.destroy('end', 'broadcast ended');
|
||||
|
|
|
|||
Loading…
Reference in a new issue