Skip to content

Commit

Permalink
Add guild.premium_progress_bar_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorukyum committed Oct 26, 2021
1 parent 2bbf063 commit fc58675
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ class Guild(Hashable):
The number goes from 0 to 3 inclusive.
premium_subscription_count: :class:`int`
The number of "boosts" this guild currently has.
premium_progress_bar_enabled: :class:`bool`
Indicates if the guild has premium progress bar enabled.
.. versionadded:: 2.0
preferred_locale: Optional[:class:`str`]
The preferred locale for the guild. Used when filtering Server Discovery
results to a specific language.
Expand Down Expand Up @@ -269,6 +273,7 @@ class Guild(Hashable):
'max_video_channel_users',
'premium_tier',
'premium_subscription_count',
'premium_progress_bar_enabled',
'preferred_locale',
'nsfw_level',
'_members',
Expand Down Expand Up @@ -449,6 +454,7 @@ def _from_data(self, guild: GuildPayload) -> None:
self.max_video_channel_users: Optional[int] = guild.get('max_video_channel_users')
self.premium_tier: int = guild.get('premium_tier', 0)
self.premium_subscription_count: int = guild.get('premium_subscription_count') or 0
self.premium_progress_bar_enabled: bool = guild.get('premium_progress_bar_enabled') or False
self._system_channel_flags: int = guild.get('system_channel_flags', 0)
self.preferred_locale: Optional[str] = guild.get('preferred_locale')
self._discovery_splash: Optional[str] = guild.get('discovery_splash')
Expand Down
1 change: 1 addition & 0 deletions discord/types/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class _GuildOptional(TypedDict, total=False):
max_presences: Optional[int]
max_members: int
premium_subscription_count: int
premium_progress_bar_enabled: bool
max_video_channel_users: int


Expand Down

0 comments on commit fc58675

Please sign in to comment.