mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-22 19:06:44 +00:00
parent
b9e1bdf87e
commit
1c03a4aac9
@ -484,6 +484,9 @@ class PermissionOverwrite:
|
|||||||
if value not in (True, None, False):
|
if value not in (True, None, False):
|
||||||
raise TypeError('Expected bool or NoneType, received {0.__class__.__name__}'.format(value))
|
raise TypeError('Expected bool or NoneType, received {0.__class__.__name__}'.format(value))
|
||||||
|
|
||||||
|
if value is None:
|
||||||
|
self._values.pop(key, None)
|
||||||
|
else:
|
||||||
self._values[key] = value
|
self._values[key] = value
|
||||||
|
|
||||||
def pair(self):
|
def pair(self):
|
||||||
@ -525,7 +528,7 @@ class PermissionOverwrite:
|
|||||||
:class:`bool`
|
:class:`bool`
|
||||||
Indicates if the overwrite is empty.
|
Indicates if the overwrite is empty.
|
||||||
"""
|
"""
|
||||||
return all(x is None for x in self._values.values())
|
return len(self._values) == 0
|
||||||
|
|
||||||
def update(self, **kwargs):
|
def update(self, **kwargs):
|
||||||
r"""Bulk updates this permission overwrite object.
|
r"""Bulk updates this permission overwrite object.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user