Skip to content

Commit 0681805

Browse files
committed
Add support for toggling premium_progress_bar
1 parent fc58675 commit 0681805

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

discord/guild.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,7 @@ async def edit(
13761376
preferred_locale: str = MISSING,
13771377
rules_channel: Optional[TextChannel] = MISSING,
13781378
public_updates_channel: Optional[TextChannel] = MISSING,
1379+
premium_progress_bar_enabled: bool = MISSING,
13791380
) -> Guild:
13801381
r"""|coro|
13811382
@@ -1453,6 +1454,8 @@ async def edit(
14531454
The new channel that is used for public updates from Discord. This is only available to
14541455
guilds that contain ``PUBLIC`` in :attr:`Guild.features`. Could be ``None`` for no
14551456
public updates channel.
1457+
premium_progress_bar_enabled: :class:`bool`
1458+
Whether the guild should have premium progress bar enabled.
14561459
reason: Optional[:class:`str`]
14571460
The reason for editing this guild. Shows up on the audit log.
14581461
@@ -1583,6 +1586,9 @@ async def edit(
15831586
)
15841587

15851588
fields['features'] = features
1589+
1590+
if premium_progress_bar_enabled is not MISSING:
1591+
fields['premium_progress_bar_enabled'] = premium_progress_bar_enabled
15861592

15871593
data = await http.edit_guild(self.id, reason=reason, **fields)
15881594
return Guild(data=data, state=self._state)

discord/http.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ def edit_guild(self, guild_id: Snowflake, *, reason: Optional[str] = None, **fie
10771077
'rules_channel_id',
10781078
'public_updates_channel_id',
10791079
'preferred_locale',
1080+
'premium_progress_bar_enabled',
10801081
)
10811082

10821083
payload = {k: v for k, v in fields.items() if k in valid_keys}

0 commit comments

Comments
 (0)