Browse Source

Fix and add test for missing discord.Permission bits

pull/9912/merge
Michael H 7 months ago
committed by GitHub
parent
commit
59f877fcf0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      discord/permissions.py
  2. 7
      tests/test_permissions_all.py

2
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_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:

7
tests/test_permissions_all.py

@ -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())
Loading…
Cancel
Save