mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
add Collection as possible param to GuildChannel#overwritePermissions + wording port from 11.3-dev (#2719)
* add Collection as possible param to GuildChannel#overwritePermissions * change PermissionoverwriteOptions desc. default to unset * fix eslint hiccup * fix spelling of snowflake
This commit is contained in:
@@ -176,10 +176,11 @@ class GuildChannel extends Channel {
|
|||||||
.freeze();
|
.freeze();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* eslint-disable max-len */
|
||||||
/**
|
/**
|
||||||
* Replaces the permission overwrites in this channel.
|
* Replaces the permission overwrites in this channel.
|
||||||
* @param {Object} [options] Options
|
* @param {Object} [options] Options
|
||||||
* @param {Array<PermissionOverwrites|PermissionOverwriteOptions>} [options.overwrites] Permission overwrites
|
* @param {Array<PermissionOverwrites|PermissionOverwriteOptions>|Collection<Snowflake, PermissionOverwriteOptions>} [options.overwrites] Permission overwrites
|
||||||
* @param {string} [options.reason] Reason for updating the channel overwrites
|
* @param {string} [options.reason] Reason for updating the channel overwrites
|
||||||
* @returns {Promise<GuildChannel>}
|
* @returns {Promise<GuildChannel>}
|
||||||
* @example
|
* @example
|
||||||
@@ -197,9 +198,10 @@ class GuildChannel extends Channel {
|
|||||||
return this.edit({ permissionOverwrites: resolvePermissions.call(this, overwrites), reason })
|
return this.edit({ permissionOverwrites: resolvePermissions.call(this, overwrites), reason })
|
||||||
.then(() => this);
|
.then(() => this);
|
||||||
}
|
}
|
||||||
|
/* eslint-enable max-len */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object mapping permission flags to `true` (enabled), `null` (default) or `false` (disabled).
|
* An object mapping permission flags to `true` (enabled), `null` (unset) or `false` (disabled).
|
||||||
* ```js
|
* ```js
|
||||||
* {
|
* {
|
||||||
* 'SEND_MESSAGES': true,
|
* 'SEND_MESSAGES': true,
|
||||||
|
|||||||
Reference in New Issue
Block a user