Take into consideration member timeouts in permission calculations

This commit is contained in:
Rapptz
2022-04-01 09:32:54 -04:00
parent 25ad5b675c
commit a5f1c2f592
3 changed files with 22 additions and 2 deletions

View File

@ -151,6 +151,13 @@ class Permissions(BaseFlags):
"""
return cls(0b11111111111111111111111111111111111111111)
@classmethod
def _timeout_mask(cls) -> int:
p = cls.all()
p.view_channel = False
p.read_message_history = False
return ~p.value
@classmethod
def all_channel(cls) -> Self:
"""A :class:`Permissions` with all channel-specific permissions set to