Browse Source

Add missing poll permissions to permission classmethods

pull/9824/head
z03h 11 months ago
committed by GitHub
parent
commit
f851d9aa3f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      discord/permissions.py

12
discord/permissions.py

@ -187,7 +187,7 @@ class Permissions(BaseFlags):
permissions set to ``True``.
"""
# Some of these are 0 because we don't want to set unnecessary bits
return cls(0b0000_0000_0000_0000_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111)
return cls(0b0000_0000_0000_0010_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111)
@classmethod
def _timeout_mask(cls) -> int:
@ -235,8 +235,11 @@ class Permissions(BaseFlags):
.. versionchanged:: 2.3
Added :attr:`use_soundboard`, :attr:`create_expressions` permissions.
.. versionchanged:: 2.4
Added :attr:`send_polls`, :attr:`send_voice_messages` permissions.
"""
return cls(0b0000_0000_0000_0000_0000_0100_0111_1101_1011_0011_1111_0111_1111_1111_0101_0001)
return cls(0b0000_0000_0000_0010_0100_0100_0111_1101_1011_0011_1111_0111_1111_1111_0101_0001)
@classmethod
def general(cls) -> Self:
@ -278,8 +281,11 @@ class Permissions(BaseFlags):
.. versionchanged:: 2.3
Added :attr:`send_voice_messages` permission.
.. versionchanged:: 2.4
Added :attr:`send_polls` permission.
"""
return cls(0b0000_0000_0000_0000_0100_0000_0111_1100_1000_0000_0000_0111_1111_1000_0100_0000)
return cls(0b0000_0000_0000_0010_0100_0000_0111_1100_1000_0000_0000_0111_1111_1000_0100_0000)
@classmethod
def voice(cls) -> Self:

Loading…
Cancel
Save