Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Change type of Guild.bitrate_limit to int. #2387

Merged
merged 4 commits into from Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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))
plun1331 marked this conversation as resolved.
Show resolved Hide resolved

## [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