Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add message to send resume event to shard #9626

Merged
merged 7 commits into from
Jun 14, 2023

Conversation

GrapeColor
Copy link
Contributor

@GrapeColor GrapeColor commented Jun 6, 2023

Please describe the changes this PR makes and why it should be merged:
After a shard reconnects, the Shard#ready flag remains false because the ready event is not fired.
This PR solves this by firing Events#ShardReady when WebSocketShard#Ready fires.

Status and versioning classification:

  • I know how to update typings and have done so, or typings don't need updating

@GrapeColor GrapeColor requested a review from a team as a code owner June 6, 2023 15:55
@vercel
Copy link

vercel bot commented Jun 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ❌ Failed (Inspect) Jun 14, 2023 11:41am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
discord-js-guide ⬜️ Ignored (Inspect) Jun 14, 2023 11:41am

@Qjuh
Copy link
Contributor

Qjuh commented Jun 6, 2023

This would make the Client#shardReady event emit as soon as the Gateway READY payload is received. This is not what the prior implementation did, this event is meant to be emitted when all Guild payloads did arrive or the guildTimeout was reached.

So this is a breaking change that should not be merged.

But I would like to know what issue there actually was that needed this fix in your eyes. Can you please open a Issue here on GitHub with reproducible code that shows what needs fixing? Because in the current implementation the Client#shardReady should be emitted once all Guild payloads were received or the timeout to wait for unavailable Guilds ended. Because it’s the same code that does this successfully on first login call that also is responsible for this on reconnect.

@GrapeColor
Copy link
Contributor Author

GrapeColor commented Jun 6, 2023

I understood the problem and fixed the change.
However, it seems that the intention of the problem is not conveyed, so I will open an issue.

@Qjuh
Copy link
Contributor

Qjuh commented Jun 7, 2023

Okay, now I see what you‘re getting at. #9474 introduced this issue by listening to ShardReconnecting and ShardDisconnecting event and setting ready to false in those cases.

Solving this by emitting a ShardReady event in places it wasn’t emitted before is still a breaking change, because other code listening to that event will now also be called on resume while it wasn’t before.

I‘ll have a look at this issue later to see how this could be fixed in a non-breaking way.
Looks like the better approach here might be to listen to Client#shardResume in ShardClientUtils.js and send a _resumed message to the ShardingManager process. In Shard.js this message should then be handled in _handleMessage and set this.ready = true; without emitting the Shard#ready event.

@GrapeColor
Copy link
Contributor Author

Thank you for showing me your approach.
I'll try it that way.

@GrapeColor GrapeColor changed the title fix(WebSocketManager): Fix not ready after reconnect feat: Add message to send resume event to shard Jun 7, 2023
@GrapeColor
Copy link
Contributor Author

GrapeColor commented Jun 7, 2023

I have finished fixing the changes.
Request a review.

Copy link
Contributor

@Qjuh Qjuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does indeed look good now. Did you test that it actually solves your initial issue too?

@GrapeColor
Copy link
Contributor Author

GrapeColor commented Jun 7, 2023

Did you test that it actually solves your initial issue too?

I have confirmed that the ready flag becomes true after a shard resumes.
So the initial issue is solved.

@GrapeColor
Copy link
Contributor Author

GrapeColor commented Jun 8, 2023

I verified with the following code.

Code of the bot to be sharded:

import { Client, Events } from 'discord.js';

const client = new Client({ intents: ['Guilds'] });

client.on(Events.Debug, (message) => console.log(message));

client.login()
	.catch(console.error);

Code to shard the bot:

import { ShardEvents, ShardingManager } from 'discord.js';

const manager = new ShardingManager('./bot.js', {
	token: 'YOUR_TOKEN',
	totalShards: 10,
});

manager.on('shardCreate', (shard) => {
	shard
		.on(ShardEvents.Ready, () => console.log(`Shard #${shard.id} turns ready.`))
		.on(ShardEvents.Reconnecting, () => console.log(`Shard #${shard.id} is attempting to reconnect or re-identify.`))

	setInterval(() => console.log(`Shard #${shard.id} is ${shard.ready ? '' : 'not '}ready.`), 60_000);
});

manager.spawn({ timeout: -1 })
	.catch(console.error);

Below is an excerpt of the log before and after the change.

Before:

