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

refactor!: use AsyncEventEmitter instead of EventEmitter #10710

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

almeidx
Copy link
Member

@almeidx almeidx commented Jan 18, 2025

BREAKING CHANGE: The BaseClient, Shard, ShardingManager, and Collector classes now extend AsyncEventEmitter instead of EventEmitter.

Besides the obvious change, I also renamed ClientEvents to ClientEventTypes for consistency with the rest of the emitters.

Fixes #10577
Supersedes #10581, and #10584 partially

BREAKING CHANGE: The `BaseClient`, `Shard`, `ShardingManager`, and `Collector` classes now extend `AsyncEventEmitter` instead of `EventEmitter`.
@almeidx almeidx added this to the discord.js 15.0.0 milestone Jan 18, 2025
@almeidx almeidx requested review from ckohen and vladfrangu January 18, 2025 19:03
@almeidx almeidx requested review from a team and iCrawl as code owners January 18, 2025 19:03
@almeidx almeidx requested review from kyranet and SpaceEEC January 18, 2025 19:03
Copy link

vercel bot commented Jan 18, 2025

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

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 2:29pm
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 2:29pm

Copy link
Member

@kyranet kyranet left a comment

Choose a reason for hiding this comment

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

🎉

Qjuh
Qjuh previously requested changes Jan 19, 2025
packages/discord.js/typings/index.d.ts Show resolved Hide resolved
packages/discord.js/typings/index.d.ts Show resolved Hide resolved
packages/discord.js/typings/index.d.ts Show resolved Hide resolved
@almeidx almeidx requested a review from Qjuh January 19, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review in Progress
5 participants