From 9b1c86ce8e340f28e594983fbcddceefa2c97482 Mon Sep 17 00:00:00 2001 From: YoggieS <61660055+yoggys@users.noreply.github.com> Date: Fri, 8 Mar 2024 15:18:54 +0100 Subject: [PATCH] feat: Change type of `Guild.bitrate_limit` to `int`. (#2387) * feat: Change type of `Guild.bitrate_limit` to `int`. * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- CHANGELOG.md | 5 +++++ discord/guild.py | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b9b3eae4b..568fdf8b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ possible (see our [Version Guarantees] for more info). These changes are available on the `master` branch, but have not yet been released. +### Changed + +- Changed the type of `Guild.bitrate_limit` to `int`. + ([#2387](https://github.com/Pycord-Development/pycord/pull/2387)) + ## [2.5.0] - 2024-03-02 ### Added diff --git a/discord/guild.py b/discord/guild.py index bdd3bc1f20..c29b0f7157 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -823,14 +823,16 @@ def sticker_limit(self) -> int: ) @property - def bitrate_limit(self) -> float: + def bitrate_limit(self) -> int: """The maximum bitrate for voice channels this guild can have.""" vip_guild = ( self._PREMIUM_GUILD_LIMITS[1].bitrate if "VIP_REGIONS" in self.features else 96e3 ) - return max(vip_guild, self._PREMIUM_GUILD_LIMITS[self.premium_tier].bitrate) + return int( + max(vip_guild, self._PREMIUM_GUILD_LIMITS[self.premium_tier].bitrate) + ) @property def filesize_limit(self) -> int: