Browse Source

Add PermissionOverwrite.is_empty to query empty state of an overwrite.

Fixes #382
pull/408/head
Rapptz 8 years ago
parent
commit
fb1f9ac659
  1. 8
      discord/permissions.py

8
discord/permissions.py

@ -557,6 +557,14 @@ class PermissionOverwrite:
return ret
def is_empty(self):
"""Checks if the permission overwrite is currently empty.
An empty permission overwrite is one that has no overwrites set
to True or False.
"""
return all(x is None for x in self._values.values())
def update(self, **kwargs):
"""Bulk updates this permission overwrite object.

Loading…
Cancel
Save