Skip to content

Commit 59f877f

Browse files
Fix and add test for missing discord.Permission bits
1 parent df4b1c8 commit 59f877f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

discord/permissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def all(cls) -> Self:
187187
permissions set to ``True``.
188188
"""
189189
# Some of these are 0 because we don't want to set unnecessary bits
190-
return cls(0b0000_0000_0000_0010_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111)
190+
return cls(0b0000_0000_0000_0110_0111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111)
191191

192192
@classmethod
193193
def _timeout_mask(cls) -> int:

tests/test_permissions_all.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import discord
2+
3+
from functools import reduce
4+
from operator import or_
5+
6+
def test_permissions_all():
7+
assert discord.Permissions.all().value == reduce(or_, discord.Permissions.VALID_FLAGS.values())

0 commit comments

Comments
 (0)