mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
Added channel permissions
This commit is contained in:
36
docs/docs_channelpermissions.rst
Normal file
36
docs/docs_channelpermissions.rst
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
.. include:: ./vars.rst
|
||||||
|
|
||||||
|
ChannelPermissions
|
||||||
|
==================
|
||||||
|
|
||||||
|
ChannelPermissions is used to represent the final permissions of a user in a channel, to see exactly what they are and aren't allowed to do.
|
||||||
|
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Functions
|
||||||
|
---------
|
||||||
|
|
||||||
|
------------
|
||||||
|
|
||||||
|
serialize()
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
**Aliases:** `serialise`
|
||||||
|
|
||||||
|
Returns an object containing permission names and values. E.g:
|
||||||
|
|
||||||
|
.. code-block:: js
|
||||||
|
|
||||||
|
{
|
||||||
|
createInstantInvite : true,
|
||||||
|
kickMembers : false
|
||||||
|
}
|
||||||
|
|
||||||
|
For more on valid permission names, see `Permission Constants`_.
|
||||||
|
|
||||||
|
hasPermission(permission)
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Sees whether the user has the permission given.
|
||||||
|
|
||||||
|
- **permission** - See `Permission Constants`_ for valid permission names.
|
||||||
@@ -45,6 +45,7 @@ Contents:
|
|||||||
|
|
||||||
docs_role
|
docs_role
|
||||||
docs_permissionoverwrite
|
docs_permissionoverwrite
|
||||||
|
docs_channelpermissions
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
.. _Invite : ./docs_invite.html
|
.. _Invite : ./docs_invite.html
|
||||||
.. _Equality : ./docs_equality.html
|
.. _Equality : ./docs_equality.html
|
||||||
.. _Role : ./docs_role.html
|
.. _Role : ./docs_role.html
|
||||||
|
.. _ChannelPermissions : ./docs_channelpermissions.html
|
||||||
.. _PermissionOverwrite : ./docs_permissionoverwrite.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