From becfa586ab1e40d93655ace1a15ccfd4f4168061 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 11 May 2022 20:24:18 +0300 Subject: [PATCH] hopefully fixes some error --- src/structure/client/EventHooker.js | 2 +- src/utilities/Logger.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structure/client/EventHooker.js b/src/structure/client/EventHooker.js index c50f620..5c709de 100644 --- a/src/structure/client/EventHooker.js +++ b/src/structure/client/EventHooker.js @@ -11,7 +11,7 @@ class EventHooker { this.events = new Map(); this.logger = new Logger(this); - this.safeEvents = ['componentUpdate', 'ready', 'shardReady']; + this.safeEvents = ['componentUpdate', 'ready', 'shardReady', 'rateLimit', 'guildCreate']; } diff --git a/src/utilities/Logger.js b/src/utilities/Logger.js index f2b2db8..ceed8de 100644 --- a/src/utilities/Logger.js +++ b/src/utilities/Logger.js @@ -17,7 +17,7 @@ class Logger { // eslint-disable-next-line no-console - if (!process.send) console.log(message); + if (!process.send || !process.connected) console.log(message); else process.send({ _logger: true, message, ...opts }); //return this.client.intercom.send('logger', { message, ...opts }); }