From a0396fdf19d0c257994e1943d12ce4fc6acc6f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A7=81Ash=C3=BB=EA=A7=82?= <30575805+Ashu11-A@users.noreply.github.com> Date: Sat, 25 May 2024 17:33:25 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=95=91=20Add=20cron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/controller/auth.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/controller/auth.ts b/core/src/controller/auth.ts index a22fa940..dfea7550 100644 --- a/core/src/controller/auth.ts +++ b/core/src/controller/auth.ts @@ -209,10 +209,12 @@ export class Auth { console.log('❌ Bot desabilitado!') } + if (Auth.bot === undefined) this.startCron() + Auth.bot = data } - async startCron (): Promise { + startCron (): void { const job = new CronJob('* * * * *', () => this.validator()) job.start() }