This commit is contained in:
Darren Clarke 2023-07-18 12:26:57 +00:00
parent 7ca5f2d45a
commit f901f203b0
302 changed files with 9897 additions and 10332 deletions

View file

@ -11,17 +11,16 @@ import makeWASocket, {
fetchLatestBaileysVersion,
isJidBroadcast,
isJidStatusBroadcast,
MessageRetryMap,
useMultiFileAuthState,
} from "@adiwajshing/baileys";
} from "@whiskeysockets/baileys";
import fs from "fs";
import workerUtils from "../../worker-utils.js";
export type AuthCompleteCallback = (error?: string) => void;
export default class WhatsappService extends Service {
connections: { [key: string]: any } = {};
loginConnections: { [key: string]: any } = {};
connections: { [key: string]: any; } = {};
loginConnections: { [key: string]: any; } = {};
static browserDescription: [string, string, string] = [
"Metamigo",
@ -69,7 +68,7 @@ export default class WhatsappService extends Service {
) {
const directory = this.getAuthDirectory(bot);
const { state, saveCreds } = await useMultiFileAuthState(directory);
const msgRetryCounterMap: MessageRetryMap = {};
const msgRetryCounterMap: any = {};
const socket = makeWASocket({
...options,
auth: state,