Browse Source

Add __int__ to discord.Colour

pull/6799/head
ppotatoo 4 years ago
committed by GitHub
parent
commit
f4a861d76e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      discord/colour.py

7
discord/colour.py

@ -53,6 +53,10 @@ class Colour:
.. describe:: str(x)
Returns the hex format for the colour.
.. describe:: int(x)
Returns the raw color value.
Attributes
------------
@ -79,6 +83,9 @@ class Colour:
def __str__(self):
return f'#{self.value:0>6x}'
def __int__(self):
return self.value
def __repr__(self):
return f'<Colour value={self.value}>'

Loading…
Cancel
Save