UNPKG

whatsauto.js

Version:

Easy WhatsApp Automation with Session

69 lines 3.8 kB
import { WASocket, WAMessage } from "@whiskeysockets/baileys"; import { AutoWAEvents } from "../Defaults/index.js"; import { IWAutoSendMessage, IWAutoSendTyping, IWAutoSessionConfig, IWAutoMessage, IWAutoGroupMemberActionOptions, IWAutoSendMedia, IWAutoPhoneToJid, IWAutoForwardMessage, IWAutoSendSticker, IStickerOptions } from "../Types/index.js"; import AutoWAEvent from "./AutoWAEvent.js"; import Logger from "../Logger/index.js"; export declare class AutoWA { logger: Logger; private retryCount; sock: WASocket; sessionId: string; options: IWAutoSessionConfig; events: AutoWAEvent<AutoWAEvents>; private pairingCode?; defaultStickerProps: IStickerOptions; constructor(sessionId: string, options?: IWAutoSessionConfig); setLogging(logging: boolean): Promise<void>; initialize(): Promise<void>; private startWhatsApp; private startSocket; private setupWASocket; destroy(full?: boolean): Promise<void>; isExist({ from, isGroup }: IWAutoPhoneToJid): Promise<boolean>; private downloadMedia; private validateReceiver; sendText({ to, text, isGroup, ...props }: IWAutoSendMessage): Promise<WAMessage>; sendImage({ to, text, isGroup, media, failMsg, ...props }: IWAutoSendMedia): Promise<WAMessage>; sendVideo({ to, text, isGroup, media, failMsg, ...props }: IWAutoSendMedia): Promise<WAMessage>; sendDocument({ to, text, isGroup, media, filename, failMsg, ...props }: IWAutoSendMedia & { filename: string; }): Promise<WAMessage>; sendAudio({ to, isGroup, media, voiceNote, failMsg, ...props }: Omit<IWAutoSendMedia, "text">): Promise<WAMessage>; sendReaction({ to, text, isGroup, answering }: IWAutoSendMessage): Promise<WAMessage>; sendTyping({ to, callback, isGroup }: IWAutoSendTyping): Promise<void>; sendRecording({ to, callback, isGroup }: IWAutoSendTyping): Promise<void>; readMessage(msgs: IWAutoMessage[]): Promise<void>; sendSticker({ to, isGroup, sticker, media, failMsg, hasMedia, ...props }: IWAutoSendSticker & IStickerOptions): Promise<WAMessage>; forwardMessage({ to, msg, isGroup, ...props }: IWAutoForwardMessage): Promise<WAMessage>; getProfileInfo(target: string): Promise<{ profilePictureUrl: string; status: import("@whiskeysockets/baileys").USyncQueryResultList[]; }>; getGroupInfo(target: string): Promise<import("@whiskeysockets/baileys").GroupMetadata>; addMemberToGroup({ participants, to }: IWAutoGroupMemberActionOptions): Promise<{ status: string; jid: string | undefined; content: import("@whiskeysockets/baileys").BinaryNode; }[]>; removeMemberFromGroup({ participants, to }: IWAutoGroupMemberActionOptions): Promise<{ status: string; jid: string | undefined; content: import("@whiskeysockets/baileys").BinaryNode; }[]>; promoteMemberGroup({ participants, to }: IWAutoGroupMemberActionOptions): Promise<{ status: string; jid: string | undefined; content: import("@whiskeysockets/baileys").BinaryNode; }[]>; demoteMemberGroup({ participants, to }: IWAutoGroupMemberActionOptions): Promise<{ status: string; jid: string | undefined; content: import("@whiskeysockets/baileys").BinaryNode; }[]>; on<K extends keyof AutoWAEvents>(event: K, listener: (...args: AutoWAEvents[K]) => void): void; once<K extends keyof AutoWAEvents>(event: K, listener: (...args: AutoWAEvents[K]) => void): void; off<K extends keyof AutoWAEvents>(event: K, listener: (...args: AutoWAEvents[K]) => void): void; emit<K extends keyof AutoWAEvents>(event: K, ...args: AutoWAEvents[K]): boolean; removeAllListeners<K extends keyof AutoWAEvents>(event?: K): void; } //# sourceMappingURL=AutoWA.d.ts.map