mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 16:24:14 +00:00
Raise when an invalid permission is passed to PermissionOverwrite.
This commit is contained in:
parent
3436792614
commit
d672f84932
@ -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…
x
Reference in New Issue
Block a user