mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 12:40:50 +00: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:
parent
147488df89
commit
0a21280990
1 changed files with 4 additions and 2 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue