From aacfea05ea6739b3eccde3fee87b87159457cff0 Mon Sep 17 00:00:00 2001 From: vrachv <52053491+vrachv@users.noreply.github.com> Date: Mon, 14 Dec 2020 06:54:31 +0300 Subject: [PATCH] feature: Add max bitrate value to SocketGuild * Update SocketGuild.cs * Fix returns value docs Signed-off-by: Still Hsu Co-authored-by: Still Hsu --- .../Entities/Guilds/SocketGuild.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs index ad58a735e..2f098844f 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs @@ -178,6 +178,26 @@ namespace Discord.WebSocket } } /// + /// Gets the max bitrate for voice channels in this guild. + /// + /// + /// A representing the maximum bitrate value allowed by Discord in this guild. + /// + public int MaxBitrate + { + get + { + var maxBitrate = PremiumTier switch + { + PremiumTier.Tier1 => 128000, + PremiumTier.Tier2 => 256000, + PremiumTier.Tier3 => 384000, + _ => 96000, + }; + return maxBitrate; + } + } + /// /// Gets the embed channel (i.e. the channel set in the guild's widget settings) in this guild. /// ///