diff --git a/CHANGELOG.md b/CHANGELOG.md index 0df83c03a2..95e18ea0c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2556](https://github.com/Pycord-Development/pycord/pull/2556)) - Added optional `filter` parameter to `utils.basic_autocomplete()`. ([#2590](https://github.com/Pycord-Development/pycord/pull/2590)) +- Added optional `guild_id` parameter to `Client.entitlements()`. + ([#2597](https://github.com/Pycord-Development/pycord/pull/2597)) ### Fixed diff --git a/discord/client.py b/discord/client.py index 7f13696f6f..7abe5456e9 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2058,6 +2058,7 @@ def entitlements( after: SnowflakeTime | None = None, limit: int | None = 100, guild: Snowflake | None = None, + guild_id: int | None = None, exclude_ended: bool = False, ) -> EntitlementIterator: """Returns an :class:`.AsyncIterator` that enables fetching the application's entitlements. @@ -2084,6 +2085,9 @@ def entitlements( Defaults to ``100``. guild: :class:`.abc.Snowflake` | None Limit the fetched entitlements to entitlements owned by this guild. + If not ``None``, ``guild`` takes priority over ``guild_id``. + guild_id: :class:`int` | None + Limit the fetched entitlements to entitlements owned by a guild with this ID. exclude_ended: :class:`bool` Whether to limit the fetched entitlements to those that have not ended. Defaults to ``False``. @@ -2119,7 +2123,7 @@ def entitlements( before=before, after=after, limit=limit, - guild_id=guild.id if guild else None, + guild_id=guild.id if guild else guild_id if guild_id else None, exclude_ended=exclude_ended, )