docs: Remove numbers from enums (#8098)

This commit is contained in:
Jiralite
2022-06-17 22:28:30 +01:00
committed by GitHub
parent 415513696c
commit 0a138dab95
9 changed files with 23 additions and 31 deletions

View File

@@ -82,7 +82,7 @@ class GuildManager extends CachedManager {
* @property {Snowflake|number} [id] The channel's id, used to set its parent, * @property {Snowflake|number} [id] The channel's id, used to set its parent,
* this is a placeholder and will be replaced by the API after consumption * this is a placeholder and will be replaced by the API after consumption
* @property {Snowflake|number} [parentId] The parent id for this channel * @property {Snowflake|number} [parentId] The parent id for this channel
* @property {ChannelType|number} [type] The type of the channel * @property {ChannelType.GuildText|ChannelType.GuildVoice|ChannelType.GuildCategory} [type] The type of the channel
* @property {string} name The name of the channel * @property {string} name The name of the channel
* @property {?string} [topic] The topic of the text channel * @property {?string} [topic] The topic of the text channel
* @property {boolean} [nsfw] Whether the channel is NSFW * @property {boolean} [nsfw] Whether the channel is NSFW
@@ -145,9 +145,9 @@ class GuildManager extends CachedManager {
* @property {Snowflake|number} [afkChannelId] The AFK channel's id * @property {Snowflake|number} [afkChannelId] The AFK channel's id
* @property {number} [afkTimeout] The AFK timeout in seconds * @property {number} [afkTimeout] The AFK timeout in seconds
* @property {PartialChannelData[]} [channels=[]] The channels for this guild * @property {PartialChannelData[]} [channels=[]] The channels for this guild
* @property {GuildDefaultMessageNotificationLevel|number} [defaultMessageNotifications] The default message notifications * @property {GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message notifications
* for the guild * for the guild
* @property {GuildExplicitContentFilterLevel} [explicitContentFilter] The explicit content filter level for the guild * @property {GuildExplicitContentFilter} [explicitContentFilter] The explicit content filter level for the guild
* @property {?(BufferResolvable|Base64Resolvable)} [icon=null] The icon for the guild * @property {?(BufferResolvable|Base64Resolvable)} [icon=null] The icon for the guild
* @property {PartialRoleData[]} [roles=[]] The roles for this guild, * @property {PartialRoleData[]} [roles=[]] The roles for this guild,
* the first element of this array is used to change properties of the guild's everyone role. * the first element of this array is used to change properties of the guild's everyone role.

View File

@@ -43,8 +43,8 @@ class GuildScheduledEventManager extends CachedManager {
* @property {DateResolvable} scheduledStartTime The time to schedule the event at * @property {DateResolvable} scheduledStartTime The time to schedule the event at
* @property {DateResolvable} [scheduledEndTime] The time to end the event at * @property {DateResolvable} [scheduledEndTime] The time to end the event at
* <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn> * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.External}</warn>
* @property {GuildScheduledEventPrivacyLevel|number} privacyLevel The privacy level of the guild scheduled event * @property {GuildScheduledEventPrivacyLevel} privacyLevel The privacy level of the guild scheduled event
* @property {GuildScheduledEventEntityType|number} entityType The scheduled entity type of the event * @property {GuildScheduledEventEntityType} entityType The scheduled entity type of the event
* @property {string} [description] The description of the guild scheduled event * @property {string} [description] The description of the guild scheduled event
* @property {GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event * @property {GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event
* <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.StageInstance} or * <warn>This is required if `entityType` is {@link GuildScheduledEventEntityType.StageInstance} or
@@ -167,11 +167,11 @@ class GuildScheduledEventManager extends CachedManager {
* @property {string} [name] The name of the guild scheduled event * @property {string} [name] The name of the guild scheduled event
* @property {DateResolvable} [scheduledStartTime] The time to schedule the event at * @property {DateResolvable} [scheduledStartTime] The time to schedule the event at
* @property {DateResolvable} [scheduledEndTime] The time to end the event at * @property {DateResolvable} [scheduledEndTime] The time to end the event at
* @property {GuildScheduledEventPrivacyLevel|number} [privacyLevel] The privacy level of the guild scheduled event * @property {GuildScheduledEventPrivacyLevel} [privacyLevel] The privacy level of the guild scheduled event
* @property {GuildScheduledEventEntityType|number} [entityType] The scheduled entity type of the event * @property {GuildScheduledEventEntityType} [entityType] The scheduled entity type of the event
* @property {string} [description] The description of the guild scheduled event * @property {string} [description] The description of the guild scheduled event
* @property {?GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event * @property {?GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event
* @property {GuildScheduledEventStatus|number} [status] The status of the guild scheduled event * @property {GuildScheduledEventStatus} [status] The status of the guild scheduled event
* @property {GuildScheduledEventEntityMetadataOptions} [entityMetadata] The entity metadata of the * @property {GuildScheduledEventEntityMetadataOptions} [entityMetadata] The entity metadata of the
* guild scheduled event * guild scheduled event
* <warn>This can be modified only if `entityType` of the `GuildScheduledEvent` to be edited is * <warn>This can be modified only if `entityType` of the `GuildScheduledEvent` to be edited is

View File

@@ -30,7 +30,7 @@ class StageInstanceManager extends CachedManager {
* Options used to create a stage instance. * Options used to create a stage instance.
* @typedef {Object} StageInstanceCreateOptions * @typedef {Object} StageInstanceCreateOptions
* @property {string} topic The topic of the stage instance * @property {string} topic The topic of the stage instance
* @property {StageInstancePrivacyLevel|number} [privacyLevel] The privacy level of the stage instance * @property {StageInstancePrivacyLevel} [privacyLevel] The privacy level of the stage instance
* @property {boolean} [sendStartNotification] Whether to notify `@everyone` that the stage instance has started * @property {boolean} [sendStartNotification] Whether to notify `@everyone` that the stage instance has started
*/ */
@@ -101,7 +101,7 @@ class StageInstanceManager extends CachedManager {
* Options used to edit an existing stage instance. * Options used to edit an existing stage instance.
* @typedef {Object} StageInstanceEditOptions * @typedef {Object} StageInstanceEditOptions
* @property {string} [topic] The new topic of the stage instance * @property {string} [topic] The new topic of the stage instance
* @property {StageInstancePrivacyLevel|number} [privacyLevel] The new privacy level of the stage instance * @property {StageInstancePrivacyLevel} [privacyLevel] The new privacy level of the stage instance
*/ */
/** /**

View File

@@ -65,7 +65,8 @@ class ThreadManager extends CachedManager {
* @typedef {StartThreadOptions} ThreadCreateOptions * @typedef {StartThreadOptions} ThreadCreateOptions
* @property {MessageResolvable} [startMessage] The message to start a thread from. <warn>If this is defined then type * @property {MessageResolvable} [startMessage] The message to start a thread from. <warn>If this is defined then type
* of thread gets automatically defined and cannot be changed. The provided `type` field will be ignored</warn> * of thread gets automatically defined and cannot be changed. The provided `type` field will be ignored</warn>
* @property {ThreadChannelTypes|number} [type] The type of thread to create. * @property {ChannelType.GuildNewsThread|ChannelType.GuildPublicThread|ChannelType.GuildPrivateThread} [type]
* The type of thread to create.
* Defaults to {@link ChannelType.GuildPublicThread} if created in a {@link TextChannel} * Defaults to {@link ChannelType.GuildPublicThread} if created in a {@link TextChannel}
* <warn>When creating threads in a {@link NewsChannel} this is ignored and is always * <warn>When creating threads in a {@link NewsChannel} this is ignored and is always
* {@link ChannelType.GuildNewsThread}</warn> * {@link ChannelType.GuildNewsThread}</warn>

View File

@@ -97,7 +97,7 @@ class ClientUser extends User {
* Options for setting activities * Options for setting activities
* @typedef {Object} ActivitiesOptions * @typedef {Object} ActivitiesOptions
* @property {string} [name] Name of the activity * @property {string} [name] Name of the activity
* @property {ActivityType|number} [type] Type of the activity * @property {ActivityType} [type] Type of the activity
* @property {string} [url] Twitch / YouTube stream URL * @property {string} [url] Twitch / YouTube stream URL
*/ */
@@ -149,7 +149,7 @@ class ClientUser extends User {
* @typedef {Object} ActivityOptions * @typedef {Object} ActivityOptions
* @property {string} [name] Name of the activity * @property {string} [name] Name of the activity
* @property {string} [url] Twitch / YouTube stream URL * @property {string} [url] Twitch / YouTube stream URL
* @property {ActivityType|number} [type] Type of the activity * @property {ActivityType} [type] Type of the activity
* @property {number|number[]} [shardId] Shard Id(s) to have the activity set on * @property {number|number[]} [shardId] Shard Id(s) to have the activity set on
*/ */

View File

@@ -718,8 +718,8 @@ class Guild extends AnonymousGuild {
* The data for editing a guild. * The data for editing a guild.
* @typedef {Object} GuildEditData * @typedef {Object} GuildEditData
* @property {string} [name] The name of the guild * @property {string} [name] The name of the guild
* @property {?(GuildVerificationLevel|number)} [verificationLevel] The verification level of the guild * @property {?GuildVerificationLevel} [verificationLevel] The verification level of the guild
* @property {?(GuildExplicitContentFilterLevel|number)} [explicitContentFilter] The level of the explicit content filter * @property {?GuildExplicitContentFilter} [explicitContentFilter] The level of the explicit content filter
* @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild * @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild
* @property {?TextChannelResolvable} [systemChannel] The system channel of the guild * @property {?TextChannelResolvable} [systemChannel] The system channel of the guild
* @property {number} [afkTimeout] The AFK timeout of the guild * @property {number} [afkTimeout] The AFK timeout of the guild
@@ -728,7 +728,7 @@ class Guild extends AnonymousGuild {
* @property {?(BufferResolvable|Base64Resolvable)} [splash] The invite splash image of the guild * @property {?(BufferResolvable|Base64Resolvable)} [splash] The invite splash image of the guild
* @property {?(BufferResolvable|Base64Resolvable)} [discoverySplash] The discovery splash image of the guild * @property {?(BufferResolvable|Base64Resolvable)} [discoverySplash] The discovery splash image of the guild
* @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner of the guild * @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner of the guild
* @property {?(GuildDefaultMessageNotificationLevel|number)} [defaultMessageNotifications] The default message * @property {?GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message
* notification level of the guild * notification level of the guild
* @property {SystemChannelFlagsResolvable} [systemChannelFlags] The system channel flags of the guild * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The system channel flags of the guild
* @property {?TextChannelResolvable} [rulesChannel] The rules channel of the guild * @property {?TextChannelResolvable} [rulesChannel] The rules channel of the guild
@@ -887,7 +887,7 @@ class Guild extends AnonymousGuild {
/* eslint-disable max-len */ /* eslint-disable max-len */
/** /**
* Edits the level of the explicit content filter. * Edits the level of the explicit content filter.
* @param {?(GuildExplicitContentFilterLevel|number)} explicitContentFilter The new level of the explicit content filter * @param {?GuildExplicitContentFilter} explicitContentFilter The new level of the explicit content filter
* @param {string} [reason] Reason for changing the level of the guild's explicit content filter * @param {string} [reason] Reason for changing the level of the guild's explicit content filter
* @returns {Promise<Guild>} * @returns {Promise<Guild>}
*/ */
@@ -897,7 +897,7 @@ class Guild extends AnonymousGuild {
/** /**
* Edits the setting of the default message notifications of the guild. * Edits the setting of the default message notifications of the guild.
* @param {?(GuildDefaultMessageNotificationLevel|number)} defaultMessageNotifications The new default message notification level of the guild * @param {?GuildDefaultMessageNotifications} defaultMessageNotifications The new default message notification level of the guild
* @param {string} [reason] Reason for changing the setting of the default message notifications * @param {string} [reason] Reason for changing the setting of the default message notifications
* @returns {Promise<Guild>} * @returns {Promise<Guild>}
*/ */

View File

@@ -354,7 +354,7 @@ class GuildScheduledEvent extends Base {
* Sets the new status of the guild scheduled event. * Sets the new status of the guild scheduled event.
* <info>If you're working with TypeScript, use this method in conjunction with status type-guards * <info>If you're working with TypeScript, use this method in conjunction with status type-guards
* like {@link GuildScheduledEvent#isScheduled} to get only valid status as suggestion</info> * like {@link GuildScheduledEvent#isScheduled} to get only valid status as suggestion</info>
* @param {GuildScheduledEventStatus|number} status The status of the guild scheduled event * @param {GuildScheduledEventStatus} status The status of the guild scheduled event
* @param {string} [reason] The reason for changing the status * @param {string} [reason] The reason for changing the status
* @returns {Promise<GuildScheduledEvent>} * @returns {Promise<GuildScheduledEvent>}
* @example * @example

View File

@@ -82,7 +82,7 @@ exports.NonSystemMessageTypes = [
* * {@link ChannelType.GuildPublicThread} * * {@link ChannelType.GuildPublicThread}
* * {@link ChannelType.GuildPrivateThread} * * {@link ChannelType.GuildPrivateThread}
* * {@link ChannelType.GuildVoice} * * {@link ChannelType.GuildVoice}
* @typedef {ChannelType} TextBasedChannelTypes * @typedef {ChannelType[]} TextBasedChannelTypes
*/ */
exports.TextBasedChannelTypes = [ exports.TextBasedChannelTypes = [
ChannelType.DM, ChannelType.DM,

View File

@@ -4656,7 +4656,7 @@ export interface GuildScheduledEventEditOptions<
T extends GuildScheduledEventSetStatusArg<S>, T extends GuildScheduledEventSetStatusArg<S>,
> extends Omit<Partial<GuildScheduledEventCreateOptions>, 'channel'> { > extends Omit<Partial<GuildScheduledEventCreateOptions>, 'channel'> {
channel?: GuildVoiceChannelResolvable | null; channel?: GuildVoiceChannelResolvable | null;
status?: T | number; status?: T;
} }
export interface GuildScheduledEventEntityMetadata { export interface GuildScheduledEventEntityMetadata {
@@ -5011,16 +5011,7 @@ export type PresenceResolvable = Presence | UserResolvable | Snowflake;
export interface PartialChannelData { export interface PartialChannelData {
id?: Snowflake | number; id?: Snowflake | number;
parentId?: Snowflake | number; parentId?: Snowflake | number;
type?: Exclude< type?: ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.GuildCategory;
ChannelType,
| ChannelType.DM
| ChannelType.GroupDM
| ChannelType.GuildNews
| ChannelType.GuildNewsThread
| ChannelType.GuildPublicThread
| ChannelType.GuildPrivateThread
| ChannelType.GuildStageVoice
>;
name: string; name: string;
topic?: string | null; topic?: string | null;
nsfw?: boolean; nsfw?: boolean;