From 5bdb34b3be8344348931c921107cdbc8c796fd53 Mon Sep 17 00:00:00 2001 From: Almeida Date: Mon, 18 Sep 2023 16:24:49 +0100 Subject: [PATCH 1/9] docs: remove broken markdown links (#9822) chore: remove broken markdown links to documentation Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/actions/README.md | 3 +-- packages/api-extractor-utils/README.md | 3 +-- packages/docgen/README.md | 4 +--- packages/proxy-container/README.md | 4 +--- packages/scripts/README.md | 2 +- packages/ui/README.md | 4 +--- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/actions/README.md b/packages/actions/README.md index 6f664f8f1a98..1cc130555a38 100644 --- a/packages/actions/README.md +++ b/packages/actions/README.md @@ -26,8 +26,7 @@ ## Contributing -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the -[documentation][documentation]. +Before creating an issue, please ensure that it hasn't already been reported/suggested. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help diff --git a/packages/api-extractor-utils/README.md b/packages/api-extractor-utils/README.md index 4e526f5083e7..2003a82e1ca1 100644 --- a/packages/api-extractor-utils/README.md +++ b/packages/api-extractor-utils/README.md @@ -26,8 +26,7 @@ ## Contributing -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the -[documentation][documentation]. +Before creating an issue, please ensure that it hasn't already been reported/suggested. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help diff --git a/packages/docgen/README.md b/packages/docgen/README.md index 1e95968428c1..446baba0b6dc 100644 --- a/packages/docgen/README.md +++ b/packages/docgen/README.md @@ -17,7 +17,6 @@ ## Links - [Website][website] ([source][website-source]) -- [Documentation][documentation] - [Guide][guide] ([source][guide-source]) Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] @@ -28,8 +27,7 @@ ## Contributing -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the -[documentation][documentation]. +Before creating an issue, please ensure that it hasn't already been reported/suggested. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help diff --git a/packages/proxy-container/README.md b/packages/proxy-container/README.md index 6821bb725c49..5a33efa644d7 100644 --- a/packages/proxy-container/README.md +++ b/packages/proxy-container/README.md @@ -55,7 +55,6 @@ Webhooks with tokens or other requests that don't include the Authorization head ## Links - [Website][website] ([source][website-source]) -- [Documentation][documentation] - [Guide][guide] ([source][guide-source]) Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] @@ -65,8 +64,7 @@ Webhooks with tokens or other requests that don't include the Authorization head ## Contributing -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the -[documentation][documentation]. +Before creating an issue, please ensure that it hasn't already been reported/suggested. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help diff --git a/packages/scripts/README.md b/packages/scripts/README.md index 8c7f351278f4..8815b601643c 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -26,7 +26,7 @@ ## Contributing -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the[documentation][documentation]. +Before creating an issue, please ensure that it hasn't already been reported/suggested. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help diff --git a/packages/ui/README.md b/packages/ui/README.md index 0a59d9f6b6b5..760317c62604 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -17,7 +17,6 @@ ## Links - [Website][website] ([source][website-source]) -- [Documentation][documentation] - [Guide][guide] ([source][guide-source]) Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] @@ -27,8 +26,7 @@ ## Contributing -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the -[documentation][documentation]. +Before creating an issue, please ensure that it hasn't already been reported/suggested. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help From 5a7b5b56ae8286975bebb584d681f9c43dfde3b4 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 19 Sep 2023 18:47:50 +0100 Subject: [PATCH 2/9] ci: Deprecate step after publish & standalone file (#9837) * ci: deprecate step after publish & standalone file * docs: update contributing file --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .github/CONTRIBUTING.md | 7 +++- .github/workflows/deprecate-version.yml | 50 ++++++++++++++++++++++++ .github/workflows/npm-auto-deprecate.yml | 26 ------------ .github/workflows/publish-dev.yml | 5 +++ 4 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/deprecate-version.yml delete mode 100644 .github/workflows/npm-auto-deprecate.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 963e09714e3a..21b588069115 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -43,5 +43,8 @@ If you'd like to create another package under the `@discordjs` organization run pnpm run create-package [package-description] ``` -This will create new package directory under `packages/` with the required configuration files. You can -begin to make changes within the `src/` directory. It may also be required to update the CODEOWNERS file. +This will create new package directory under `packages/` with the required configuration files. You may begin +to make changes within the `src/` directory. You may also need to: + +- Update workflows that utilize packages +- Update the CODEOWNERS file diff --git a/.github/workflows/deprecate-version.yml b/.github/workflows/deprecate-version.yml new file mode 100644 index 000000000000..cf66ebd6d897 --- /dev/null +++ b/.github/workflows/deprecate-version.yml @@ -0,0 +1,50 @@ +name: Deprecate version +on: + workflow_dispatch: + inputs: + package: + description: Package + required: true + type: choice + options: + - '@discordjs/brokers' + - '@discordjs/builders' + - '@discordjs/collection' + - '@discordjs/core' + - create-discord-bot + - '@discordjs/formatters' + - discord.js + - '@discordjs/next' + - '@discordjs/proxy' + - '@discordjs/rest' + - '@discordjs/util' + - '@discordjs/voice' + - '@discordjs/ws' + version: + description: Version(s) + required: true + type: string + message: + description: Deprecation message + required: false + type: string +jobs: + deprecate: + runs-on: ubuntu-latest + if: github.repository_owner == 'discordjs' + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Node.js v18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + uses: ./packages/actions/src/pnpmCache + + - name: Deprecate + run: pnpm exec npm-deprecate --name "${{inputs.version}}" --message "${{inputs.message || 'This version is deprecated. Please use a newer version.'}}" --package ${{inputs.package}} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/npm-auto-deprecate.yml b/.github/workflows/npm-auto-deprecate.yml deleted file mode 100644 index f88e17c327f7..000000000000 --- a/.github/workflows/npm-auto-deprecate.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: npm auto deprecate -on: - schedule: - - cron: '0 1 * * *' - workflow_dispatch: -jobs: - npm-auto-deprecate: - name: npm auto deprecate - runs-on: ubuntu-latest - if: github.repository_owner == 'discordjs' - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install node.js v18 - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - uses: ./packages/actions/src/pnpmCache - - - name: Deprecate versions - run: 'pnpm exec npm-deprecate --name "*dev*" --package @discordjs/brokers @discordjs/builders @discordjs/collection @discordjs/core @discordjs/formatters discord.js @discordjs/next @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice @discordjs/ws' - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 298146c0debf..1f2b8693bfe8 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -63,3 +63,8 @@ jobs: pnpm --filter=${{ matrix.package }} publish --no-git-checks --tag dev || true env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + + - name: Deprecate prior development releases + run: pnpm exec npm-deprecate --name "*dev*" --message "This version is deprecated. Please use a newer version." --package ${{ matrix.package }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} From ec3bcb93a537b1f0fe32ca646f8e20360e550a8d Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 19 Sep 2023 18:49:51 +0100 Subject: [PATCH 3/9] ci(publish-release): Use correct environment variable (#9838) ci(publish-release): use correct environment variable for pnpm Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .github/workflows/publish-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 88782cb29400..1bf4abe49b12 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -36,4 +36,4 @@ jobs: run: | pnpm --filter=${{ steps.extract-tag.outputs.subpackage == 'true' && '@discordjs/' || '' }}${{ steps.extract-tag.outputs.package }} publish env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} From 1e5c14b74110fc1cae5e0bc605d30531e7ee7c4b Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 19 Sep 2023 19:11:46 +0100 Subject: [PATCH 4/9] feat: Support `default_thread_rate_limit_per_user` in channel creation (#9273) feat: support `default_thread_rate_limit_per_user` in channel creation --- .../src/managers/CategoryChannelChildManager.js | 2 ++ .../discord.js/src/managers/GuildChannelManager.js | 2 ++ .../discord.js/src/structures/BaseGuildTextChannel.js | 10 ++++++++++ packages/discord.js/typings/index.d.ts | 2 ++ 4 files changed, 16 insertions(+) diff --git a/packages/discord.js/src/managers/CategoryChannelChildManager.js b/packages/discord.js/src/managers/CategoryChannelChildManager.js index 347526ab1766..dd0f67261512 100644 --- a/packages/discord.js/src/managers/CategoryChannelChildManager.js +++ b/packages/discord.js/src/managers/CategoryChannelChildManager.js @@ -50,6 +50,8 @@ class CategoryChannelChildManager extends DataManager { * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the new channel in seconds * @property {string} [rtcRegion] The specific region of the new channel. * @property {VideoQualityMode} [videoQualityMode] The camera video quality mode of the voice channel + * @property {number} [defaultThreadRateLimitPerUser] The initial rate limit per user (slowmode) + * to set on newly created threads in a channel. * @property {GuildForumTagData[]} [availableTags] The tags that can be used in this channel (forum only). * @property {DefaultReactionEmoji} [defaultReactionEmoji] * The emoji to show in the add reaction button on a thread in a guild forum channel. diff --git a/packages/discord.js/src/managers/GuildChannelManager.js b/packages/discord.js/src/managers/GuildChannelManager.js index 2c5d1466cbd7..376965c250d1 100644 --- a/packages/discord.js/src/managers/GuildChannelManager.js +++ b/packages/discord.js/src/managers/GuildChannelManager.js @@ -157,6 +157,7 @@ class GuildChannelManager extends CachedManager { rateLimitPerUser, rtcRegion, videoQualityMode, + defaultThreadRateLimitPerUser, availableTags, defaultReactionEmoji, defaultAutoArchiveDuration, @@ -181,6 +182,7 @@ class GuildChannelManager extends CachedManager { rate_limit_per_user: rateLimitPerUser, rtc_region: rtcRegion, video_quality_mode: videoQualityMode, + default_thread_rate_limit_per_user: defaultThreadRateLimitPerUser, available_tags: availableTags?.map(availableTag => transformGuildForumTag(availableTag)), default_reaction_emoji: defaultReactionEmoji && transformGuildDefaultReaction(defaultReactionEmoji), default_auto_archive_duration: defaultAutoArchiveDuration, diff --git a/packages/discord.js/src/structures/BaseGuildTextChannel.js b/packages/discord.js/src/structures/BaseGuildTextChannel.js index f7d9d69889a6..9b8490ecc995 100644 --- a/packages/discord.js/src/structures/BaseGuildTextChannel.js +++ b/packages/discord.js/src/structures/BaseGuildTextChannel.js @@ -74,6 +74,16 @@ class BaseGuildTextChannel extends GuildChannel { this.defaultAutoArchiveDuration = data.default_auto_archive_duration; } + if ('default_thread_rate_limit_per_user' in data) { + /** + * The initial rate limit per user (slowmode) to set on newly created threads in a channel. + * @type {?number} + */ + this.defaultThreadRateLimitPerUser = data.default_thread_rate_limit_per_user; + } else { + this.defaultThreadRateLimitPerUser ??= null; + } + if ('messages' in data) { for (const message of data.messages) this.messages._add(message); } diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index ff98527e221c..1a80284102b0 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -636,6 +636,7 @@ export class BaseGuildEmoji extends Emoji { export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, true) { protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean); public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; + public defaultThreadRateLimitPerUser: number | null; public rateLimitPerUser: number | null; public nsfw: boolean; public threads: GuildTextThreadManager; @@ -4823,6 +4824,7 @@ export interface CategoryCreateChannelOptions { position?: number; rtcRegion?: string; videoQualityMode?: VideoQualityMode; + defaultThreadRateLimitPerUser?: number; availableTags?: GuildForumTagData[]; defaultReactionEmoji?: DefaultReactionEmoji; defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; From 19ea0baa00e9b8671896ae857f4cdb2cdb6d69af Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Sun, 24 Sep 2023 00:40:45 +0200 Subject: [PATCH 5/9] refactor(GuildAuditLogsEntry): abstract reduce logic into a new function (#9845) --- .../src/structures/GuildAuditLogsEntry.js | 114 +++++------------- 1 file changed, 30 insertions(+), 84 deletions(-) diff --git a/packages/discord.js/src/structures/GuildAuditLogsEntry.js b/packages/discord.js/src/structures/GuildAuditLogsEntry.js index 4498c9384119..9ed2626555d7 100644 --- a/packages/discord.js/src/structures/GuildAuditLogsEntry.js +++ b/packages/discord.js/src/structures/GuildAuditLogsEntry.js @@ -83,6 +83,20 @@ const Targets = { * @typedef {string} AuditLogTargetType */ +/** + * Contructs an object of known properties for a structure from an array of changes. + * @param {AuditLogChange[]} changes The array of changes + * @param {Object} [initialData={}] The initial data passed to the function + * @returns {Object} + * @ignore + */ +function changesReduce(changes, initialData = {}) { + return changes.reduce((accumulator, change) => { + accumulator[change.key] = change.new ?? change.old; + return accumulator; + }, initialData); +} + /** * Audit logs entry. */ @@ -268,10 +282,7 @@ class GuildAuditLogsEntry { */ this.target = null; if (targetType === Targets.Unknown) { - this.target = this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, {}); + this.target = changesReduce(this.changes); this.target.id = data.target_id; // MemberDisconnect and similar types do not provide a target_id. } else if (targetType === Targets.User && data.target_id) { @@ -285,33 +296,16 @@ class GuildAuditLogsEntry { logs?.webhooks.get(data.target_id) ?? new Webhook( guild.client, - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { - id: data.target_id, - guild_id: guild.id, - }, - ), + changesReduce(this.changes, { + id: data.target_id, + guild_id: guild.id, + }), ); } else if (targetType === Targets.Invite) { let change = this.changes.find(c => c.key === 'code'); change = change.new ?? change.old; - this.target = - guild.invites.cache.get(change) ?? - new Invite( - guild.client, - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { guild }, - ), - ); + this.target = guild.invites.cache.get(change) ?? new Invite(guild.client, changesReduce(this.changes, { guild })); } else if (targetType === Targets.Message) { // Discord sends a channel id for the MessageBulkDelete action type. this.target = @@ -321,70 +315,28 @@ class GuildAuditLogsEntry { } else if (targetType === Targets.Integration) { this.target = logs?.integrations.get(data.target_id) ?? - new Integration( - guild.client, - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { id: data.target_id }, - ), - guild, - ); + new Integration(guild.client, changesReduce(this.changes, { id: data.target_id }), guild); } else if (targetType === Targets.Channel || targetType === Targets.Thread) { - this.target = - guild.channels.cache.get(data.target_id) ?? - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { id: data.target_id }, - ); + this.target = guild.channels.cache.get(data.target_id) ?? changesReduce(this.changes, { id: data.target_id }); } else if (targetType === Targets.StageInstance) { this.target = guild.stageInstances.cache.get(data.target_id) ?? new StageInstance( guild.client, - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { - id: data.target_id, - channel_id: data.options?.channel_id, - guild_id: guild.id, - }, - ), + changesReduce(this.changes, { + id: data.target_id, + channel_id: data.options?.channel_id, + guild_id: guild.id, + }), ); } else if (targetType === Targets.Sticker) { this.target = guild.stickers.cache.get(data.target_id) ?? - new Sticker( - guild.client, - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { id: data.target_id }, - ), - ); + new Sticker(guild.client, changesReduce(this.changes, { id: data.target_id })); } else if (targetType === Targets.GuildScheduledEvent) { this.target = guild.scheduledEvents.cache.get(data.target_id) ?? - new GuildScheduledEvent( - guild.client, - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { id: data.target_id, guild_id: guild.id }, - ), - ); + new GuildScheduledEvent(guild.client, changesReduce(this.changes, { id: data.target_id, guild_id: guild.id })); } else if (targetType === Targets.ApplicationCommand) { this.target = logs?.applicationCommands.get(data.target_id) ?? { id: data.target_id }; } else if (targetType === Targets.AutoModeration) { @@ -392,13 +344,7 @@ class GuildAuditLogsEntry { guild.autoModerationRules.cache.get(data.target_id) ?? new AutoModerationRule( guild.client, - this.changes.reduce( - (o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, - { id: data.target_id, guild_id: guild.id }, - ), + changesReduce(this.changes, { id: data.target_id, guild_id: guild.id }), guild, ); } else if (data.target_id) { From eaabcdfda651e7bad5b6e818b869e631a07e8a41 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 26 Sep 2023 21:44:09 +0200 Subject: [PATCH 6/9] docs: Remove `FileOptions` (#9855) docs: remove `FileOptions` --- .../src/structures/interfaces/TextBasedChannel.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js index cf455b9854b3..f3bfa8bfd567 100644 --- a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js +++ b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js @@ -106,13 +106,6 @@ class TextBasedChannel { * @typedef {string} MessageMentionTypes */ - /** - * @typedef {Object} FileOptions - * @property {BufferResolvable} attachment File to attach - * @property {string} [name='file.jpg'] Filename of the attachment - * @property {string} description The description of the file - */ - /** * Sends a message to this channel. * @param {string|MessagePayload|MessageCreateOptions} options The options to provide From 931c3ed593d842e21568e039ed21855a53de4f2c Mon Sep 17 00:00:00 2001 From: Almeida Date: Thu, 28 Sep 2023 19:27:15 +0100 Subject: [PATCH 7/9] feat(StageInstanceManager): add `guildScheduledEvent` to `create()` (#8885) * feat(StageInstanceManager): add `guildScheduledEvent` to `create()` * fix: requested changes --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> --- packages/discord.js/src/managers/StageInstanceManager.js | 7 ++++++- packages/discord.js/typings/index.d.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/discord.js/src/managers/StageInstanceManager.js b/packages/discord.js/src/managers/StageInstanceManager.js index ea037cfe5e99..2f78b12f0c17 100644 --- a/packages/discord.js/src/managers/StageInstanceManager.js +++ b/packages/discord.js/src/managers/StageInstanceManager.js @@ -32,6 +32,8 @@ class StageInstanceManager extends CachedManager { * @property {string} topic The topic 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 {GuildScheduledEventResolvable} [guildScheduledEvent] + * The guild scheduled event associated with the stage instance */ /** @@ -59,7 +61,9 @@ class StageInstanceManager extends CachedManager { const channelId = this.guild.channels.resolveId(channel); if (!channelId) throw new DiscordjsError(ErrorCodes.StageChannelResolve); if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true); - let { topic, privacyLevel, sendStartNotification } = options; + const { guildScheduledEvent, topic, privacyLevel, sendStartNotification } = options; + + const guildScheduledEventId = guildScheduledEvent && this.resolveId(guildScheduledEvent); const data = await this.client.rest.post(Routes.stageInstances(), { body: { @@ -67,6 +71,7 @@ class StageInstanceManager extends CachedManager { topic, privacy_level: privacyLevel, send_start_notification: sendStartNotification, + guild_scheduled_event_id: guildScheduledEventId, }, }); diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 1a80284102b0..3b72e64dd63b 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -5214,6 +5214,7 @@ export interface StageInstanceCreateOptions { topic: string; privacyLevel?: StageInstancePrivacyLevel; sendStartNotification?: boolean; + guildScheduledEvent?: GuildScheduledEventResolvable; } export interface CrosspostedChannel { From 3c043d83a93333d803f675cfe31feb62fe1999b1 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Fri, 29 Sep 2023 18:14:36 +0200 Subject: [PATCH 8/9] types(UserContextMenuCommandInteraction): Nullify `targetMember` (#9844) types(UserContextMenuCommandInteraction): nullify `targetMember` Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/discord.js/typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 3b72e64dd63b..08305031c2ed 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3171,7 +3171,7 @@ export class UserContextMenuCommandInteraction< > extends ContextMenuCommandInteraction { public commandType: ApplicationCommandType.User; public get targetUser(): User; - public get targetMember(): CacheTypeReducer; + public get targetMember(): CacheTypeReducer | null; public inGuild(): this is UserContextMenuCommandInteraction<'raw' | 'cached'>; public inCachedGuild(): this is UserContextMenuCommandInteraction<'cached'>; public inRawGuild(): this is UserContextMenuCommandInteraction<'raw'>; From 93e5bed87d6b782c3aa1b13f61c89ae15e0b152f Mon Sep 17 00:00:00 2001 From: DD Date: Sat, 30 Sep 2023 03:42:43 +0300 Subject: [PATCH 9/9] chore: update license files (#9862) --- packages/brokers/LICENSE | 2 +- packages/proxy-container/LICENSE | 2 +- packages/proxy/LICENSE | 2 +- packages/ws/LICENSE | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/brokers/LICENSE b/packages/brokers/LICENSE index f9786ff8f379..39794ad7ebf3 100644 --- a/packages/brokers/LICENSE +++ b/packages/brokers/LICENSE @@ -176,7 +176,7 @@ END OF TERMS AND CONDITIONS Copyright 2022 Noel Buechler - Copyright 2022 Charlotte Cristea + Copyright 2022 Denis Cristea Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/proxy-container/LICENSE b/packages/proxy-container/LICENSE index f9786ff8f379..39794ad7ebf3 100644 --- a/packages/proxy-container/LICENSE +++ b/packages/proxy-container/LICENSE @@ -176,7 +176,7 @@ END OF TERMS AND CONDITIONS Copyright 2022 Noel Buechler - Copyright 2022 Charlotte Cristea + Copyright 2022 Denis Cristea Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/proxy/LICENSE b/packages/proxy/LICENSE index f9786ff8f379..39794ad7ebf3 100644 --- a/packages/proxy/LICENSE +++ b/packages/proxy/LICENSE @@ -176,7 +176,7 @@ END OF TERMS AND CONDITIONS Copyright 2022 Noel Buechler - Copyright 2022 Charlotte Cristea + Copyright 2022 Denis Cristea Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/ws/LICENSE b/packages/ws/LICENSE index f9786ff8f379..39794ad7ebf3 100644 --- a/packages/ws/LICENSE +++ b/packages/ws/LICENSE @@ -176,7 +176,7 @@ END OF TERMS AND CONDITIONS Copyright 2022 Noel Buechler - Copyright 2022 Charlotte Cristea + Copyright 2022 Denis Cristea Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.