Skip to content

Commit 4dedcf2

Browse files
authored
Merge pull request #583 from Pycord-Development/fix-perms
Fix timeout permission
2 parents 83655a5 + d90d1ea commit 4dedcf2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

discord/member.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ def _update_inner_user(self, user: UserPayload) -> Optional[Tuple[User, User]]:
414414

415415
@property
416416
def status(self) -> Status:
417-
""":class:`Status`: The member's overall status. If the value is unknown, then it will be a :class:`str` instead."""
417+
""":class:`Status`: The member's overall status.
418+
If the value is unknown, then it will be a :class:`str` instead.
419+
"""
418420
return try_enum(Status, self._client_status[None])
419421

420422
@property
@@ -675,7 +677,7 @@ async def edit(
675677
+------------------------------+--------------------------------------+
676678
| voice_channel | :attr:`Permissions.move_members` |
677679
+------------------------------+--------------------------------------+
678-
| communication_disabled_until | :attr:`Permissions.manage_members` |
680+
| communication_disabled_until | :attr:`Permissions.moderate_members` |
679681
+------------------------------+--------------------------------------+
680682
681683
All parameters are optional.
@@ -779,7 +781,7 @@ async def timeout(self, until: Optional[datetime.datetime], reason: str = None)
779781
780782
Timeouts a member from the guild for the set duration.
781783
782-
You must have the :attr:`~Permissions.manage_members` permission to
784+
You must have the :attr:`~Permissions.moderate_members` permission to
783785
timeout a member.
784786
785787
Parameters
@@ -803,7 +805,7 @@ async def remove_timeout(self, reason: str = None) -> None:
803805
804806
Removes the timeout from a member.
805807
806-
You must have the :attr:`~Permissions.manage_members` permission to
808+
You must have the :attr:`~Permissions.moderate_members` permission to
807809
remove the timeout.
808810
809811
This is equivalent to calling :meth:`~.timeout` and passing ``None`` to :param:`~.timeout.until`.

discord/permissions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ def start_embedded_activities(self) -> int:
561561
return 1 << 39
562562

563563
@flag_value
564-
def manage_members(self) -> int:
565-
""":class:`bool`: Returns ``True`` if a user can manage members (timeout).
564+
def moderate_members(self) -> int:
565+
""":class:`bool`: Returns ``True`` if a user can moderate members (timeout).
566566
567567
.. versionadded:: 2.0
568568
"""
@@ -682,7 +682,7 @@ class PermissionOverwrite:
682682
external_stickers: Optional[bool]
683683
use_external_stickers: Optional[bool]
684684
start_embedded_activities: Optional[bool]
685-
manage_members: Optional[bool]
685+
moderate_members: Optional[bool]
686686

687687
def __init__(self, **kwargs: Optional[bool]):
688688
self._values: Dict[str, Optional[bool]] = {}

0 commit comments

Comments
 (0)