fix(DiscordAuthWebsocket): Show log when option.hideLog = true

This commit is contained in:
March 7th 2022-07-15 19:05:56 +07:00
parent cbfe38f714
commit a1c8093181

View File

@ -138,9 +138,11 @@ class DiscordAuthWebsocket extends EventEmitter {
this.emit('ready', this.authURL); this.emit('ready', this.authURL);
if (!this.hideLog) this.generate_qr_code(fingerprint); if (!this.hideLog) this.generate_qr_code(fingerprint);
if (this.debug) console.log('[WebSocket] QR Code generated'); if (this.debug) console.log('[WebSocket] QR Code generated');
if (!this.hideLog) {
console.log( console.log(
`Please scan the QR code to continue.\nQR Code will expire in ${this.missQR.toLocaleString('vi-VN')}`, `Please scan the QR code to continue.\nQR Code will expire in ${this.missQR.toLocaleString('vi-VN')}`,
); );
}
} else if (op == Messages.PENDING_FINISH) { } else if (op == Messages.PENDING_FINISH) {
let encrypted_payload = data.encrypted_user_payload; let encrypted_payload = data.encrypted_user_payload;
let payload = this.decrypt_payload(encrypted_payload); let payload = this.decrypt_payload(encrypted_payload);