From 8904be8bc129ce2af242b69e906dba7e76ff4074 Mon Sep 17 00:00:00 2001 From: Cleboost Date: Wed, 29 Jan 2025 19:39:24 +0100 Subject: [PATCH 1/3] =?UTF-8?q?fix=F0=9F=90=9B:=20update=20bot=20ready=20m?= =?UTF-8?q?essage=20to=20include=20username?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/class/BotClient.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/class/BotClient.ts b/src/class/BotClient.ts index 067e856..da0f974 100644 --- a/src/class/BotClient.ts +++ b/src/class/BotClient.ts @@ -163,7 +163,7 @@ export default class BotClient extends Client { console.log(subCommandList); process.exit(1); }); - this.logger.success("Bot is ready"); + this.logger.success("Bot is logged as " + this.user?.username); }); process.on("unhandledRejection", (reason: unknown) => { @@ -177,7 +177,6 @@ export default class BotClient extends Client { process.on("uncaughtException", (error: Error) => { this.logger.error(`Uncaught Exception: ${error.message}`); - // Vous pouvez également notifier un canal Discord ou un administrateur ici }); } } From acf3d770f27821c200902d42e73025f408e2b795 Mon Sep 17 00:00:00 2001 From: Cleboost Date: Wed, 29 Jan 2025 19:59:16 +0100 Subject: [PATCH 2/3] =?UTF-8?q?fix=F0=9F=90=9B:=20simplify=20error=20loggi?= =?UTF-8?q?ng=20for=20unhandled=20rejections=20and=20exceptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/class/BotClient.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/class/BotClient.ts b/src/class/BotClient.ts index da0f974..09bfaf6 100644 --- a/src/class/BotClient.ts +++ b/src/class/BotClient.ts @@ -167,16 +167,11 @@ export default class BotClient extends Client { }); process.on("unhandledRejection", (reason: unknown) => { - const errorRegex = - /DiscordAPIError\[\d+\]: Invalid Form Body\s+data\.components\[\d+\]\.components\[\d+\]\.style\[BASE_TYPE_REQUIRED\]: This field is required/; - if (errorRegex.test(reason as string)) { - return this.logger.error("A component is missing style"); - } - this.logger.error(`Unhandled Rejection: ${reason}`); + return this.logger.error(`Unhandled Rejection: ${reason}`); }); process.on("uncaughtException", (error: Error) => { - this.logger.error(`Uncaught Exception: ${error.message}`); + return this.logger.error(`Uncaught Exception: ${error.message}`); }); } } From 9dfa96e9733b5e344851b2756e9f8f284d4fc4ea Mon Sep 17 00:00:00 2001 From: Cleboost Date: Thu, 30 Jan 2025 16:20:07 +0100 Subject: [PATCH 3/3] =?UTF-8?q?fix=F0=9F=90=9B:=20update=20repository=20an?= =?UTF-8?q?d=20bugs=20URLs=20in=20package.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f5d3166..75a594e 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ "djs-core": "index.js" }, "repository": { - "url": "https://github.com/Cleboost/djs-core" + "url": "https://github.com/djs-core/djs-core" }, "bugs": { - "url": "https://github/com/Cleboost/djs-core/issues" + "url": "https://github.com/djs-core/djs-core/issues" }, "scripts": { "dev": "tsup --config tsup-dev.config.ts",