mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
refactor(*): make typedefs for all options params (#5785)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -84,17 +84,22 @@ class RoleManager extends BaseManager {
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Options used to create a new role.
|
||||
* @typedef {Object} CreateRoleOptions
|
||||
* @property {string} [name] The name of the new role
|
||||
* @property {ColorResolvable} [color] The data to create the role with
|
||||
* @property {boolean} [hoist] Whether or not the new role should be hoisted
|
||||
* @property {PermissionResolvable} [permissions] The permissions for the new role
|
||||
* @property {number} [position] The position of the new role
|
||||
* @property {boolean} [mentionable] Whether or not the new role should be mentionable
|
||||
* @property {string} [reason] The reason for creating this role
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new role in the guild with given information.
|
||||
* <warn>The position will silently reset to 1 if an invalid one is provided, or none.</warn>
|
||||
* @param {Object} [options] Options
|
||||
* @param {string} [options.name] The name of the new role
|
||||
* @param {ColorResolvable} [options.color] The data to create the role with
|
||||
* @param {boolean} [options.hoist] Whether or not the new role should be hoisted.
|
||||
* @param {PermissionResolvable} [options.permissions] The permissions for the new role
|
||||
* @param {number} [options.position] The position of the new role
|
||||
* @param {boolean} [options.mentionable] Whether or not the new role should be mentionable.
|
||||
* @param {string} [options.reason] Reason for creating this role
|
||||
* @param {CreateRoleOptions} [options] Options for creating the new role
|
||||
* @returns {Promise<Role>}
|
||||
* @example
|
||||
* // Create a new role
|
||||
|
||||
Reference in New Issue
Block a user