Document GuildChannel.edit, add VoiceChannel.setUserLimit, fix typo (#866)

This commit is contained in:
Programmix
2016-10-31 22:42:05 -07:00
committed by Schuyler Cebulskie
parent 2a50dad852
commit 9a61de1493
5 changed files with 57 additions and 21 deletions

View File

@@ -72,7 +72,21 @@ class VoiceChannel extends GuildChannel {
* .catch(console.error);
*/
setBitrate(bitrate) {
return this.rest.client.rest.methods.updateChannel(this, { bitrate });
return this.edit({ bitrate });
}
/**
* Sets the user limit of the channel
* @param {number} userLimit The new user limit
* @returns {Promise<VoiceChannel>}
* @example
* // set the user limit of a voice channel
* voiceChannel.setUserLimit(42)
* .then(vc => console.log(`Set user limit to ${vc.userLimit} for ${vc.name}`))
* .catch(console.error);
*/
setUserLimit(userLimit) {
return this.edit({ userLimit });
}
/**