diff --git a/docs/docs_permissionoverwrite.rst b/docs/docs_permissionoverwrite.rst new file mode 100644 index 000000000..52f387953 --- /dev/null +++ b/docs/docs_permissionoverwrite.rst @@ -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`_ \ No newline at end of file diff --git a/docs/docs_role.rst b/docs/docs_role.rst index 2d57c7d8d..bacb487d3 100644 --- a/docs/docs_role.rst +++ b/docs/docs_role.rst @@ -71,4 +71,9 @@ hasPermission(permission) Sees whether the role has the permission given. -- **permission** - See `Permission Constants`_ for valid permission names. \ No newline at end of file +- **permission** - See `Permission Constants`_ for valid permission names. + +colorAsHex() +~~~~~~~~~~~~ + +Returns the role's colour as hex, e.g. ``#FF0000``. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 9ee7c8167..5c68fc759 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -38,7 +38,13 @@ Contents: docs_user docs_message docs_invite + +.. toctree:: + :maxdepth: 2 + :caption: Permission Documentation + docs_role + docs_permissionoverwrite .. toctree:: :maxdepth: 2 diff --git a/docs/vars.rst b/docs/vars.rst index d5a26cec1..f67e7583f 100644 --- a/docs/vars.rst +++ b/docs/vars.rst @@ -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 \ No newline at end of file