mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
Add broadcast.destroy();
This commit is contained in:
@@ -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() {
|
end() {
|
||||||
this.killCurrentTranscoder();
|
this.killCurrentTranscoder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* End the current broadcast, all subscribed dispatchers will also end
|
||||||
|
*/
|
||||||
|
destroy() {
|
||||||
|
this.end();
|
||||||
for (const container of this._dispatchers.values()) {
|
for (const container of this._dispatchers.values()) {
|
||||||
for (const dispatcher of container.values()) {
|
for (const dispatcher of container.values()) {
|
||||||
dispatcher.destroy('end', 'broadcast ended');
|
dispatcher.destroy('end', 'broadcast ended');
|
||||||
|
|||||||
Reference in New Issue
Block a user