Skip to content

Commit

Permalink
Fix documentation for create/editRole (abalabahaha#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC authored Aug 4, 2021
1 parent 3d80d20 commit 756943d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ declare namespace Eris {
hoist?: boolean;
mentionable?: boolean;
name?: string;
permissions?: bigint | number | Permission;
permissions?: bigint | number | string | Permission;
}
interface RoleTags {
bot_id?: string;
Expand Down
8 changes: 4 additions & 4 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,12 @@ class Client extends EventEmitter {
/**
* Create a guild role
* @arg {String} guildID The ID of the guild to create the role in
* @arg {Object|Role} [options] An object or Role containing the properties to set
* @arg {Object | Role} [options] An object or Role containing the properties to set
* @arg {Number} [options.color] The hex color of the role, in number form (ex: 0x3d15b3 or 4040115)
* @arg {Boolean} [options.hoist] Whether to hoist the role in the user list or not
* @arg {Boolean} [options.mentionable] Whether the role is mentionable or not
* @arg {String} [options.name] The name of the role
* @arg {Number | String | Permission} [options.permissions] The role permissions
* @arg {BigInt | Number | String | Permission} [options.permissions] The role permissions
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Role>}
*/
Expand Down Expand Up @@ -1278,7 +1278,7 @@ class Client extends EventEmitter {
* @arg {Boolean} [options.hoist] Whether to hoist the role in the user list or not
* @arg {Boolean} [options.mentionable] Whether the role is mentionable or not
* @arg {String} [options.name] The name of the role
* @arg {BigInt | Number | Permission} [options.permissions] The role permissions
* @arg {BigInt | Number | String | Permission} [options.permissions] The role permissions
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Role>}
*/
Expand Down Expand Up @@ -2735,7 +2735,7 @@ class Client extends EventEmitter {

_formatImage(url, format, size) {
if(!format || !Constants.ImageFormats.includes(format.toLowerCase())) {
format = url.includes("/a_") ? "gif": this.options.defaultImageFormat;
format = url.includes("/a_") ? "gif" : this.options.defaultImageFormat;
}
if(!size || size < Constants.ImageSizeBoundaries.MINIMUM || size > Constants.ImageSizeBoundaries.MAXIMUM || (size & (size - 1))) {
size = this.options.defaultImageSize;
Expand Down
6 changes: 3 additions & 3 deletions lib/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ class Guild extends Base {

/**
* Create a guild role
* @arg {Object|Role} [options] An object or Role containing the properties to set
* @arg {Object | Role} [options] An object or Role containing the properties to set
* @arg {Number} [options.color] The hex color of the role, in number form (ex: 0x3d15b3 or 4040115)
* @arg {Boolean} [options.hoist] Whether to hoist the role in the user list or not
* @arg {Boolean} [options.mentionable] Whether the role is mentionable or not
* @arg {String} [options.name] The name of the role
* @arg {Number | String | Permission} [options.permissions] The role permissions
* @arg {BigInt | Number | String | Permission} [options.permissions] The role permissions
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Role>}
*/
Expand Down Expand Up @@ -589,7 +589,7 @@ class Guild extends Base {
* @arg {Boolean} [options.hoist] Whether to hoist the role in the user list or not
* @arg {Boolean} [options.mentionable] Whether the role is mentionable or not
* @arg {String} [options.name] The name of the role
* @arg {BigInt | Number | Permission} [options.permissions] The role permissions
* @arg {BigInt | Number | String | Permission} [options.permissions] The role permissions
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Role>}
*/
Expand Down

0 comments on commit 756943d

Please sign in to comment.