mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Fix and add test for missing discord.Permission bits
This commit is contained in:
@ -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
Normal file
7
tests/test_permissions_all.py
Normal file
@ -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())
|
Reference in New Issue
Block a user