mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Reasons (#1715)
* Add reasons * How could I forget * Hopefully fix conflicts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user