Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from FERDIZ-afk/main
Browse files Browse the repository at this point in the history
Update logs
  • Loading branch information
JastinXyz committed Jun 2, 2022
2 parents 2ef0e47 + 770364b commit b41c654
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -33,6 +33,7 @@
"@adiwajshing/baileys": "^4.1.0",
"@hapi/boom": "^10.0.0",
"axios": "^0.27.2",
"lolcatjs": "^2.4.1",
"pino": "^7.11.0",
"qrcode-terminal": "^0.12.0",
"quick.db": "^7.1.3"
Expand Down
17 changes: 10 additions & 7 deletions src/client.js
Expand Up @@ -7,6 +7,7 @@ const {
} = require("@adiwajshing/baileys");
const { Boom } = require("@hapi/boom");
const db = require("quick.db");
const lolcatjs = require('lolcatjs')

const { getWaWebVer, checkConnect } = require("./models/functions");

Expand Down Expand Up @@ -113,13 +114,15 @@ module.exports = class Client {
console.log(`Unknown DisconnectReason: ${reason}|${connection}`);
}
}
console.log("[conn logs]", update);
if (update.receivedPendingNotifications) {
this.connect = true;
console.log(
"\x1b[32mWhatscodeSuccess 📗: \x1b[0mYour bot is ready now!\n\x1b[32mWhatscodeSuccess 📗: \x1b[0mJoin our Discord at: https://discord.gg/CzqHbx7rdU"
);
}
if (update.connection == "connecting" || update.receivedPendingNotifications == "false") {
lolcatjs.fromString("[wait to connection whatscode]")
}
if (update.connection == "open" || update.receivedPendingNotifications == "true") {
this.connect = true;
lolcatjs.fromString("[Connecting to] WhatsApp web")
lolcatjs.fromString(`[Connected to USER ] ` + JSON.stringify(this.whats.user, null, 2))
lolcatjs.fromString(`[Whatscode.js] Join our Discord at: https://discord.gg/CzqHbx7rdU`)
}
});
}

Expand Down

0 comments on commit b41c654

Please sign in to comment.