From a1c8093181564d298b4d9b2293b7cbfeacad9977 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 15 Jul 2022 19:05:56 +0700 Subject: [PATCH] fix(DiscordAuthWebsocket): Show log when option.hideLog = true --- src/util/RemoteAuth.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/util/RemoteAuth.js b/src/util/RemoteAuth.js index c92cc15..36d6bdb 100644 --- a/src/util/RemoteAuth.js +++ b/src/util/RemoteAuth.js @@ -138,9 +138,11 @@ class DiscordAuthWebsocket extends EventEmitter { this.emit('ready', this.authURL); if (!this.hideLog) this.generate_qr_code(fingerprint); if (this.debug) console.log('[WebSocket] QR Code generated'); - console.log( - `Please scan the QR code to continue.\nQR Code will expire in ${this.missQR.toLocaleString('vi-VN')}`, - ); + if (!this.hideLog) { + console.log( + `Please scan the QR code to continue.\nQR Code will expire in ${this.missQR.toLocaleString('vi-VN')}`, + ); + } } else if (op == Messages.PENDING_FINISH) { let encrypted_payload = data.encrypted_user_payload; let payload = this.decrypt_payload(encrypted_payload);