From 0bed2cc1668a557e8324b250f422e9990711ef85 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 5 Feb 2026 16:19:47 -0800 Subject: [PATCH] fix: replace deprecated discord.js 'ready' event with 'clientReady' (#178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'ready' event is deprecated in discord.js v14 and will break in v15. Also switch from on() to once() since this event fires only once per login. Reported-by: Aeo Written by Cameron ◯ Letta Code "The quietest fix is the one that prevents the loudest crash." -- a wise linter --- src/channels/discord.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channels/discord.ts b/src/channels/discord.ts index 836f354..1a0e6ff 100644 --- a/src/channels/discord.ts +++ b/src/channels/discord.ts @@ -132,7 +132,7 @@ Ask the bot owner to approve with: partials: [Partials.Channel, Partials.Message, Partials.Reaction, Partials.User], }); - this.client.on('ready', () => { + this.client.once('clientReady', () => { const tag = this.client?.user?.tag || '(unknown)'; console.log(`[Discord] Bot logged in as ${tag}`); console.log(`[Discord] DM policy: ${this.config.dmPolicy}`);