mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +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();
|
||||
}
|
||||
|
||||
/* eslint-disable max-len */
|
||||
/**
|
||||
* Replaces the permission overwrites in this channel.
|
||||
* @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
|
||||
* @returns {Promise<GuildChannel>}
|
||||
* @example
|
||||
@@ -197,9 +198,10 @@ class GuildChannel extends Channel {
|
||||
return this.edit({ permissionOverwrites: resolvePermissions.call(this, overwrites), reason })
|
||||
.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
|
||||
* {
|
||||
* 'SEND_MESSAGES': true,
|
||||
|
||||
Reference in New Issue
Block a user