mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Add warning for comparing with role positioning
This commit is contained in:
parent
fc64ffdabd
commit
1954861668
@ -139,6 +139,15 @@ class Role(Hashable):
|
||||
position: :class:`int`
|
||||
The position of the role. This number is usually positive. The bottom
|
||||
role has a position of 0.
|
||||
|
||||
.. warning::
|
||||
|
||||
Multiple roles can have the same position number. As a consequence
|
||||
of this, comparing via role position is prone to subtle bugs if
|
||||
checking for role hierarchy. The recommended and correct way to
|
||||
compare for roles in the hierarchy is using the comparison
|
||||
operators on the role objects themselves.
|
||||
|
||||
managed: :class:`bool`
|
||||
Indicates if the role is managed by the guild through some form of
|
||||
integrations such as Twitch.
|
||||
|
Loading…
x
Reference in New Issue
Block a user