diff --git a/.github/workflows/cleanup-cache.yml b/.github/workflows/cleanup-cache.yml
index 55aa79741217..93fedb93e90b 100644
--- a/.github/workflows/cleanup-cache.yml
+++ b/.github/workflows/cleanup-cache.yml
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Cleanup caches
run: |
diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml
index 842713510a8a..d1b30bca3397 100644
--- a/.github/workflows/deploy-website.yml
+++ b/.github/workflows/deploy-website.yml
@@ -14,12 +14,12 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Install Node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
diff --git a/.github/workflows/deprecate-version.yml b/.github/workflows/deprecate-version.yml
index b788903784a6..e1dc1d00d363 100644
--- a/.github/workflows/deprecate-version.yml
+++ b/.github/workflows/deprecate-version.yml
@@ -34,12 +34,12 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Install Node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
index b2692239aca2..2ae3c5d10594 100644
--- a/.github/workflows/documentation.yml
+++ b/.github/workflows/documentation.yml
@@ -36,14 +36,14 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || '' }}
- - name: Install node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
@@ -53,7 +53,7 @@ jobs:
- name: Checkout main repository
if: ${{ inputs.ref && inputs.ref != 'main' }}
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: 'main'
@@ -93,7 +93,7 @@ jobs:
done
- name: Checkout docs repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: 'discordjs/docs'
token: ${{ secrets.DJS_DOCS }}
@@ -211,12 +211,12 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Install node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml
index a684a29543c9..7dd9b1ce7156 100644
--- a/.github/workflows/issue-triage.yml
+++ b/.github/workflows/issue-triage.yml
@@ -6,7 +6,7 @@ jobs:
issue-triage:
runs-on: ubuntu-latest
steps:
- - uses: github/issue-labeler@v3.2
+ - uses: github/issue-labeler@v3.4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
configuration-path: .github/issue-labeler.yml
diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml
index 5a9e1cf0ee6c..e7cf080d55b8 100644
--- a/.github/workflows/label-sync.yml
+++ b/.github/workflows/label-sync.yml
@@ -15,9 +15,9 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Label sync
- uses: crazy-max/ghaction-github-labeler@v4
+ uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
index 2a50b7b8acb6..214737cb390a 100644
--- a/.github/workflows/lock.yml
+++ b/.github/workflows/lock.yml
@@ -11,7 +11,7 @@ jobs:
permissions:
issues: write
steps:
- - uses: dessant/lock-threads@v4
+ - uses: dessant/lock-threads@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: 365
diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml
index 7b41a5834dcd..0ceab25aaedf 100644
--- a/.github/workflows/pr-triage.yml
+++ b/.github/workflows/pr-triage.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Automatically label PR
- uses: actions/labeler@v4
+ uses: actions/labeler@v5
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true
diff --git a/.github/workflows/publish-dev-docker.yml b/.github/workflows/publish-dev-docker.yml
index 91b945fb71a7..9a99c7fefc47 100644
--- a/.github/workflows/publish-dev-docker.yml
+++ b/.github/workflows/publish-dev-docker.yml
@@ -10,18 +10,18 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Install node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml
index 7482c76a4761..202073c92915 100644
--- a/.github/workflows/publish-dev.yml
+++ b/.github/workflows/publish-dev.yml
@@ -43,14 +43,14 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- - name: Install node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
registry-url: https://registry.npmjs.org/
- name: Check the current development version
diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml
index 421fc48835be..e3a65a14379d 100644
--- a/.github/workflows/publish-docker.yml
+++ b/.github/workflows/publish-docker.yml
@@ -7,18 +7,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Install node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml
index 2960253dcb26..60165e26b0b2 100644
--- a/.github/workflows/publish-release.yml
+++ b/.github/workflows/publish-release.yml
@@ -14,12 +14,12 @@ jobs:
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Install node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 52f193f1f16b..4ea93cab48be 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -15,14 +15,14 @@ jobs:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- - name: Install node.js v18
- uses: actions/setup-node@v3
+ - name: Install Node.js v20
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
@@ -62,3 +62,5 @@ jobs:
- name: Upload Coverage
if: github.repository_owner == 'discordjs'
uses: ./packages/actions/src/uploadCoverage
+ with:
+ codecov_token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/apps/website/src/components/DocNode.tsx b/apps/website/src/components/DocNode.tsx
index bd9682ae64d6..acd2e0262399 100644
--- a/apps/website/src/components/DocNode.tsx
+++ b/apps/website/src/components/DocNode.tsx
@@ -30,7 +30,7 @@ export async function DocNode({ node, version }: { readonly node?: any; readonly
rel="external noreferrer noopener"
target="_blank"
>
- {node.text}
+ {`${node.text}${node.members}`}
);
}
diff --git a/packages/actions/src/pnpmCache/action.yml b/packages/actions/src/pnpmCache/action.yml
index 89477f871055..5b8db0b0a19e 100644
--- a/packages/actions/src/pnpmCache/action.yml
+++ b/packages/actions/src/pnpmCache/action.yml
@@ -9,7 +9,7 @@ runs:
with:
swap-size-gb: 10
- - uses: pnpm/action-setup@v2.2.4
+ - uses: pnpm/action-setup@v4.0.0
name: Install pnpm
with:
run_install: false
@@ -26,7 +26,7 @@ runs:
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
- - uses: actions/cache@v3
+ - uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
diff --git a/packages/actions/src/uploadCoverage/action.yml b/packages/actions/src/uploadCoverage/action.yml
index a8406ad55b81..54a2e55c98a2 100644
--- a/packages/actions/src/uploadCoverage/action.yml
+++ b/packages/actions/src/uploadCoverage/action.yml
@@ -1,88 +1,106 @@
name: 'Upload Coverage'
description: 'Uploads code coverage reports to codecov with separate flags for separate packages'
+inputs:
+ codecov_token:
+ description: 'Codecov token.'
+ required: true
runs:
using: 'composite'
steps:
- name: Upload Guide Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./apps/guide/coverage/cobertura-coverage.xml
flags: guide
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Website Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./apps/website/coverage/cobertura-coverage.xml
flags: website
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Brokers Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/brokers/coverage/cobertura-coverage.xml
flags: brokers
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Builders Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/builders/coverage/cobertura-coverage.xml
flags: builders
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Collection Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/collection/coverage/cobertura-coverage.xml
flags: collection
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Discord.js Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/discord.js/coverage/cobertura-coverage.xml
flags: discord.js
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Formatters Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/formatters/coverage/cobertura-coverage.xml
flags: formatters
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Next Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/next/coverage/cobertura-coverage.xml
flags: next
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Proxy Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/proxy/coverage/cobertura-coverage.xml
flags: proxy
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Rest Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/rest/coverage/cobertura-coverage.xml
flags: rest
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Voice Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/voice/coverage/cobertura-coverage.xml
flags: voice
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload WS Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/ws/coverage/cobertura-coverage.xml
flags: ws
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Util Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/util/coverage/cobertura-coverage.xml
flags: util
+ token: ${{ inputs.CODECOV_TOKEN }}
- name: Upload Utilities Coverage
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
files: ./packages/actions/coverage/cobertura-coverage.xml, ./packages/scripts/coverage/cobertura-coverage.xml
flags: utilities
+ token: ${{ inputs.CODECOV_TOKEN }}
diff --git a/packages/actions/src/yarnCache/action.yml b/packages/actions/src/yarnCache/action.yml
index 40346eed41c7..50c880ed8f6d 100644
--- a/packages/actions/src/yarnCache/action.yml
+++ b/packages/actions/src/yarnCache/action.yml
@@ -21,7 +21,7 @@ runs:
echo "NPM_GLOBAL_CACHE_FOLDER=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: Restore yarn cache
- uses: actions/cache@v3
+ uses: actions/cache@v4
id: yarn-download-cache
with:
path: ${{ steps.yarn-config.outputs.CACHE_FOLDER }}
@@ -31,7 +31,7 @@ runs:
- name: Restore global npm cache folder
id: npm-global-cache
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ steps.yarn-config.outputs.NPM_GLOBAL_CACHE_FOLDER }}
key: npm-global-cache-default-${{ runner.os }}-${{ steps.yarn-config.outputs.CURRENT_NODE_VERSION }}-${{ hashFiles(yarn.lock, .yarnrc.yml) }}
diff --git a/packages/api-extractor-model/src/model/ModelReferenceResolver.ts b/packages/api-extractor-model/src/model/ModelReferenceResolver.ts
index 48722f1fe555..944e8c6677e6 100644
--- a/packages/api-extractor-model/src/model/ModelReferenceResolver.ts
+++ b/packages/api-extractor-model/src/model/ModelReferenceResolver.ts
@@ -6,6 +6,7 @@ import { type ApiItem, ApiItemKind } from '../items/ApiItem.js';
import { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin.js';
import { ApiParameterListMixin } from '../mixins/ApiParameterListMixin.js';
import type { ApiEntryPoint } from './ApiEntryPoint.js';
+import type { ApiMethod } from './ApiMethod.js';
import type { ApiModel } from './ApiModel.js';
import type { ApiPackage } from './ApiPackage.js';
@@ -119,6 +120,10 @@ export class ModelReferenceResolver {
foundMembers.filter((member) => member.kind === ApiItemKind.Interface).length === foundMembers.length - 1
) {
currentItem = foundClass;
+ } else if (
+ foundMembers.every((member) => member.kind === ApiItemKind.Method && (member as ApiMethod).overloadIndex)
+ ) {
+ currentItem = foundMembers.find((member) => (member as ApiMethod).overloadIndex === 1)!;
} else {
result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;
return result;
diff --git a/packages/discord.js/src/managers/GuildManager.js b/packages/discord.js/src/managers/GuildManager.js
index 48853cd893c5..1ab9090bd1ee 100644
--- a/packages/discord.js/src/managers/GuildManager.js
+++ b/packages/discord.js/src/managers/GuildManager.js
@@ -97,7 +97,7 @@ class GuildManager extends CachedManager {
*/
/**
- * Resolves a GuildResolvable to a Guild object.
+ * Resolves a {@link GuildResolvable} to a {@link Guild} object.
* @method resolve
* @memberof GuildManager
* @instance
diff --git a/packages/discord.js/src/managers/GuildTextThreadManager.js b/packages/discord.js/src/managers/GuildTextThreadManager.js
index 5591845b20b1..9fdcd7141c52 100644
--- a/packages/discord.js/src/managers/GuildTextThreadManager.js
+++ b/packages/discord.js/src/managers/GuildTextThreadManager.js
@@ -17,7 +17,7 @@ class GuildTextThreadManager extends ThreadManager {
/**
* Options for creating a thread. Only one of `startMessage` or `type` can be defined.
- * @typedef {StartThreadOptions} ThreadCreateOptions
+ * @typedef {StartThreadOptions} GuildTextThreadCreateOptions
* @property {MessageResolvable} [startMessage] The message to start a thread from.
* If this is defined, then the `type` of thread gets inferred automatically and cannot be changed.
* @property {ThreadChannelTypes} [type] The type of thread to create.
@@ -30,7 +30,7 @@ class GuildTextThreadManager extends ThreadManager {
/**
* Creates a new thread in the channel.
- * @param {ThreadCreateOptions} [options] Options to create a new thread
+ * @param {GuildTextThreadCreateOptions} [options] Options to create a new thread
* @returns {Promise}
* @example
* // Create a new public thread
diff --git a/packages/discord.js/src/managers/ThreadManager.js b/packages/discord.js/src/managers/ThreadManager.js
index c4b2e60f6dca..ab32cc495dc3 100644
--- a/packages/discord.js/src/managers/ThreadManager.js
+++ b/packages/discord.js/src/managers/ThreadManager.js
@@ -63,20 +63,6 @@ class ThreadManager extends CachedManager {
* @returns {?Snowflake}
*/
- /**
- * Options for creating a thread. Only one of `startMessage` or `type` can be defined.
- * @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 {ChannelType.AnnouncementThread|ChannelType.PublicThread|ChannelType.PrivateThread} [type]
- * The type of thread to create.
- * Defaults to {@link ChannelType.PublicThread} if created in a {@link TextChannel}
- * When creating threads in a {@link NewsChannel} this is ignored and is always
- * {@link ChannelType.AnnouncementThread}
- * @property {boolean} [invitable] Whether non-moderators can add other non-moderators to the thread
- * Can only be set when type will be {@link ChannelType.PrivateThread}
- */
-
/**
* Options for fetching multiple threads.
* @typedef {Object} FetchThreadsOptions
diff --git a/packages/discord.js/src/sharding/ShardingManager.js b/packages/discord.js/src/sharding/ShardingManager.js
index d2b146775c6b..4b15b46c562c 100644
--- a/packages/discord.js/src/sharding/ShardingManager.js
+++ b/packages/discord.js/src/sharding/ShardingManager.js
@@ -23,7 +23,7 @@ class ShardingManager extends EventEmitter {
/**
* The mode to spawn shards with for a {@link ShardingManager}. Can be either one of:
* * 'process' to use child processes
- * * 'worker' to use [Worker threads](https://nodejs.org/api/worker_threads.html)
+ * * 'worker' to use {@link Worker} threads
* @typedef {string} ShardingManagerMode
*/
diff --git a/packages/discord.js/src/structures/Guild.js b/packages/discord.js/src/structures/Guild.js
index 831dae326dc3..6fc78f07a8ca 100644
--- a/packages/discord.js/src/structures/Guild.js
+++ b/packages/discord.js/src/structures/Guild.js
@@ -164,7 +164,7 @@ class Guild extends AnonymousGuild {
if ('large' in data) {
/**
- * Whether the guild is "large" (has more than {@link WebsocketOptions large_threshold} members, 50 by default)
+ * Whether the guild is "large" (has more than {@link WebSocketOptions large_threshold} members, 50 by default)
* @type {boolean}
*/
this.large = Boolean(data.large);
@@ -291,7 +291,8 @@ class Guild extends AnonymousGuild {
if ('max_presences' in data) {
/**
* The maximum amount of presences the guild can have (this is `null` for all but the largest of guilds)
- * You will need to fetch the guild using {@link Guild#fetch} if you want to receive this parameter
+ * You will need to fetch the guild using {@link BaseGuild#fetch} if you want to receive
+ * this parameter
* @type {?number}
*/
this.maximumPresences = data.max_presences;
@@ -322,7 +323,8 @@ class Guild extends AnonymousGuild {
if ('approximate_member_count' in data) {
/**
* The approximate amount of members the guild has
- * You will need to fetch the guild using {@link Guild#fetch} if you want to receive this parameter
+ * You will need to fetch the guild using {@link BaseGuild#fetch} if you want to receive
+ * this parameter
* @type {?number}
*/
this.approximateMemberCount = data.approximate_member_count;
@@ -333,7 +335,8 @@ class Guild extends AnonymousGuild {
if ('approximate_presence_count' in data) {
/**
* The approximate amount of presences the guild has
- * You will need to fetch the guild using {@link Guild#fetch} if you want to receive this parameter
+ * You will need to fetch the guild using {@link BaseGuild#fetch} if you want to receive
+ * this parameter
* @type {?number}
*/
this.approximatePresenceCount = data.approximate_presence_count;
diff --git a/packages/discord.js/src/structures/GuildScheduledEvent.js b/packages/discord.js/src/structures/GuildScheduledEvent.js
index 66f189eeedf1..f5a5291232e5 100644
--- a/packages/discord.js/src/structures/GuildScheduledEvent.js
+++ b/packages/discord.js/src/structures/GuildScheduledEvent.js
@@ -229,7 +229,7 @@ class GuildScheduledEvent extends Base {
/**
* The time the guild scheduled event will start at
- * This can be potentially `null` only when it's an {@link AuditLogEntryTarget}
+ * This can be potentially `null` only when it's an {@link GuildAuditLogsEntry#target}
* @type {?Date}
* @readonly
*/
diff --git a/packages/discord.js/src/structures/PermissionOverwrites.js b/packages/discord.js/src/structures/PermissionOverwrites.js
index 2cdc827327bc..3f3c286ff798 100644
--- a/packages/discord.js/src/structures/PermissionOverwrites.js
+++ b/packages/discord.js/src/structures/PermissionOverwrites.js
@@ -148,7 +148,7 @@ class PermissionOverwrites extends Base {
*/
/**
- * Data that can be resolved into {@link RawOverwriteData}. This can be:
+ * Data that can be resolved into {@link APIOverwrite}. This can be:
* * PermissionOverwrites
* * OverwriteData
* @typedef {PermissionOverwrites|OverwriteData} OverwriteResolvable
@@ -164,7 +164,7 @@ class PermissionOverwrites extends Base {
*/
/**
- * Resolves an overwrite into {@link RawOverwriteData}.
+ * Resolves an overwrite into {@link APIOverwrite}.
* @param {OverwriteResolvable} overwrite The overwrite-like data to resolve
* @param {Guild} [guild] The guild to resolve from
* @returns {RawOverwriteData}
diff --git a/packages/discord.js/src/structures/ReactionCollector.js b/packages/discord.js/src/structures/ReactionCollector.js
index e6e46241dc7c..8a0ca9063d51 100644
--- a/packages/discord.js/src/structures/ReactionCollector.js
+++ b/packages/discord.js/src/structures/ReactionCollector.js
@@ -81,7 +81,7 @@ class ReactionCollector extends Collector {
this.on('collect', (reaction, user) => {
/**
* Emitted whenever a reaction is newly created on a message. Will emit only when a new reaction is
- * added to the message, as opposed to {@link Collector#collect} which will
+ * added to the message, as opposed to {@link Collector#event:collect} which will
* be emitted even when a reaction has already been added to the message.
* @event ReactionCollector#create
* @param {MessageReaction} reaction The reaction that was added
diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js
index 49901e464837..a2c7aa661f4f 100644
--- a/packages/discord.js/src/structures/ThreadChannel.js
+++ b/packages/discord.js/src/structures/ThreadChannel.js
@@ -315,7 +315,7 @@ class ThreadChannel extends BaseChannel {
* Fetches the message that started this thread, if any.
* The `Promise` will reject if the original message in a forum post is deleted
* 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.
+ * If you just need the id of that message, use {@link BaseChannel#id} instead.
* @param {BaseFetchOptions} [options] Additional options for this fetch
* @returns {Promise>}
*/
diff --git a/packages/discord.js/src/util/APITypes.js b/packages/discord.js/src/util/APITypes.js
index 176e59046420..1031c13bee25 100644
--- a/packages/discord.js/src/util/APITypes.js
+++ b/packages/discord.js/src/util/APITypes.js
@@ -160,6 +160,11 @@
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalSubmission}
*/
+/**
+ * @external APIOverwrite
+ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIOverwrite}
+ */
+
/**
* @external APIPartialEmoji
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIPartialEmoji}
diff --git a/packages/discord.js/src/util/Constants.js b/packages/discord.js/src/util/Constants.js
index d08a86dde2e9..e64d807e4300 100644
--- a/packages/discord.js/src/util/Constants.js
+++ b/packages/discord.js/src/util/Constants.js
@@ -95,15 +95,15 @@ exports.GuildTextBasedChannelTypes = [
/**
* The channels that are text-based.
- * * DMChannel
- * * GuildTextBasedChannel
+ * * {@link DMChannel}
+ * * {@link GuildTextBasedChannel}
* @typedef {DMChannel|GuildTextBasedChannel} TextBasedChannels
*/
/**
* Data that resolves to give a text-based channel. This can be:
- * * A text-based channel
- * * A snowflake
+ * * A {@link TextBasedChannel}
+ * * A {@link Snowflake}
* @typedef {TextBasedChannels|Snowflake} TextBasedChannelsResolvable
*/
diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts
index 76fdcc12c6d6..b4ff840dbc9b 100644
--- a/packages/discord.js/typings/index.d.ts
+++ b/packages/discord.js/typings/index.d.ts
@@ -5160,6 +5160,13 @@ export interface WebhookCreateOptions extends ChannelWebhookCreateOptions {
channel: TextChannel | NewsChannel | VoiceChannel | StageChannel | ForumChannel | MediaChannel | Snowflake;
}
+export interface GuildMembersChunk {
+ index: number;
+ count: number;
+ notFound: readonly unknown[];
+ nonce: string | undefined;
+}
+
export interface ClientEvents {
applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
@@ -5197,11 +5204,7 @@ export interface ClientEvents {
guildMemberAdd: [member: GuildMember];
guildMemberAvailable: [member: GuildMember | PartialGuildMember];
guildMemberRemove: [member: GuildMember | PartialGuildMember];
- guildMembersChunk: [
- members: ReadonlyCollection,
- guild: Guild,
- data: { index: number; count: number; notFound: readonly unknown[]; nonce: string | undefined },
- ];
+ guildMembersChunk: [members: ReadonlyCollection, guild: Guild, data: GuildMembersChunk];
guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
guildUpdate: [oldGuild: Guild, newGuild: Guild];
inviteCreate: [invite: Invite];
@@ -6723,6 +6726,8 @@ export type TextBasedChannel = Exclude<
PartialGroupDMChannel | ForumChannel | MediaChannel
>;
+export type TextBasedChannels = TextBasedChannel;
+
export type TextBasedChannelTypes = TextBasedChannel['type'];
export type GuildTextBasedChannelTypes = Exclude;