diff --git a/packages/discord.js/src/managers/GuildMemberManager.js b/packages/discord.js/src/managers/GuildMemberManager.js index a4cf09b5d07e..dab62e6c1fc9 100644 --- a/packages/discord.js/src/managers/GuildMemberManager.js +++ b/packages/discord.js/src/managers/GuildMemberManager.js @@ -93,7 +93,7 @@ class GuildMemberManager extends CachedManager { * This method requires the {@link PermissionFlagsBits.CreateInstantInvite} permission. * @param {UserResolvable} user The user to add to the guild * @param {AddGuildMemberOptions} options Options for adding the user to the guild - * @returns {Promise} + * @returns {Promise} */ async add(user, options) { const userId = this.client.users.resolveId(user); @@ -326,9 +326,9 @@ class GuildMemberManager extends CachedManager { * @property {Collection|RoleResolvable[]} [roles] The roles or role ids to apply * @property {boolean} [mute] Whether or not the member should be muted * @property {boolean} [deaf] Whether or not the member should be deafened - * @property {GuildVoiceChannelResolvable|null} [channel] Channel to move the member to + * @property {?GuildVoiceChannelResolvable} [channel] Channel to move the member to * (if they are connected to voice), or `null` if you want to disconnect them from voice - * @property {DateResolvable|null} [communicationDisabledUntil] The date or timestamp + * @property {?DateResolvable} [communicationDisabledUntil] The date or timestamp * for the member's communication to be disabled until. Provide `null` to enable communication again. * @property {GuildMemberFlagsResolvable} [flags] The flags to set for the member * @property {string} [reason] Reason for editing this user @@ -400,7 +400,7 @@ class GuildMemberManager extends CachedManager { /** * Prunes members from the guild based on how long they have been inactive. * @param {GuildPruneMembersOptions} [options] Options for pruning - * @returns {Promise} The number of members that were/will be kicked + * @returns {Promise} The number of members that were/will be kicked * @example * // See how many members will be pruned * guild.members.prune({ dry: true }) diff --git a/packages/discord.js/src/structures/ApplicationCommand.js b/packages/discord.js/src/structures/ApplicationCommand.js index b38f2cfd786f..fe45763b438d 100644 --- a/packages/discord.js/src/structures/ApplicationCommand.js +++ b/packages/discord.js/src/structures/ApplicationCommand.js @@ -144,7 +144,7 @@ class ApplicationCommand extends Base { /** * Whether the command can be used in DMs * This property is always `null` on guild commands - * @type {boolean|null} + * @type {?boolean} */ this.dmPermission = data.dm_permission; } else { diff --git a/packages/discord.js/src/structures/GuildMember.js b/packages/discord.js/src/structures/GuildMember.js index 4dcf25cf545b..2a39f3f59940 100644 --- a/packages/discord.js/src/structures/GuildMember.js +++ b/packages/discord.js/src/structures/GuildMember.js @@ -404,7 +404,7 @@ class GuildMember extends Base { /** * Times this guild member out. - * @param {DateResolvable|null} communicationDisabledUntil The date or timestamp + * @param {?DateResolvable} communicationDisabledUntil The date or timestamp * for the member's communication to be disabled until. Provide `null` to remove the timeout. * @param {string} [reason] The reason for this timeout. * @returns {Promise} @@ -425,7 +425,7 @@ class GuildMember extends Base { /** * Times this guild member out. - * @param {number|null} timeout The duration in milliseconds + * @param {?number} timeout The duration in milliseconds * for the member's communication to be disabled. Provide `null` to remove the timeout. * @param {string} [reason] The reason for this timeout. * @returns {Promise} diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js index 913767f54182..fdb5fdf82fe1 100644 --- a/packages/discord.js/src/structures/ThreadChannel.js +++ b/packages/discord.js/src/structures/ThreadChannel.js @@ -310,7 +310,7 @@ class ThreadChannel extends BaseChannel { * or when the original message in the parent channel is deleted. * If you just need the id of that message, use {@link ThreadChannel#id} instead. * @param {BaseFetchOptions} [options] Additional options for this fetch - * @returns {Promise|null>} + * @returns {Promise>} */ // eslint-disable-next-line require-await async fetchStarterMessage(options) { diff --git a/packages/discord.js/src/structures/VoiceState.js b/packages/discord.js/src/structures/VoiceState.js index ae510f2cf40e..73b5027fb553 100644 --- a/packages/discord.js/src/structures/VoiceState.js +++ b/packages/discord.js/src/structures/VoiceState.js @@ -197,7 +197,7 @@ class VoiceState extends Base { /** * Moves the member to a different channel, or disconnects them from the one they're in. - * @param {GuildVoiceChannelResolvable|null} channel Channel to move the member to, or `null` if you want to + * @param {?GuildVoiceChannelResolvable} channel Channel to move the member to, or `null` if you want to * disconnect them from voice. * @param {string} [reason] Reason for moving member to another channel or disconnecting * @returns {Promise} diff --git a/packages/discord.js/src/structures/interfaces/Collector.js b/packages/discord.js/src/structures/interfaces/Collector.js index 65f411744035..68bccc433462 100644 --- a/packages/discord.js/src/structures/interfaces/Collector.js +++ b/packages/discord.js/src/structures/interfaces/Collector.js @@ -81,7 +81,7 @@ class Collector extends EventEmitter { /** * The reason the collector ended - * @type {string|null} + * @type {?string} * @private */ this._endReason = null; diff --git a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js index 7d7649736899..fd391f5df3a3 100644 --- a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js +++ b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js @@ -55,7 +55,7 @@ class TextBasedChannel { /** * The base message options for messages. * @typedef {Object} BaseMessageOptions - * @property {string|null} [content=''] The content for the message. This can only be `null` when editing a message. + * @property {?string} [content=''] The content for the message. This can only be `null` when editing a message. * @property {Array<(EmbedBuilder|Embed|APIEmbed)>} [embeds] The embeds for the message * @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content * (see [here](https://discord.com/developers/docs/resources/channel#allowed-mentions-object) for more details) diff --git a/packages/discord.js/src/util/Sweepers.js b/packages/discord.js/src/util/Sweepers.js index 6eb2dc65d0e2..3cc910838c2d 100644 --- a/packages/discord.js/src/util/Sweepers.js +++ b/packages/discord.js/src/util/Sweepers.js @@ -7,7 +7,7 @@ const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * @typedef {Function} GlobalSweepFilter - * @returns {Function|null} Return `null` to skip sweeping, otherwise a function passed to `sweep()`, + * @returns {?Function} Return `null` to skip sweeping, otherwise a function passed to `sweep()`, * See {@link [Collection#sweep](https://discord.js.org/docs/packages/collection/stable/Collection:Class#sweep)} * for the definition of this function. */