docs: permissions

This commit is contained in:
Lewdcario
2018-05-12 00:51:08 -05:00
parent 09ddbcb88a
commit b2d1cb6a3d

View File

@@ -141,7 +141,7 @@ class GuildChannel extends Channel {
} }
/** /**
* An object mapping permission flags to `true` (enabled) or `false` (disabled). * An object mapping permission flags to `true` (enabled), `false` (disabled), or `null` (not set).
* ```js * ```js
* { * {
* 'SEND_MESSAGES': true, * 'SEND_MESSAGES': true,
@@ -164,6 +164,14 @@ class GuildChannel extends Channel {
* }) * })
* .then(updated => console.log(updated.permissionOverwrites.get(message.author.id))) * .then(updated => console.log(updated.permissionOverwrites.get(message.author.id)))
* .catch(console.error); * .catch(console.error);
* @example
* // Overwite permissions for a message author and reset some
* message.channel.overwritePermissions(message.author, {
* VIEW_CHANNEL: false,
* SEND_MESSAGES: null
* })
* .then(updated => console.log(updated.permissionOverwrites.get(message.author.id)))
* .catch(console.error);
*/ */
overwritePermissions(userOrRole, options, reason) { overwritePermissions(userOrRole, options, reason) {
const payload = { const payload = {