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/colour.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/colour.py')
| -rw-r--r-- | discord/colour.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/colour.py b/discord/colour.py index b8ee5dae..9f104451 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -46,13 +46,16 @@ class Colour: Attributes ------------ - value : int + value: int The raw integer colour value. """ __slots__ = ('value',) def __init__(self, value): + if not isinstance(value, int): + raise TypeError('Expected int parameter, received %s instead.' % value.__class__.__name__) + self.value = value def _get_byte(self, byte): |