Browse Source

Raise when an invalid permission is passed to PermissionOverwrite.

pull/574/head
Rapptz 8 years ago
parent
commit
d672f84932
  1. 3
      discord/permissions.py

3
discord/permissions.py

@ -533,6 +533,9 @@ class PermissionOverwrite:
self._values = {}
for key, value in kwargs.items():
if key not in self.VALID_NAMES:
raise ValueError('no permission called {0}.'.format(key))
setattr(self, key, value)
def _set(self, key, value):

Loading…
Cancel
Save