mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 00:02:52 +00:00
docs: inconsistencies
This commit is contained in:
parent
2dd7fd2739
commit
ec9211c3ce
4 changed files with 13 additions and 6 deletions
|
|
@ -24,8 +24,8 @@ class GuildChannelStore extends DataStore {
|
||||||
/**
|
/**
|
||||||
* Can be used to overwrite permissions when creating a channel.
|
* Can be used to overwrite permissions when creating a channel.
|
||||||
* @typedef {Object} PermissionOverwriteOptions
|
* @typedef {Object} PermissionOverwriteOptions
|
||||||
* @property {PermissionResolvable[]|number} [allowed] The permissions to allow
|
* @property {PermissionResolvable} [allowed] The permissions to allow
|
||||||
* @property {PermissionResolvable[]|number} [denied] The permissions to deny
|
* @property {PermissionResolvable} [denied] The permissions to deny
|
||||||
* @property {RoleResolvable|UserResolvable} id ID of the role or member this overwrite is for
|
* @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')
|
* guild.members.fetch('66564597481480192')
|
||||||
* .then(console.log)
|
* .then(console.log)
|
||||||
* .catch(console.error);
|
* .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)
|
* .then(console.log)
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
* @example
|
* @example
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class Invite extends Base {
|
||||||
if (data.inviter) {
|
if (data.inviter) {
|
||||||
/**
|
/**
|
||||||
* The user who created this invite
|
* The user who created this invite
|
||||||
* @type {User}
|
* @type {?User}
|
||||||
*/
|
*/
|
||||||
this.inviter = this.client.users.add(data.inviter);
|
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 {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 {boolean} [hoist] Whether or not the role should be hoisted
|
||||||
* @property {number} [position] The position of the role
|
* @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
|
* @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.
|
* 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
|
* @param {string} [reason] Reason for changing the role's permissions
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
* @example
|
* @example
|
||||||
|
|
@ -260,6 +260,11 @@ class Role extends Base {
|
||||||
* role.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])
|
* role.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])
|
||||||
* .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))
|
* .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))
|
||||||
* .catch(console.error);
|
* .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) {
|
setPermissions(permissions, reason) {
|
||||||
return this.edit({ permissions }, reason);
|
return this.edit({ permissions }, reason);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue