Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(Client): Move client initialization code#11184

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
vakiliner wants to merge8 commits intodiscordjs:main
base:main
Choose a base branch
Loading
fromvakiliner:patch-1

Conversation

@vakiliner
Copy link
Contributor

@vakilinervakiliner commentedOct 16, 2025
edited
Loading

Please describe the changes this PR makes and why it should be merged:

Closes#11180

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercelbot commentedOct 16, 2025
edited
Loading

The latest updates on your projects. Learn more aboutVercel for GitHub.

2 Skipped Deployments
ProjectDeploymentPreviewCommentsUpdated (UTC)
discord-jsIgnoredIgnoredPreviewOct 30, 2025 3:16pm
discord-js-guideIgnoredIgnoredPreviewOct 30, 2025 3:16pm

@vakilinervakiliner changed the titlefix: ClientReady is called without user and applicationfix(Client): Move client initialization codeOct 16, 2025
@vakilinervakiliner marked this pull request as ready for reviewOctober 16, 2025 15:22
@vakilinervakiliner requested a review froma team as acode ownerOctober 16, 2025 15:22
@Qjuh
Copy link
Member

Qjuh commentedOct 19, 2025
edited
Loading

I'd say the better fix would be to move all the READY event handling into READY.js, not the other way around. Or at least the checkReady() call

@vakiliner
Copy link
ContributorAuthor

I'd say the better fix would be to move all the READY event handling into READY.js, not the other way around. Or at least the checkReady() call

I just noticed that the Ready event is async
None of the packet handlers are async, so calling this function won't be awaitable
While this can easily be fixed by adding "await" before "PacketHandlers[packet.t](this, packet, shardId);", but is it necessary?

@vakiliner
Copy link
ContributorAuthor

I'd say the better fix would be to move all the READY event handling into READY.js, not the other way around. Or at least the checkReady() call

I believe this was not added to READY.js on purpose because the handler is async

@Qjuh
Copy link
Member

Qjuh commentedOct 19, 2025
edited
Loading

I'd say the better fix would be to move all the READY event handling into READY.js, not the other way around. Or at least the checkReady() call

I believe this was not added to READY.js on purpose because the handler is async

Since I was the one who wrote that I can assure you that's not the reason. In v14 the checkReady check is in READY.js; this was simply an oversight when adapting to the direct use of /ws and should be reverted to check in READY.js

adding await would be a good idea however, and then the checkReady check for READY event could be added to handlePacket instead. Similar to how it checks for GUILD_CREATE and _DELETE.

@vakiliner
Copy link
ContributorAuthor

In v14 the checkReady check is in READY.js

Then checkReady() was not async

@vakilinervakiliner requested a review fromQjuhOctober 21, 2025 17:27
Copy link
Member

@didineledidinele left a comment

Choose a reason for hiding this comment

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

before merging, we should give this a little test.

@Jiralite would you mind? otherwise, I can get to it tonight
discord.js@15.0.0-move-client-init.1761650119-a4c0a246f

@didinele
Copy link
Member

was a little later than "tonight", but I got to it. we should be good :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@didineledidineledidinele approved these changes

@JiraliteJiraliteJiralite approved these changes

@QjuhQjuhQjuh approved these changes

@vladfranguvladfranguAwaiting requested review from vladfranguvladfrangu is a code owner automatically assigned from discordjs/core

@iCrawliCrawlAwaiting requested review from iCrawliCrawl is a code owner automatically assigned from discordjs/core

@kyranetkyranetAwaiting requested review from kyranetkyranet is a code owner automatically assigned from discordjs/core

@SpaceEECSpaceEECAwaiting requested review from SpaceEECSpaceEEC is a code owner automatically assigned from discordjs/core

At least 3 approving reviews are required to merge this pull request.

Assignees

No one assigned

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

ClientReady is called without user and application

4 participants

@vakiliner@Qjuh@didinele@Jiralite

[8]ページ先頭

©2009-2025 Movatter.jp