@fatihjr/wa-wrapper
Version:
Baileys WhatsApp Web API wrapper.
21 lines (20 loc) • 618 B
TypeScript
import KeyedDB from "@adiwajshing/keyed-db";
import { BaileysEventEmitter, Chat } from "@whiskeysockets/baileys";
declare class keyDBHandler {
constructor(databasePath: string);
private databasePath;
private waChatKey;
private chatKey;
chats: KeyedDB<Chat, string>;
toJSON: () => {
chats: KeyedDB<Chat, string>;
};
fromJSON: (json: {
chats: Chat[];
}) => void;
writeToFile: (path?: string) => void;
readFromFile: (path?: string) => void;
bind: (ev: BaileysEventEmitter) => void;
end: (ev: BaileysEventEmitter) => void;
}
export default keyDBHandler;