aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/channel.py2
-rw-r--r--discord/permissions.py18
-rw-r--r--docs/migrating.rst2
3 files changed, 11 insertions, 11 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 4e7da47b..c35b0c1e 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -255,7 +255,7 @@ class PrivateChannel(Hashable):
Returns
--------
- :class:`Permission`
+ :class:`Permissions`
The resolved permissions for the user.
"""
diff --git a/discord/permissions.py b/discord/permissions.py
index ce50abfe..94b89a24 100644
--- a/discord/permissions.py
+++ b/discord/permissions.py
@@ -39,15 +39,15 @@ class Permissions:
| hash(x) | Return the permission's hash. |
+-----------+------------------------------------------+
+ 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.
+
Attributes
-----------
value
The raw value. This value is a bit array field of a 32-bit integer
representing the currently available permissions. You should query
permissions via the properties rather than using this raw value.
-
- 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.
"""
__slots__ = [ 'value' ]
@@ -65,19 +65,19 @@ class Permissions:
@classmethod
def none(cls):
- """A factory method that creates a :class:`Permission` with all
+ """A factory method that creates a :class:`Permissions` with all
permissions set to False."""
return cls(0)
@classmethod
def all(cls):
- """A factory method that creates a :class:`Permission` with all
+ """A factory method that creates a :class:`Permissions` with all
permissions set to True."""
return cls(0b00000011111100111111110000111111)
@classmethod
def all_channel(cls):
- """A :class:`Permission` with all channel-specific permissions set to
+ """A :class:`Permissions` with all channel-specific permissions set to
True and the server-specific ones set to False. The server-specific
permissions are currently:
@@ -89,19 +89,19 @@ class Permissions:
@classmethod
def general(cls):
- """A factory method that creates a :class:`Permission` with all
+ """A factory method that creates a :class:`Permissions` with all
"General" permissions set to True."""
return cls(0b00000000000000000000000000111111)
@classmethod
def text(cls):
- """A factory method that creates a :class:`Permission` with all
+ """A factory method that creates a :class:`Permissions` with all
"Text" permissions set to True."""
return cls(0b00000000000000111111110000000000)
@classmethod
def voice(cls):
- """A factory method that creates a :class:`Permission` with all
+ """A factory method that creates a :class:`Permissions` with all
"Voice" permissions set to True."""
return cls(0b00000011111100000000000000000000)
diff --git a/docs/migrating.rst b/docs/migrating.rst
index c47986a2..2b60cb2b 100644
--- a/docs/migrating.rst
+++ b/docs/migrating.rst
@@ -250,7 +250,7 @@ Functions have been renamed.
| ``Client.set_channel_permissions`` | :meth:`Client.edit_channel_permissions` |
+------------------------------------+-------------------------------------------+
-All the :class:`Permission` related attributes have been renamed and the `can_` prefix has been
+All the :class:`Permissions` related attributes have been renamed and the `can_` prefix has been
dropped. So for example, ``can_manage_messages`` has become ``manage_messages``.
.. _migrating-kwargs: