Skip to content

Commit

Permalink
feat: Change type of Guild.bitrate_limit to int. (#2387)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
yoggys and pre-commit-ci[bot] committed Mar 8, 2024
1 parent 87d2331 commit 9b1c86c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions discord/guild.py
Expand Up @@ -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:
Expand Down

0 comments on commit 9b1c86c

Please sign in to comment.