Skip to content

SB-0MNV1PCOQ000KUY0: Replace deprecated 'ready' event with 'clientReady' for discord.js v15#21

Merged
SorraTheOrc merged 2 commits intomainfrom
feature/SB-0MNV1PCOQ000KUY0-discord-ready
Apr 12, 2026
Merged

SB-0MNV1PCOQ000KUY0: Replace deprecated 'ready' event with 'clientReady' for discord.js v15#21
SorraTheOrc merged 2 commits intomainfrom
feature/SB-0MNV1PCOQ000KUY0-discord-ready

Conversation

@SorraTheOrc
Copy link
Copy Markdown
Member

Summary

Replace the deprecated Discord.js "ready" event with "clientReady" for discord.js v15 compatibility.

  • Changed this.client.once("ready", ...) to this.client.once("clientReady", ...)
  • Added idempotency guard (startupDone flag) to ensure the startup handler runs only once per process

Work Item

  • SB-0MNV1PCOQ000KUY0 Replace Discord ready event with clientReady for discord.js v15 compatibility

Changes

  • src/discord/client.ts: Replaced "ready" event with "clientReady" and added idempotency check

Testing

  • All 177 tests pass across 33 test files
  • No changes to test files required since mocks completely replace the DiscordBot class

Review Focus

  • The startup handler idempotency implementation
  • Ensure the change meets v15 compatibility requirements

Sorra added 2 commits April 12, 2026 16:07
…dy' for discord.js v15

- Replaced this.client.once('ready', ...) with this.client.once('clientReady', ...)
- Added startupDone flag to ensure idempotent startup (handler runs only once)
- Updated handleReady() method to contain startup logic
- Tests pass (177 tests across 33 test files)
@SorraTheOrc SorraTheOrc merged commit 03e2c9e into main Apr 12, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant