Skip to content

Commit

Permalink
Fix and add test for missing discord.Permission bits
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeshardmind authored Sep 2, 2024
1 parent df4b1c8 commit 59f877f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion discord/permissions.py
Original file line number Diff line number Diff line change
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_0010_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111)
return cls(0b0000_0000_0000_0110_0111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111)

@classmethod
def _timeout_mask(cls) -> int:
Expand Down
7 changes: 7 additions & 0 deletions tests/test_permissions_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import discord

from functools import reduce
from operator import or_

def test_permissions_all():
assert discord.Permissions.all().value == reduce(or_, discord.Permissions.VALID_FLAGS.values())

0 comments on commit 59f877f

Please sign in to comment.