docs: inconsistencies

This commit is contained in:
Lewdcario
2018-04-18 20:21:17 -05:00
parent 2dd7fd2739
commit ec9211c3ce
4 changed files with 13 additions and 6 deletions

View File

@@ -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);
}

View File

@@ -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);