mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +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
@@ -9,6 +9,8 @@ export default class VoiceChannel extends ServerChannel{
|
||||
super(data, client, server);
|
||||
this.members = data.members || new Cache();
|
||||
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
|
||||
}
|
||||
|
||||
join(callback = function () { }) {
|
||||
@@ -18,4 +20,8 @@ export default class VoiceChannel extends ServerChannel{
|
||||
setUserLimit() {
|
||||
return this.client.setChannelUserLimit.apply(this.client, [this, arguments]);
|
||||
}
|
||||
|
||||
setBitrate() {
|
||||
return this.client.setChannelBitrate.apply(this.client, reg(this, arguments));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user