aboutsummaryrefslogtreecommitdiff
path: root/discord/colour.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-02-21 08:19:32 -0500
committerRapptz <[email protected]>2017-02-21 08:19:32 -0500
commit702d596af964bf348fd02b31ca61f255b19f2ea3 (patch)
tree94a8d986e68bc223af67e98c9bb93e48f9478161 /discord/colour.py
parentReconnect when a task times out and propagates. (diff)
downloaddiscord.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.py5
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):