mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +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
|
* ```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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user