mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
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.
This commit is contained in:
parent
31cc4c39de
commit
8ba78168a6
@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from .enums import ActivityType, try_enum
|
from .enums import ActivityType, try_enum
|
||||||
|
from .colour import Colour
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
__all__ = ('Activity', 'Streaming', 'Game', 'Spotify')
|
__all__ = ('Activity', 'Streaming', 'Game', 'Spotify')
|
||||||
@ -456,6 +457,20 @@ class Spotify:
|
|||||||
"""
|
"""
|
||||||
return ActivityType.listening
|
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):
|
def to_dict(self):
|
||||||
return {
|
return {
|
||||||
'flags': 48, # SYNC | PLAY
|
'flags': 48, # SYNC | PLAY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user