Shard #1 is ready
Shard #1 is ready
Shard #1 is ready
[WS => Shard 1] The gateway closed with an unexpected code 1006, attempting to resume.
Shard #1 is attempting to reconnect or re-identify.
[WS => Shard 1] Destroying shard
[WS => Shard 1] Connection status during destroy
[WS => Shard 1] Connecting to wss://gateway-us-east1-b.discord.gg?v=10&encoding=json
[WS => Shard 1] Waiting for event hello for 60000ms
[WS => Shard 1] Preparing first heartbeat of the connection with a jitter of 0.371327938827104; waiting 15317ms
[WS => Shard 1] Resuming session
[WS => Shard 1] Resumed and replayed 1 events
Shard #1 is not ready
[WS => Shard 1] First heartbeat sent, starting to beat every 41250ms
Shard #1 is not ready
Shard #1 is not ready
Shard #1 is not ready

After:

Shard #2 is ready.
Shard #2 is ready.
Shard #2 is ready.
[WS => Shard 2] Destroying shard
[WS => Shard 2] Connection status during destroy
Shard #2 is attempting to reconnect or re-identify.
[WS => Shard 2] Connecting to wss://gateway-us-east1-d.discord.gg?v=10&encoding=json
[WS => Shard 2] Waiting for event hello for 60000ms
[WS => Shard 2] Preparing first heartbeat of the connection with a jitter of 0.7769187774516333; waiting 32047ms
[WS => Shard 2] Resuming session
[WS => Shard 2] Resumed and replayed 1 events
Shard #2 is ready.
[WS => Shard 2] First heartbeat sent, starting to beat every 41250ms
Shard #2 is ready.
Shard #2 is ready.
Shard #2 is ready.

