mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Add example for creating VoiceBroadcasts
This commit is contained in:
parent
81b176cfea
commit
dd110f4824
1 changed files with 10 additions and 0 deletions
|
|
@ -13,6 +13,16 @@ const ffmpegArguments = [
|
|||
|
||||
/**
|
||||
* A voice broadcast can be played across multiple voice connections for improved shared-stream efficiency.
|
||||
*
|
||||
* Example usage:
|
||||
* ```js
|
||||
* const broadcast = client.createVoiceBroadcast();
|
||||
* broadcast.playFile('./music.mp3');
|
||||
* // play "music.mp3" in all voice connections that the client is in
|
||||
* for (const connection of client.voiceConnections.values()) {
|
||||
* connection.playBroadcast(broadcast);
|
||||
* }
|
||||
* ```
|
||||
* @implements {VolumeInterface}
|
||||
*/
|
||||
class VoiceBroadcast extends VolumeInterface {
|
||||
|
|
|
|||
Loading…
Reference in a new issue