* Add reasons

* How could I forget

* Hopefully fix conflicts
This commit is contained in:
Pg Biel
2017-07-26 22:14:04 -03:00
committed by Crawl
parent 27196c2f9f
commit eef87e5d97
6 changed files with 78 additions and 50 deletions

View File

@@ -79,6 +79,7 @@ class VoiceChannel extends GuildChannel {
/**
* Sets the bitrate of the channel (in kbps).
* @param {number} bitrate The new bitrate
* @param {string} [reason] Reason for changing the channel's bitrate
* @returns {Promise<VoiceChannel>}
* @example
* // Set the bitrate of a voice channel
@@ -86,14 +87,15 @@ class VoiceChannel extends GuildChannel {
* .then(vc => console.log(`Set bitrate to ${vc.bitrate}kbps for ${vc.name}`))
* .catch(console.error);
*/
setBitrate(bitrate) {
setBitrate(bitrate, reason) {
bitrate *= 1000;
return this.edit({ bitrate });
return this.edit({ bitrate }, reason);
}
/**
* Sets the user limit of the channel.
* @param {number} userLimit The new user limit
* @param {string} [reason] Reason for changing the user limit
* @returns {Promise<VoiceChannel>}
* @example
* // Set the user limit of a voice channel
@@ -101,8 +103,8 @@ class VoiceChannel extends GuildChannel {
* .then(vc => console.log(`Set user limit to ${vc.userLimit} for ${vc.name}`))
* .catch(console.error);
*/
setUserLimit(userLimit) {
return this.edit({ userLimit });
setUserLimit(userLimit, reason) {
return this.edit({ userLimit }, reason);
}
/**