mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs: inconsistencies
This commit is contained in:
@@ -24,8 +24,8 @@ class GuildChannelStore extends DataStore {
|
||||
/**
|
||||
* Can be used to overwrite permissions when creating a channel.
|
||||
* @typedef {Object} PermissionOverwriteOptions
|
||||
* @property {PermissionResolvable[]|number} [allowed] The permissions to allow
|
||||
* @property {PermissionResolvable[]|number} [denied] The permissions to deny
|
||||
* @property {PermissionResolvable} [allowed] The permissions to allow
|
||||
* @property {PermissionResolvable} [denied] The permissions to deny
|
||||
* @property {RoleResolvable|UserResolvable} id ID of the role or member this overwrite is for
|
||||
*/
|
||||
|
||||
|
||||
@@ -80,7 +80,9 @@ class GuildMemberStore extends DataStore {
|
||||
* guild.members.fetch('66564597481480192')
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
* guild.members.fetch({ user, cache: false }) // Fetch and don't cache
|
||||
* @example
|
||||
* // Fetch a single member without caching
|
||||
* guild.members.fetch({ user, cache: false })
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
* @example
|
||||
|
||||
@@ -76,7 +76,7 @@ class Invite extends Base {
|
||||
if (data.inviter) {
|
||||
/**
|
||||
* The user who created this invite
|
||||
* @type {User}
|
||||
* @type {?User}
|
||||
*/
|
||||
this.inviter = this.client.users.add(data.inviter);
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ class Role extends Base {
|
||||
* @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number
|
||||
* @property {boolean} [hoist] Whether or not the role should be hoisted
|
||||
* @property {number} [position] The position of the role
|
||||
* @property {PermissionResolvable|PermissionResolvable[]} [permissions] The permissions of the role
|
||||
* @property {PermissionResolvable} [permissions] The permissions of the role
|
||||
* @property {boolean} [mentionable] Whether or not the role should be mentionable
|
||||
*/
|
||||
|
||||
@@ -252,7 +252,7 @@ class Role extends Base {
|
||||
|
||||
/**
|
||||
* Sets the permissions of the role.
|
||||
* @param {PermissionResolvable[]} permissions The permissions of the role
|
||||
* @param {PermissionResolvable} permissions The permissions of the role
|
||||
* @param {string} [reason] Reason for changing the role's permissions
|
||||
* @returns {Promise<Role>}
|
||||
* @example
|
||||
@@ -260,6 +260,11 @@ class Role extends Base {
|
||||
* role.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])
|
||||
* .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))
|
||||
* .catch(console.error);
|
||||
* @example
|
||||
* // Remove all permissions from a role
|
||||
* role.setPermissions(0)
|
||||
* .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))
|
||||
* .catch(console.error);
|
||||
*/
|
||||
setPermissions(permissions, reason) {
|
||||
return this.edit({ permissions }, reason);
|
||||
|
||||
Reference in New Issue
Block a user