@kodiakhq kodiakhq bot merged commit a873ec1 into discordjs:main Jun 14, 2023
@GrapeColor GrapeColor deleted the fix-not-ready-after-reconnect branch June 14, 2023 12:10
Vylpes pushed a commit to Vylpes/vylbot-app that referenced this pull request Dec 11, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [discord.js](https://discord.js.org) ([source](https://github.com/discordjs/discord.js)) | dependencies | minor | [`14.11.0` -> `14.14.1`](https://renovatebot.com/diffs/npm/discord.js/14.11.0/14.14.1) |

---

### Release Notes

<details>
<summary>discordjs/discord.js (discord.js)</summary>

### [`v14.14.1`](https://github.com/discordjs/discord.js/blob/HEAD/packages/discord.js/CHANGELOG.md#14141---2023-11-12)

[Compare Source](discordjs/discord.js@14.14.0...14.14.1)

#### Bug Fixes

-   **Emoji:** `id` set as `undefined` edge case ([#&#8203;9953](discordjs/discord.js#9953)) ([cc07a28](discordjs/discord.js@cc07a28))
-   **BaseClient:** Default in objects properly ([#&#8203;9952](discordjs/discord.js#9952)) ([f93abf7](discordjs/discord.js@f93abf7))

#### Documentation

-   Use preferred nullable syntax (`?T` over `T | null`) ([#&#8203;9946](discordjs/discord.js#9946)) ([1e4ef35](discordjs/discord.js@1e4ef35))

#### Refactor

-   Use formatters ([#&#8203;9956](discordjs/discord.js#9956)) ([40726db](discordjs/discord.js@40726db))

#### Typings

-   Use wrapper utilities ([#&#8203;9945](discordjs/discord.js#9945)) ([4bc1dae](discordjs/discord.js@4bc1dae))

### [`v14.14.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/discord.js/CHANGELOG.md#14140---2023-11-12)

[Compare Source](discordjs/discord.js@14.13.0...14.14.0)

#### Bug Fixes

-   **Client:** Ensure destroyed connections are not ready ([#&#8203;9942](discordjs/discord.js#9942)) ([b5e23ec](discordjs/discord.js@b5e23ec))
-   **Webhook:** Do not call `client.deleteWebhook` in `delete` ([#&#8203;9786](discordjs/discord.js#9786)) ([31d914e](discordjs/discord.js@31d914e))
-   **GuildManager#fetch:** Inject shard id ([#&#8203;9921](discordjs/discord.js#9921)) ([85753a9](discordjs/discord.js@85753a9))
-   Prevent 'undefined' debug message on intentional shard closure ([#&#8203;9846](discordjs/discord.js#9846)) ([0e0b85b](discordjs/discord.js@0e0b85b))
-   **Role:** Calculate position correctly when rawPositions are equal ([#&#8203;9871](discordjs/discord.js#9871)) ([0529b2a](discordjs/discord.js@0529b2a))
-   **GuildScheduledEvent:** Use `if...else` pattern and handle partials ([#&#8203;9802](discordjs/discord.js#9802)) ([32d614c](discordjs/discord.js@32d614c))

#### Documentation

-   **Message:** Remove duplicated word 'of' in description ([#&#8203;9923](discordjs/discord.js#9923)) ([85a78f9](discordjs/discord.js@85a78f9))
-   **GuildMember:** Clarify display color ([#&#8203;9891](discordjs/discord.js#9891)) ([e38d03f](discordjs/discord.js@e38d03f))
-   Remove duplicate `APIEmoji` ([#&#8203;9880](discordjs/discord.js#9880)) ([8cfadb6](discordjs/discord.js@8cfadb6))
-   Consolidate API types ([#&#8203;9881](discordjs/discord.js#9881)) ([44a3cbf](discordjs/discord.js@44a3cbf))
-   Remove `FileOptions` ([#&#8203;9855](discordjs/discord.js#9855)) ([eaabcdf](discordjs/discord.js@eaabcdf))
-   **DiscordjsErrorCodes:** Deprecate unused properties ([#&#8203;9790](discordjs/discord.js#9790)) ([4588e07](discordjs/discord.js@4588e07))
-   **ApplicationCommandManager:** Id parameter can take options ([#&#8203;9664](discordjs/discord.js#9664)) ([ed14135](discordjs/discord.js@ed14135))
-   **Attachment:** Add MIME types link to `contentType` ([#&#8203;9824](discordjs/discord.js#9824)) ([85b2498](discordjs/discord.js@85b2498))
-   Fix "its" typo ([#&#8203;9825](discordjs/discord.js#9825)) ([c50809e](discordjs/discord.js@c50809e))
-   **GuildMember:** Clarify timeout parameter wording ([#&#8203;9800](discordjs/discord.js#9800)) ([8d97e2d](discordjs/discord.js@8d97e2d))
-   **create-discord-bot:** Support bun in create-discord-bot ([#&#8203;9798](discordjs/discord.js#9798)) ([7157748](discordjs/discord.js@7157748))

#### Features

-   Default select menu values ([#&#8203;9867](discordjs/discord.js#9867)) ([4ff3ea4](discordjs/discord.js@4ff3ea4))
-   Mainlib docs on new website ([#&#8203;9930](discordjs/discord.js#9930)) ([da455bc](discordjs/discord.js@da455bc))
-   **cleanContent:** Add slash commands and emojis ([#&#8203;9809](discordjs/discord.js#9809)) ([c2349d4](discordjs/discord.js@c2349d4))
-   **Emoji:** Add `imageURL()` ([#&#8203;9788](discordjs/discord.js#9788)) ([b6c762c](discordjs/discord.js@b6c762c))
-   Onboarding mode and edit method ([#&#8203;9647](discordjs/discord.js#9647)) ([7671a83](discordjs/discord.js@7671a83))
-   Support new application properties and patch endpoint ([#&#8203;9709](discordjs/discord.js#9709)) ([1fe7247](discordjs/discord.js@1fe7247))
-   **BaseChannel:** Add `isThreadOnly()` ([#&#8203;9847](discordjs/discord.js#9847)) ([699b232](discordjs/discord.js@699b232))
-   **StageInstanceManager:** Add `guildScheduledEvent` to `create()` ([#&#8203;8885](discordjs/discord.js#8885)) ([931c3ed](discordjs/discord.js@931c3ed))
-   Support `default_thread_rate_limit_per_user` in channel creation ([#&#8203;9273](discordjs/discord.js#9273)) ([1e5c14b](discordjs/discord.js@1e5c14b))
-   Add media channels ([#&#8203;9662](discordjs/discord.js#9662)) ([571aedd](discordjs/discord.js@571aedd))
-   Support widget image URL ([#&#8203;9782](discordjs/discord.js#9782)) ([b6a2441](discordjs/discord.js@b6a2441))
-   **GuildAuditLogsEntry:** Expose extra integrationType in relevant log types ([#&#8203;9796](discordjs/discord.js#9796)) ([3109798](discordjs/discord.js@3109798))
-   Add support for teams update ([#&#8203;9805](discordjs/discord.js#9805)) ([c66636d](discordjs/discord.js@c66636d))
-   **Presence:** Expose sync_id in Activity ([#&#8203;9766](discordjs/discord.js#9766)) ([485dd71](discordjs/discord.js@485dd71))

#### Refactor

-   **utils:** Remove `mergeDefault` ([#&#8203;9938](discordjs/discord.js#9938)) ([5b0aa92](discordjs/discord.js@5b0aa92))
-   Use proper variable names in callbacks ([#&#8203;9840](discordjs/discord.js#9840)) ([11f6955](discordjs/discord.js@11f6955))
-   **GuildAuditLogsEntry:** Abstract reduce logic into a new function ([#&#8203;9845](discordjs/discord.js#9845)) ([19ea0ba](discordjs/discord.js@19ea0ba))
-   Stickers are free (no more "premium" packs) ([#&#8203;9791](discordjs/discord.js#9791)) ([e02a59b](discordjs/discord.js@e02a59b))

#### Typings

-   **Partials:** Add toString() method to supported Partials ([#&#8203;9835](discordjs/discord.js#9835)) ([7422d9f](discordjs/discord.js@7422d9f))
-   **MessageEditOptions:** Correct `attachments` type ([#&#8203;9874](discordjs/discord.js#9874)) ([2aa3250](discordjs/discord.js@2aa3250))
-   **UserContextMenuCommandInteraction:** Nullify `targetMember` ([#&#8203;9844](discordjs/discord.js#9844)) ([3c043d8](discordjs/discord.js@3c043d8))
-   Don't include dom types ([#&#8203;9831](discordjs/discord.js#9831)) ([9dbc954](discordjs/discord.js@9dbc954))
-   **Client:** Fix isReady narrowing ([#&#8203;9828](discordjs/discord.js#9828)) ([6404c01](discordjs/discord.js@6404c01))

### [`v14.13.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/discord.js/CHANGELOG.md#14130---2023-08-17)

[Compare Source](discordjs/discord.js@14.12.1...14.13.0)

#### Bug Fixes

-   **Action:** Do not add the client user as a recipient ([#&#8203;9774](discordjs/discord.js#9774)) ([24fbb11](discordjs/discord.js@24fbb11))
-   **DMChannel:** Correct partial typo ([#&#8203;9773](discordjs/discord.js#9773)) ([c1ff545](discordjs/discord.js@c1ff545))
-   **CachedManager:** Allow overriding constructor for makeCache ([#&#8203;9763](discordjs/discord.js#9763)) ([346fa57](discordjs/discord.js@346fa57))
-   **types:** Fixed CachedManager constructor arguments in type ([#&#8203;9761](discordjs/discord.js#9761)) ([b3c85d3](discordjs/discord.js@b3c85d3))
-   **Action:** Do not set `undefined` values ([#&#8203;9755](discordjs/discord.js#9755)) ([d8e3755](discordjs/discord.js@d8e3755))

#### Documentation

-   **EmbedBuilder:** `@readonly` length ([#&#8203;9778](discordjs/discord.js#9778)) ([8f572a6](discordjs/discord.js@8f572a6))
-   **WebhookEditOptions:** Add all of the types ([#&#8203;9776](discordjs/discord.js#9776)) ([d5be424](discordjs/discord.js@d5be424))
-   Update Node.js requirement to 16.11.0 ([#&#8203;9764](discordjs/discord.js#9764)) ([188877c](discordjs/discord.js@188877c))

#### Features

-   **Client:** Add deleteWebhook method ([#&#8203;9777](discordjs/discord.js#9777)) ([d90ba8d](discordjs/discord.js@d90ba8d))
-   **ClientPresence:** Allow setting activity state ([#&#8203;9743](discordjs/discord.js#9743)) ([9ed1b59](discordjs/discord.js@9ed1b59))
-   **ClientApplication:** Approximate guild count and new `GET` route ([#&#8203;9713](discordjs/discord.js#9713)) ([632a9b4](discordjs/discord.js@632a9b4))
-   **Role:** Add `flags` ([#&#8203;9694](discordjs/discord.js#9694)) ([3b18e5b](discordjs/discord.js@3b18e5b))
-   **Attachment:** Add `flags` ([#&#8203;9686](discordjs/discord.js#9686)) ([692f0fc](discordjs/discord.js@692f0fc))
-   Add `Client#webhooksUpdate` ([#&#8203;9732](discordjs/discord.js#9732)) ([0de071d](discordjs/discord.js@0de071d))

#### Typings

-   **GuildInvitableChannelResolvable:** Allow forum channels ([#&#8203;9775](discordjs/discord.js#9775)) ([727dc09](discordjs/discord.js@727dc09))
-   Make activity name required ([#&#8203;9765](discordjs/discord.js#9765)) ([0a9a3ed](discordjs/discord.js@0a9a3ed))
-   **BaseButtonComponentData:** Narrow component type ([#&#8203;9735](discordjs/discord.js#9735)) ([a30d46c](discordjs/discord.js@a30d46c))

### [`v14.12.1`](https://github.com/discordjs/discord.js/blob/HEAD/packages/discord.js/CHANGELOG.md#14121---2023-08-01)

[Compare Source](discordjs/discord.js@14.12.0...14.12.1)

#### Bug Fixes

-   **BaseClient:** Fix destroy method ([#&#8203;9742](discordjs/discord.js#9742)) ([1af7e5a](discordjs/discord.js@1af7e5a))

### [`v14.12.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/discord.js/CHANGELOG.md#14120---2023-07-31)

[Compare Source](discordjs/discord.js@14.11.0...14.12.0)

#### Bug Fixes

-   **ChannelUpdate:** Check against unknown channels ([#&#8203;9697](discordjs/discord.js#9697)) ([7fb91c5](discordjs/discord.js@7fb91c5))
-   **Action:** Use existing recipients if available ([#&#8203;9653](discordjs/discord.js#9653)) ([719e54a](discordjs/discord.js@719e54a))
-   Everyone role members ([#&#8203;9685](discordjs/discord.js#9685)) ([0803eb5](discordjs/discord.js@0803eb5))
-   `awaitMessageComponent` with `MessageComponentInteraction`s ([#&#8203;8598](discordjs/discord.js#8598)) ([b61e4fb](discordjs/discord.js@b61e4fb))
-   **ThreadManager:** Fix internal crash upon conditionally resolving thread members ([#&#8203;9648](discordjs/discord.js#9648)) ([a6dbe16](discordjs/discord.js@a6dbe16))
-   **User:** Check global name in equals ([#&#8203;9631](discordjs/discord.js#9631)) ([8f3bd38](discordjs/discord.js@8f3bd38))
-   **WebSocketManager:** Await WebSocket destroy ([#&#8203;9519](discordjs/discord.js#9519)) ([75308f2](discordjs/discord.js@75308f2))
-   **Client:** Safe call for possibly null WebSocket ([#&#8203;9600](discordjs/discord.js#9600)) ([24a6149](discordjs/discord.js@24a6149))
-   **ThreadManager:** Ensure `fetchActive()` only returns active threads in a channel ([#&#8203;9568](discordjs/discord.js#9568)) ([53aa24d](discordjs/discord.js@53aa24d))
-   **LimitedCollection:** Allow items to be stored if keepOverLimit is true when maxSize is 0 ([#&#8203;9534](discordjs/discord.js#9534)) ([9345d1b](discordjs/discord.js@9345d1b))
-   **AutocompleteInteraction:** Prevent snake casing of locales ([#&#8203;9565](discordjs/discord.js#9565)) ([7196fe3](discordjs/discord.js@7196fe3))

#### Documentation

-   Change `Channel` to `BaseChannel` ([#&#8203;9718](discordjs/discord.js#9718)) ([e5effb6](discordjs/discord.js@e5effb6))
-   **BaseChannel:** Remove `APIChannel` ([#&#8203;9717](discordjs/discord.js#9717)) ([125405f](discordjs/discord.js@125405f))
-   **BuildersSelectMenuOption:** Update link ([#&#8203;9690](discordjs/discord.js#9690)) ([ede9f4e](discordjs/discord.js@ede9f4e))
-   **ClientOptions:** Change default value of sweepers in docs ([#&#8203;9591](discordjs/discord.js#9591)) ([911e6ef](discordjs/discord.js@911e6ef))
-   **Client:** Correct invite gateway permission checks ([#&#8203;9597](discordjs/discord.js#9597)) ([e1b6eee](discordjs/discord.js@e1b6eee))
-   Fix broken links to new documentation ([#&#8203;9563](discordjs/discord.js#9563)) ([d01e8aa](discordjs/discord.js@d01e8aa))

#### Features

-   Add ws option support for "buildIdentifyThrottler" ([#&#8203;9728](discordjs/discord.js#9728)) ([6307f81](discordjs/discord.js@6307f81))
-   **Client:** Add `guildAvailable` event ([#&#8203;9692](discordjs/discord.js#9692)) ([3c85fb2](discordjs/discord.js@3c85fb2))
-   User avatar decorations ([#&#8203;8914](discordjs/discord.js#8914)) ([8d97017](discordjs/discord.js@8d97017))
-   Add silent option to ShardingManager ([#&#8203;9506](discordjs/discord.js#9506)) ([df40dcd](discordjs/discord.js@df40dcd))
-   **EmbedBuilder:** Add `.length` ([#&#8203;8682](discordjs/discord.js#8682)) ([53c17e0](discordjs/discord.js@53c17e0))
-   Guild onboarding ([#&#8203;9120](discordjs/discord.js#9120)) ([dc73c93](discordjs/discord.js@dc73c93))
-   Add resume event in shard ([#&#8203;9650](discordjs/discord.js#9650)) ([a73d54e](discordjs/discord.js@a73d54e))
-   **presence:** Re-introduce image resolving for other platforms ([#&#8203;9637](discordjs/discord.js#9637)) ([73c2f8a](discordjs/discord.js@73c2f8a))
-   Add message to send resume event to shard ([#&#8203;9626](discordjs/discord.js#9626)) ([a873ec1](discordjs/discord.js@a873ec1))
-   Support new username system ([#&#8203;9512](discordjs/discord.js#9512)) ([1ab60f9](discordjs/discord.js@1ab60f9))
-   **GuildAuditLogsEntry#extra:** Add missing `channel` property ([#&#8203;9518](discordjs/discord.js#9518)) ([2272321](discordjs/discord.js@2272321))

#### Performance

-   **Channel:** Linear speed position getter ([#&#8203;9497](discordjs/discord.js#9497)) ([09b0382](discordjs/discord.js@09b0382))
-   **Role:** Improve `members` getter ([#&#8203;9529](discordjs/discord.js#9529)) ([37181ab](discordjs/discord.js@37181ab))

#### Refactor

-   **User:** Remove deprecation warning from tag ([#&#8203;9660](discordjs/discord.js#9660)) ([cf8012c](discordjs/discord.js@cf8012c))
-   **GuildMember:** Make `_roles` property non-enumerable ([#&#8203;9387](discordjs/discord.js#9387)) ([46167a7](discordjs/discord.js@46167a7))
-   **rest:** Switch api to fetch-like and provide strategies ([#&#8203;9416](discordjs/discord.js#9416)) ([cdaa0a3](discordjs/discord.js@cdaa0a3))
    -   **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch`
    -   **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object.
    -   **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
    -   **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported.
    -   **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.

#### Typings

-   **MessageManager:** Allow comparison of messages again ([#&#8203;9612](discordjs/discord.js#9612)) ([a48d0ef](discordjs/discord.js@a48d0ef))
-   **AutoModerationActionExecution:** Add forum channels as a possible type in `channel()` ([#&#8203;9623](discordjs/discord.js#9623)) ([d64330a](discordjs/discord.js@d64330a))
-   **ModalSubmitFields:** Components is an array ([#&#8203;9406](discordjs/discord.js#9406)) ([1cab79f](discordjs/discord.js@1cab79f))
-   Use `readonly` arrays and `const` type parameters in places ([#&#8203;9641](discordjs/discord.js#9641)) ([cd69868](discordjs/discord.js@cd69868))
-   **BaseInteraction:** `appPermissions` not `null` in guilds ([#&#8203;9601](discordjs/discord.js#9601)) ([6c2242f](discordjs/discord.js@6c2242f))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/351
Reviewed-by: Vylpes <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants