mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
17 lines
438 B
TypeScript
17 lines
438 B
TypeScript
import { initWbot } from "../../libs/wbot";
|
|
import Whatsapp from "../../models/Whatsapp";
|
|
import wbotMessageListener from "./wbotMessageListener";
|
|
import wbotMonitor from "./wbotMonitor";
|
|
|
|
export const StartWhatsAppSession = async (
|
|
whatsapp: Whatsapp
|
|
): Promise<void> => {
|
|
try {
|
|
const wbot = await initWbot(whatsapp);
|
|
wbotMessageListener(wbot);
|
|
wbotMonitor(wbot, whatsapp);
|
|
} catch (err) {
|
|
console.log(err);
|
|
}
|
|
};
|