Make docs technically correct

This commit is contained in:
Amish Shah
2018-01-20 13:45:22 +00:00
parent 791740220e
commit ca96e1478a

View File

@@ -38,7 +38,27 @@ class VoiceBroadcast extends EventEmitter {
return this.player.dispatcher;
}
play() {} // eslint-disable-line no-empty-function
/**
* Play an audio resource.
* @param {ReadableStream|string} resource The resource to play.
* @param {StreamOptions} [options] The options to play.
* @example
* // Play a local audio file
* connection.play('/home/hydrabolt/audio.mp3', { volume: 0.5 });
* @example
* // Play a ReadableStream
* connection.play(ytdl('https://www.youtube.com/watch?v=ZlAU_w7-Xp8', { filter: 'audioonly' }));
* @example
* // Play a voice broadcast
* const broadcast = client.createVoiceBroadcast();
* broadcast.play('/home/hydrabolt/audio.mp3');
* connection.play(broadcast);
* @example
* // Using different protocols: https://ffmpeg.org/ffmpeg-protocols.html
* connection.play('http://www.sample-videos.com/audio/mp3/wave.mp3');
* @returns {BroadcastDispatcher}
*/
play() { return null; }
}
PlayInterface.applyToClass(VoiceBroadcast);