mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
Documented PermissionOverwrite
This commit is contained in:
33
docs/docs_permissionoverwrite.rst
Normal file
33
docs/docs_permissionoverwrite.rst
Normal 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`_
|
||||||
@@ -71,4 +71,9 @@ hasPermission(permission)
|
|||||||
|
|
||||||
Sees whether the role has the permission given.
|
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``.
|
||||||
@@ -38,7 +38,13 @@ Contents:
|
|||||||
docs_user
|
docs_user
|
||||||
docs_message
|
docs_message
|
||||||
docs_invite
|
docs_invite
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Permission Documentation
|
||||||
|
|
||||||
docs_role
|
docs_role
|
||||||
|
docs_permissionoverwrite
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|||||||
@@ -11,5 +11,6 @@
|
|||||||
.. _Invite : ./docs_invite.html
|
.. _Invite : ./docs_invite.html
|
||||||
.. _Equality : ./docs_equality.html
|
.. _Equality : ./docs_equality.html
|
||||||
.. _Role : ./docs_role.html
|
.. _Role : ./docs_role.html
|
||||||
|
.. _PermissionOverwrite : ./docs_permissionoverwrite.html
|
||||||
.. _Promises : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
.. _Promises : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
||||||
.. _EventEmitter : https://nodejs.org/api/events.html#events_class_events_eventemitter
|
.. _EventEmitter : https://nodejs.org/api/events.html#events_class_events_eventemitter
|
||||||
Reference in New Issue
Block a user