mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
docs: permissions
This commit is contained in:
parent
09ddbcb88a
commit
b2d1cb6a3d
1 changed files with 9 additions and 1 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue