Browse Source

Add aliases for button style colours

pull/6961/head
Rapptz 4 years ago
parent
commit
80fd222ca0
  1. 6
      discord/enums.py
  2. 13
      docs/api.rst

6
discord/enums.py

@ -468,6 +468,12 @@ class ButtonStyle(Enum):
danger = 4
link = 5
# Aliases
blurple = 1
grey = 2
green = 3
red = 4
def __int__(self):
return self.value

13
docs/api.rst

@ -1234,6 +1234,19 @@ of :class:`enum.Enum`.
Represents a link button.
.. attribute:: blurple
An alias for :attr:`primary`.
.. attribute:: grey
An alias for :attr:`secondary`.
.. attribute:: green
An alias for :attr:`success`.
.. attribute:: red
An alias for :attr:`danger`.
.. class:: VoiceRegion
Specifies the region a voice server belongs to.

Loading…
Cancel
Save