Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ These changes are available on the `master` branch, but have not yet been releas

### Added

- Added `PRUNE_REQUIRES_ADMIN`, `GUESTS_ENABLED`, `GUILD_TAGS`, and `CREATOR_STORE_PAGE`
to the `GuildFeature` type.
([#3350](https://github.com/Pycord-Development/pycord/pull/3350))
- Added `Member.vr_status` property.
([#3328](https://github.com/Pycord-Development/pycord/pull/3328))

Expand Down
17 changes: 15 additions & 2 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -2702,8 +2702,13 @@ async def prune_members(
The inactive members are denoted if they have not logged on in
``days`` number of days and have no roles.

You must have the :attr:`~Permissions.kick_members` permission
to use this.
You must have the :attr:`~Permissions.kick_members` and
:attr:`~Permissions.manage_guild` permissions to use this. If the guild has the
``PRUNE_REQUIRES_ADMIN`` guild feature, you must have the
:attr:`~Permissions.administrator` permission instead.

.. versionchanged:: 2.9
The ``PRUNE_REQUIRES_ADMIN`` guild feature requirement was added.

To check how many members you would prune without actually pruning,
see the :meth:`estimate_pruned_members` function.
Expand Down Expand Up @@ -2816,6 +2821,14 @@ async def estimate_pruned_members(
pruning members, it returns how many members it would prune
from the guild had it been called.

You must have the :attr:`~Permissions.kick_members` and
:attr:`~Permissions.manage_guild` permissions to use this. If the guild has the
``PRUNE_REQUIRES_ADMIN`` guild feature, you must have the
:attr:`~Permissions.administrator` permission instead.

.. versionchanged:: 2.9
The ``PRUNE_REQUIRES_ADMIN`` guild feature requirement was added.

Parameters
----------
days: :class:`int`
Expand Down
4 changes: 4 additions & 0 deletions discord/types/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ class UnavailableGuild(TypedDict):
"CHANNEL_BANNER",
"COMMERCE",
"COMMUNITY",
"CREATOR_STORE_PAGE",
"DEVELOPER_SUPPORT_SERVER",
"DISCOVERABLE",
"FEATURABLE",
"GUESTS_ENABLED",
"GUILD_TAGS",
"HAS_DIRECTORY_ENTRY",
"HUB",
"INTERNAL_EMPLOYEE_ONLY",
Expand All @@ -90,6 +93,7 @@ class UnavailableGuild(TypedDict):
"PARTNERED",
"PREMIUM_TIER_3_OVERRIDE",
"PREVIEW_ENABLED",
"PRUNE_REQUIRES_ADMIN",
"ROLE_ICONS",
"ROLE_SUBSCRIPTIONS_ENABLED",
"RAID_ALERTS_DISABLED",
Expand Down