diff --git a/packages/discord.js/src/managers/GuildManager.js b/packages/discord.js/src/managers/GuildManager.js index ea4545739..2f7827581 100644 --- a/packages/discord.js/src/managers/GuildManager.js +++ b/packages/discord.js/src/managers/GuildManager.js @@ -82,7 +82,7 @@ class GuildManager extends CachedManager { * @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 * @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} [topic] The topic of the text channel * @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 {number} [afkTimeout] The AFK timeout in seconds * @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 - * @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 {PartialRoleData[]} [roles=[]] The roles for this guild, * the first element of this array is used to change properties of the guild's everyone role. diff --git a/packages/discord.js/src/managers/GuildScheduledEventManager.js b/packages/discord.js/src/managers/GuildScheduledEventManager.js index 5f4e3e624..34e30bbdd 100644 --- a/packages/discord.js/src/managers/GuildScheduledEventManager.js +++ b/packages/discord.js/src/managers/GuildScheduledEventManager.js @@ -43,8 +43,8 @@ class GuildScheduledEventManager extends CachedManager { * @property {DateResolvable} scheduledStartTime The time to schedule the event at * @property {DateResolvable} [scheduledEndTime] The time to end the event at * This is required if `entityType` is {@link GuildScheduledEventEntityType.External} - * @property {GuildScheduledEventPrivacyLevel|number} privacyLevel The privacy level of the guild scheduled event - * @property {GuildScheduledEventEntityType|number} entityType The scheduled entity type of the event + * @property {GuildScheduledEventPrivacyLevel} privacyLevel The privacy level of the guild scheduled event + * @property {GuildScheduledEventEntityType} entityType The scheduled entity type of the event * @property {string} [description] The description of the guild scheduled event * @property {GuildVoiceChannelResolvable} [channel] The channel of the guild scheduled event * 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 {DateResolvable} [scheduledStartTime] The time to schedule 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 {GuildScheduledEventEntityType|number} [entityType] The scheduled entity type of the event + * @property {GuildScheduledEventPrivacyLevel} [privacyLevel] The privacy level of the guild scheduled event + * @property {GuildScheduledEventEntityType} [entityType] The scheduled entity type of the event * @property {string} [description] The description 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 * guild scheduled event * This can be modified only if `entityType` of the `GuildScheduledEvent` to be edited is diff --git a/packages/discord.js/src/managers/StageInstanceManager.js b/packages/discord.js/src/managers/StageInstanceManager.js index 8f22ff008..1217a0969 100644 --- a/packages/discord.js/src/managers/StageInstanceManager.js +++ b/packages/discord.js/src/managers/StageInstanceManager.js @@ -30,7 +30,7 @@ class StageInstanceManager extends CachedManager { * Options used to create a stage instance. * @typedef {Object} StageInstanceCreateOptions * @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 */ @@ -101,7 +101,7 @@ class StageInstanceManager extends CachedManager { * Options used to edit an existing stage instance. * @typedef {Object} StageInstanceEditOptions * @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 */ /** diff --git a/packages/discord.js/src/managers/ThreadManager.js b/packages/discord.js/src/managers/ThreadManager.js index 31e27c71b..3be79b37f 100644 --- a/packages/discord.js/src/managers/ThreadManager.js +++ b/packages/discord.js/src/managers/ThreadManager.js @@ -65,7 +65,8 @@ class ThreadManager extends CachedManager { * @typedef {StartThreadOptions} ThreadCreateOptions * @property {MessageResolvable} [startMessage] The message to start a thread from. If this is defined then type * of thread gets automatically defined and cannot be changed. The provided `type` field will be ignored - * @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} * When creating threads in a {@link NewsChannel} this is ignored and is always * {@link ChannelType.GuildNewsThread} diff --git a/packages/discord.js/src/structures/ClientUser.js b/packages/discord.js/src/structures/ClientUser.js index 9fc2b2cfa..e8041d4b4 100644 --- a/packages/discord.js/src/structures/ClientUser.js +++ b/packages/discord.js/src/structures/ClientUser.js @@ -97,7 +97,7 @@ class ClientUser extends User { * Options for setting activities * @typedef {Object} ActivitiesOptions * @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 */ @@ -149,7 +149,7 @@ class ClientUser extends User { * @typedef {Object} ActivityOptions * @property {string} [name] Name of the activity * @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 */ diff --git a/packages/discord.js/src/structures/Guild.js b/packages/discord.js/src/structures/Guild.js index d464a9717..08fb347d4 100644 --- a/packages/discord.js/src/structures/Guild.js +++ b/packages/discord.js/src/structures/Guild.js @@ -718,8 +718,8 @@ class Guild extends AnonymousGuild { * The data for editing a guild. * @typedef {Object} GuildEditData * @property {string} [name] The name of the guild - * @property {?(GuildVerificationLevel|number)} [verificationLevel] The verification level of the guild - * @property {?(GuildExplicitContentFilterLevel|number)} [explicitContentFilter] The level of the explicit content filter + * @property {?GuildVerificationLevel} [verificationLevel] The verification level of the guild + * @property {?GuildExplicitContentFilter} [explicitContentFilter] The level of the explicit content filter * @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild * @property {?TextChannelResolvable} [systemChannel] The system channel 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)} [discoverySplash] The discovery splash image 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 * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The system channel flags of the guild * @property {?TextChannelResolvable} [rulesChannel] The rules channel of the guild @@ -887,7 +887,7 @@ class Guild extends AnonymousGuild { /* eslint-disable max-len */ /** * 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 * @returns {Promise} */ @@ -897,7 +897,7 @@ class Guild extends AnonymousGuild { /** * 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 * @returns {Promise} */ diff --git a/packages/discord.js/src/structures/GuildScheduledEvent.js b/packages/discord.js/src/structures/GuildScheduledEvent.js index 70f25bf4b..ac901a511 100644 --- a/packages/discord.js/src/structures/GuildScheduledEvent.js +++ b/packages/discord.js/src/structures/GuildScheduledEvent.js @@ -354,7 +354,7 @@ class GuildScheduledEvent extends Base { * Sets the new status of the guild scheduled event. * 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 - * @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 * @returns {Promise} * @example diff --git a/packages/discord.js/src/util/Constants.js b/packages/discord.js/src/util/Constants.js index 0b2fbd536..5b1eafd94 100644 --- a/packages/discord.js/src/util/Constants.js +++ b/packages/discord.js/src/util/Constants.js @@ -82,7 +82,7 @@ exports.NonSystemMessageTypes = [ * * {@link ChannelType.GuildPublicThread} * * {@link ChannelType.GuildPrivateThread} * * {@link ChannelType.GuildVoice} - * @typedef {ChannelType} TextBasedChannelTypes + * @typedef {ChannelType[]} TextBasedChannelTypes */ exports.TextBasedChannelTypes = [ ChannelType.DM, diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 6f44311f4..946dc2c92 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -4656,7 +4656,7 @@ export interface GuildScheduledEventEditOptions< T extends GuildScheduledEventSetStatusArg, > extends Omit, 'channel'> { channel?: GuildVoiceChannelResolvable | null; - status?: T | number; + status?: T; } export interface GuildScheduledEventEntityMetadata { @@ -5011,16 +5011,7 @@ export type PresenceResolvable = Presence | UserResolvable | Snowflake; export interface PartialChannelData { id?: Snowflake | number; parentId?: Snowflake | number; - type?: Exclude< - ChannelType, - | ChannelType.DM - | ChannelType.GroupDM - | ChannelType.GuildNews - | ChannelType.GuildNewsThread - | ChannelType.GuildPublicThread - | ChannelType.GuildPrivateThread - | ChannelType.GuildStageVoice - >; + type?: ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.GuildCategory; name: string; topic?: string | null; nsfw?: boolean;