mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 18:59:09 +00:00
Oversight in Permissions still having a table.
This commit is contained in:
parent
969bb085cb
commit
bd7b2e2d35
@ -27,42 +27,42 @@ DEALINGS IN THE SOFTWARE.
|
|||||||
class Permissions:
|
class Permissions:
|
||||||
"""Wraps up the Discord permission value.
|
"""Wraps up the Discord permission value.
|
||||||
|
|
||||||
Supported operations:
|
The properties provided are two way. You can set and retrieve individual
|
||||||
|
bits using the properties as if they were regular bools. This allows
|
||||||
|
you to edit permissions.
|
||||||
|
|
||||||
+-----------+------------------------------------------+
|
.. container:: operations
|
||||||
| Operation | Description |
|
|
||||||
+===========+==========================================+
|
|
||||||
| x == y | Checks if two permissions are equal. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
| x != y | Checks if two permissions are not equal. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
| x <= y | Checks if a permission is a subset |
|
|
||||||
| | of another permission. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
| x >= y | Checks if a permission is a superset |
|
|
||||||
| | of another permission. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
| x < y | Checks if a permission is a strict |
|
|
||||||
| | subset of another permission. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
| x > y | Checks if a permission is a strict |
|
|
||||||
| | superset of another permission. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
| hash(x) | Return the permission's hash. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
| iter(x) | Returns an iterator of (perm, value) |
|
|
||||||
| | pairs. This allows this class to be used |
|
|
||||||
| | as an iterable in e.g. set/list/dict |
|
|
||||||
| | constructions. |
|
|
||||||
+-----------+------------------------------------------+
|
|
||||||
|
|
||||||
The properties provided are two way. You can set and retrieve individual bits using the properties as if they
|
.. describe:: x == y
|
||||||
were regular bools. This allows you to edit permissions.
|
|
||||||
|
Checks if two permissions are equal.
|
||||||
|
.. describe:: x != y
|
||||||
|
|
||||||
|
Checks if two permissions are not equal.
|
||||||
|
.. describe:: x <= y
|
||||||
|
|
||||||
|
Checks if a permission is a subset of another permission.
|
||||||
|
.. describe:: x >= y
|
||||||
|
|
||||||
|
Checks if a permission is a superset of another permission.
|
||||||
|
.. describe:: x < y
|
||||||
|
|
||||||
|
Checks if a permission is a strict subset of another permission.
|
||||||
|
.. describe:: x > y
|
||||||
|
|
||||||
|
Checks if a permission is a strict superset of another permission.
|
||||||
|
.. describe:: hash(x)
|
||||||
|
|
||||||
|
Return the permission's hash.
|
||||||
|
.. describe:: iter(x)
|
||||||
|
|
||||||
|
Returns an iterator of ``(perm, value)`` pairs. This allows it
|
||||||
|
to be, for example, constructed as a dict or a list of pairs.
|
||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
-----------
|
-----------
|
||||||
value
|
value
|
||||||
The raw value. This value is a bit array field of a 32-bit integer
|
The raw value. This value is a bit array field of a 53-bit integer
|
||||||
representing the currently available permissions. You should query
|
representing the currently available permissions. You should query
|
||||||
permissions via the properties rather than using this raw value.
|
permissions via the properties rather than using this raw value.
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user