Skip to content

Commit

Permalink
Add missing poll permissions to permission classmethods
Browse files Browse the repository at this point in the history
  • Loading branch information
z03h committed May 10, 2024
1 parent e43bd86 commit f851d9a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions discord/permissions.py
Expand Up @@ -187,7 +187,7 @@ def all(cls) -> Self:
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:
Expand Down Expand Up @@ -235,8 +235,11 @@ def all_channel(cls) -> Self:
.. 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:
Expand Down Expand Up @@ -278,8 +281,11 @@ def text(cls) -> Self:
.. 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:
Expand Down

0 comments on commit f851d9a

Please sign in to comment.