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:
Shubham Parihar
2021-06-14 00:02:54 +05:30
committed by GitHub
parent 01a1fd615b
commit 1ac9a2eb5b
23 changed files with 356 additions and 237 deletions

View File

@@ -59,22 +59,27 @@ class GuildChannelManager extends BaseManager {
* @returns {?Snowflake}
*/
/**
* Options used to create a new channel in a guild.
* @typedef {Object} GuildChannelCreateOptions
* @property {string} [type='text'] The type of the new channel, either `text`, `voice`, `category`, `news`,
* `store`, or `stage`
* @property {string} [topic] The topic for the new channel
* @property {boolean} [nsfw] Whether the new channel is nsfw
* @property {number} [bitrate] Bitrate of the new channel in bits (only voice)
* @property {number} [userLimit] Maximum amount of users allowed in the new channel (only voice)
* @property {ChannelResolvable} [parent] Parent of the new channel
* @property {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [permissionOverwrites]
* Permission overwrites of the new channel
* @property {number} [position] Position of the new channel
* @property {number} [rateLimitPerUser] The ratelimit per user for the new channel
* @property {string} [reason] Reason for creating the new channel
*/
/**
* Creates a new channel in the guild.
* @param {string} name The name of the new channel
* @param {Object} [options] Options
* @param {string} [options.type='text'] The type of the new channel, either `text`, `voice`, `category`, `news`,
* `store`, or `stage`
* @param {string} [options.topic] The topic for the new channel
* @param {boolean} [options.nsfw] Whether the new channel is nsfw
* @param {number} [options.bitrate] Bitrate of the new channel in bits (only voice)
* @param {number} [options.userLimit] Maximum amount of users allowed in the new channel (only voice)
* @param {ChannelResolvable} [options.parent] Parent of the new channel
* @param {OverwriteResolvable[]|Collection<Snowflake, OverwriteResolvable>} [options.permissionOverwrites]
* Permission overwrites of the new channel
* @param {number} [options.position] Position of the new channel
* @param {number} [options.rateLimitPerUser] The ratelimit per user for the channel
* @param {string} [options.reason] Reason for creating the channel
* @param {GuildChannelCreateOptions} [options={}] Options for creating the new channel
* @returns {Promise<GuildChannel>}
* @example
* // Create a new text channel