From b2d1cb6a3d7f44fcfa104cc69644c291a5fab672 Mon Sep 17 00:00:00 2001 From: Lewdcario Date: Sat, 12 May 2018 00:51:08 -0500 Subject: [PATCH] docs: permissions --- src/structures/GuildChannel.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 3842f2b96..099854f01 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -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 * { * 'SEND_MESSAGES': true, @@ -164,6 +164,14 @@ class GuildChannel extends Channel { * }) * .then(updated => console.log(updated.permissionOverwrites.get(message.author.id))) * .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) { const payload = {