From 3c530990f4988e333f134f842d626a7ab5ffdf12 Mon Sep 17 00:00:00 2001 From: Bradyn Date: Tue, 4 Feb 2025 12:54:01 +1100 Subject: [PATCH] Update Client Events Changed client event "ready" and "error" to use the Events import as the "ready" will be replaced by "clientReady" in v15 of discord.js. https://v15.discordjs.guide/additional-info/updating-from-v14.html#client --- backend/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index e74f7629..d578ddbb 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -274,7 +274,7 @@ connect().then(async () => { } }); - client.on("error", (err) => { + client.on(Events.Error, (err) => { errorHandler(new DiscordJSError(err.message, (err as any).code, 0)); }); @@ -371,7 +371,7 @@ connect().then(async () => { }, }); - client.once("ready", () => { + client.once(Events.ClientReady, () => { startUptimeCounter(); });