mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Set bitrate for voice channels support (#363)
* Set bitrate for voice channels * Docs for bitrate settings and values
This commit is contained in:
committed by
abalabahaha
parent
fe1d0bb595
commit
bea1663052
@@ -27,6 +27,8 @@ var VoiceChannel = (function (_ServerChannel) {
|
||||
_ServerChannel.call(this, data, client, server);
|
||||
this.members = data.members || new _UtilCache2["default"]();
|
||||
this.userLimit = data.user_limit || 0;
|
||||
this._bitrate = data.bitrate || 64000; // incase somebody wants to access the bps value???
|
||||
this.bitrate = Math.round(this._bitrate / 1000); // store as kbps
|
||||
}
|
||||
|
||||
VoiceChannel.prototype.join = function join() {
|
||||
@@ -39,6 +41,10 @@ var VoiceChannel = (function (_ServerChannel) {
|
||||
return this.client.setChannelUserLimit.apply(this.client, [this, arguments]);
|
||||
};
|
||||
|
||||
VoiceChannel.prototype.setBitrate = function setBitrate() {
|
||||
return this.client.setChannelBitrate.apply(this.client, _UtilArgumentRegulariser.reg(this, arguments));
|
||||
};
|
||||
|
||||
return VoiceChannel;
|
||||
})(_ServerChannel3["default"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user