Documented PermissionOverwrite

This commit is contained in:
hydrabolt
2015-11-20 21:29:27 +00:00
parent 703b56f394
commit 4c29e2ce9b
4 changed files with 46 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
.. include:: ./vars.rst
PermissionOverwrite
===================
PermissionOverwrite is used to represent data about permission overwrites for roles or users in channels.
--------
Attributes
----------
--------
id
~~
`String`, the ID of the PermissionOverwrite. If ``overwrite.type`` is ``role``, this is the role's ID. Otherwise, it is a User_ overwrite.
type
~~~~
`String`, type of the overwrite. Either ``member`` or ``role``.
allowed
~~~~~~~
Returns the permissions explicitly allowed by the overwrite. An `Array` of Strings, which are names of permissions. More can be found at `Permission Constants`_
denied
~~~~~~
Returns the permissions explicitly denied by the overwrite. An `Array` of Strings, which are names of permissions. More can be found at `Permission Constants`_

View File

@@ -71,4 +71,9 @@ hasPermission(permission)
Sees whether the role has the permission given.
- **permission** - See `Permission Constants`_ for valid permission names.
- **permission** - See `Permission Constants`_ for valid permission names.
colorAsHex()
~~~~~~~~~~~~
Returns the role's colour as hex, e.g. ``#FF0000``.

View File

@@ -38,7 +38,13 @@ Contents:
docs_user
docs_message
docs_invite
.. toctree::
:maxdepth: 2
:caption: Permission Documentation
docs_role
docs_permissionoverwrite
.. toctree::
:maxdepth: 2

View File

@@ -11,5 +11,6 @@
.. _Invite : ./docs_invite.html
.. _Equality : ./docs_equality.html
.. _Role : ./docs_role.html
.. _PermissionOverwrite : ./docs_permissionoverwrite.html
.. _Promises : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
.. _EventEmitter : https://nodejs.org/api/events.html#events_class_events_eventemitter