document voice

This commit is contained in:
Amish Shah
2016-08-25 19:12:09 +01:00
parent 6d7e649bb1
commit fe3fdb7d6a
5 changed files with 93 additions and 4 deletions

View File

@@ -56,6 +56,13 @@ class VoiceChannel extends GuildChannel {
return this.client.voice.joinChannel(this);
}
/**
* Leaves this voice channel
* @returns {null}
* @example
* // leave a voice channel
* voiceChannel.leave();
*/
leave() {
const exists = this.client.voice.connections.get(this.guild.id);
if (exists) {