diff options
| author | Rapptz <[email protected]> | 2021-04-28 01:44:50 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-05-27 00:53:14 -0400 |
| commit | 80fd222ca071dcca72d4c3455f68d575edb5f3c3 (patch) | |
| tree | ec2b672436e5b6862364ec0e9d4ea2d16d484304 | |
| parent | Rename enums to use official API naming (diff) | |
| download | discord.py-80fd222ca071dcca72d4c3455f68d575edb5f3c3.tar.xz discord.py-80fd222ca071dcca72d4c3455f68d575edb5f3c3.zip | |
Add aliases for button style colours
| -rw-r--r-- | discord/enums.py | 6 | ||||
| -rw-r--r-- | docs/api.rst | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/discord/enums.py b/discord/enums.py index b7e4ee30..2ff028cb 100644 --- a/discord/enums.py +++ b/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 diff --git a/docs/api.rst b/docs/api.rst index 41eabc3c..e1321daf 100644 --- a/docs/api.rst +++ b/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. |