diff --git a/main.js b/main.js index 29b8fa3..d2e0312 100644 --- a/main.js +++ b/main.js @@ -11,13 +11,14 @@ const { const COOKIE_ARR = [COOKIE, COOKIE_2, COOKIE_3, COOKIE_4, COOKIE_5]; -COOKIE_ARR.forEach((cookie, num) => { - if (typeof cookie === 'undefined' && cookie === '') return; - setGlobalVar(cookie, SCKEY).then(async () => { +COOKIE_ARR.forEach(async (cookie, num) => { + console.log(typeof cookie); + if (typeof cookie === 'undefined') return; + await setGlobalVar(cookie, SCKEY).then(async () => { const { start, isMe, checkCookie } = require("./lib/lottery-in-nodejs"); const isRight = await checkCookie(num + 1); if (!isRight) return; - isMe(); - start(); + await isMe(); + await start(); }) });