From c20b04275bf005a52ae1638a4945ff820a3d2fb7 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Tue, 6 Dec 2022 17:41:07 +0700 Subject: [PATCH] fix: RemoteAuth#generateQR --- src/util/RemoteAuth.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/util/RemoteAuth.js b/src/util/RemoteAuth.js index a60892d..ea33546 100644 --- a/src/util/RemoteAuth.js +++ b/src/util/RemoteAuth.js @@ -203,6 +203,7 @@ class DiscordAuthWebsocket extends EventEmitter { this.emit(Event.SUCCESS, this.user, message.ticket); this.token = message.ticket; this._findRealToken(); + this._logger('default', 'Get token success.'); break; } default: { @@ -371,11 +372,9 @@ class DiscordAuthWebsocket extends EventEmitter { */ generateQR() { if (!this.fingerprint) this._throwError(new Error('Fingerprint is not created.')); - if (this.options.generateQR) { - require('@aikochan2k6/qrcode-terminal').generate(`${baseURL}${this.fingerprint}`, { - small: true, - }); - } + require('@aikochan2k6/qrcode-terminal').generate(`${baseURL}${this.fingerprint}`, { + small: true, + }); this._logger('default', `Please scan the QR code to continue.\nQR Code will expire in ${this.exprireTime}`); }