mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs: permissions
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user