mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Check that the type in Colour and Permissions are int.
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user