start converting wbot functions to typescript

This commit is contained in:
canove
2020-09-21 18:49:38 -03:00
parent dd9b61c2b9
commit 391cd5495c
4 changed files with 121 additions and 106 deletions

View File

@@ -18,6 +18,7 @@ import { initWbot } from "./libs/wbot";
// const wbotMessageListener = require("./services/wbotMessageListener");
// const wbotMonitor = require("./services/wbotMonitor");
import Whatsapp from "./models/Whatsapp";
import wbotMessageListener from "./services/WbotServices/wbotMessageListener";
Sentry.init({ dsn: process.env.SENTRY_DSN });
@@ -68,8 +69,7 @@ const startWhatsAppSessions = async () => {
whatsapps.forEach(whatsapp => {
initWbot(whatsapp)
.then(() => {
console.log("initialized!!");
// wbotMessageListener(whatsapp);
wbotMessageListener(whatsapp);
// wbotMonitor(whatsapp);
})
.catch(err => console.log(err));