Allow enums to be compared

This commit is contained in:
Sebastian Law
2021-08-23 23:28:39 -07:00
committed by GitHub
parent f586f4dfbd
commit 835432d161
2 changed files with 60 additions and 8 deletions

View File

@ -1591,6 +1591,8 @@ of :class:`enum.Enum`.
.. container:: operations
.. versionadded:: 2.0
.. describe:: x == y
Checks if two verification levels are equal.
@ -1633,6 +1635,29 @@ of :class:`enum.Enum`.
Specifies whether a :class:`Guild` has notifications on for all messages or mentions only by default.
.. container:: operations
.. versionadded:: 2.0
.. describe:: x == y
Checks if two notification levels are equal.
.. describe:: x != y
Checks if two notification levels are not equal.
.. describe:: x > y
Checks if a notification level is higher than another.
.. describe:: x < y
Checks if a notification level is lower than another.
.. describe:: x >= y
Checks if a notification level is higher or equal to another.
.. describe:: x <= y
Checks if a notification level is lower or equal to another.
.. attribute:: all_messages
Members receive notifications for every message regardless of them being mentioned.
@ -1648,6 +1673,8 @@ of :class:`enum.Enum`.
.. container:: operations
.. versionadded:: 2.0
.. describe:: x == y
Checks if two content filter levels are equal.
@ -2532,6 +2559,27 @@ of :class:`enum.Enum`.
.. versionadded:: 2.0
.. container:: operations
.. describe:: x == y
Checks if two NSFW levels are equal.
.. describe:: x != y
Checks if two NSFW levels are not equal.
.. describe:: x > y
Checks if a NSFW level is higher than another.
.. describe:: x < y
Checks if a NSFW level is lower than another.
.. describe:: x >= y
Checks if a NSFW level is higher or equal to another.
.. describe:: x <= y
Checks if a NSFW level is lower or equal to another.
.. attribute:: default
The guild has not been categorised yet.