Skip to content

Commit

Permalink
Merge pull request #1 from Teamolduser/main
Browse files Browse the repository at this point in the history
Update index.js
  • Loading branch information
rizzlogy authored Sep 25, 2023
2 parents 2843f34 + 003c1eb commit 5cb6a60
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,13 @@ async function ZyyPairing() {
"connection.update",
async ({ connection, lastDisconnect }) => {
if (connection === "open") {

let file = await socket.sendMessage(socket.user.id, { document: fs.readFileSync('./' + sessionName + '/creds.json'), mimetype:'json', fileName: 'creds.json' } )

await socket.sendMessage(socket.user.id, {text: "Upload this session to ur bot multi auth state"}, {quoted: file})

console.log(chalk.greenBright("DONE!"));
await fs.emptyDir("./" + sessionName);
await fs.emptyDir("./" + sessionName);
process.exit(1);
} else if (
connection === "close" &&
Expand All @@ -113,7 +118,7 @@ async function ZyyPairing() {
lastDisconnect.error.output.statusCode !== 401
) {
ZyyPairing();
await fs.emptyDir("./" + sessionName);
await fs.emptyDir("./" + sessionName);
}
},
);
Expand Down

1 comment on commit 5cb6a60

@rizzlogy
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:3

Please sign in to comment.