Browse Source

Add Spotify intergration colour

Added property `colour` and alias `color` which returns the Spotify
integration colour (#1db954).

Technically Discord uses both (#1cb050 and #1db954) but it appears the
former is an official Spotify colour.
pull/1117/merge
Myst(MysterialPy) 7 years ago
committed by Rapptz
parent
commit
8ba78168a6
  1. 15
      discord/activity.py

15
discord/activity.py

@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE.
"""
from .enums import ActivityType, try_enum
from .colour import Colour
import datetime
__all__ = ('Activity', 'Streaming', 'Game', 'Spotify')
@ -456,6 +457,20 @@ class Spotify:
"""
return ActivityType.listening
@property
def colour(self):
"""Returns the Spotify integration colour, as a :class:`Colour`.
There is an alias for this named :meth:`color`"""
return Colour(0x1db954)
@property
def color(self):
"""Returns the Spotify integration colour, as a :class:`Colour`.
There is an alias for this named :meth:`colour`"""
return self.colour
def to_dict(self):
return {
'flags': 48, # SYNC | PLAY

Loading…
Cancel
Save