Browse Source

Add widget_enabled attribute to Guild

pull/10109/head
xCirno 3 years ago
committed by dolfies
parent
commit
dfff20d5a9
  1. 6
      discord/guild.py

6
discord/guild.py

@ -269,6 +269,10 @@ class Guild(Hashable):
.. versionadded:: 2.0
primary_category_id: Optional[:class:`int`]
The ID of the primary discovery category for the guild.
widget_enabled: :class:`bool`
Indicates if the guild has widget enabled.
.. versionadded:: 2.0
"""
__slots__ = (
@ -295,6 +299,7 @@ class Guild(Hashable):
'vanity_url_code',
'owner_application_id',
'command_counts',
'widget_enabled',
'_members',
'_channels',
'_icon',
@ -511,6 +516,7 @@ class Guild(Hashable):
self.premium_tier: int = guild.get('premium_tier', 0)
self.premium_subscription_count: int = guild.get('premium_subscription_count') or 0
self.vanity_url_code: Optional[str] = guild.get('vanity_url_code')
self.widget_enabled: bool = guild.get('widget_enabled', False)
self._system_channel_flags: int = guild.get('system_channel_flags', 0)
self.preferred_locale: Locale = try_enum(Locale, guild.get('preferred_locale', 'en-US'))
self._discovery_splash: Optional[str] = guild.get('discovery_splash')

Loading…
Cancel
Save