diff options
| author | Rapptz <[email protected]> | 2017-02-21 08:19:32 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-02-21 08:19:32 -0500 |
| commit | 702d596af964bf348fd02b31ca61f255b19f2ea3 (patch) | |
| tree | 94a8d986e68bc223af67e98c9bb93e48f9478161 /discord/permissions.py | |
| parent | Reconnect when a task times out and propagates. (diff) | |
| download | discord.py-702d596af964bf348fd02b31ca61f255b19f2ea3.tar.xz discord.py-702d596af964bf348fd02b31ca61f255b19f2ea3.zip | |
Check that the type in Colour and Permissions are int.
Diffstat (limited to 'discord/permissions.py')
| -rw-r--r-- | discord/permissions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/permissions.py b/discord/permissions.py index c8c8ae37..ee946ff6 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -69,6 +69,9 @@ class Permissions: __slots__ = ('value',) def __init__(self, permissions=0): + if not isinstance(permissions, int): + raise TypeError('Expected int parameter, received %s instead.' % permissions.__class__.__name__) + self.value = permissions def __eq__(self, other): |