@japofc/baileys - v2.4.7
    Preparing search index...

    Type Alias MockWASocket

    type MockWASocket = {
        connect: () => void;
        connectionState: "open" | "close";
        disconnect: (error?: Error) => void;
        eventLog: { data: unknown; event: string }[];
        outbox: MockOutboxEntry[];
        presenceLog: { toJid: string | null; type: string }[];
        readReceipts: proto.IMessageKey[];
        receiveMessage: (msg: IWebMessageInfo) => Promise<IWebMessageInfo>;
        receiveText: (
            fromJid: string,
            text: string,
            opts?: ReceiveTextOptions,
        ) => Promise<IWebMessageInfo>;
        reset: () => void;
        sock: any;
        waitForReply: (
            filter?: (entry: MockOutboxEntry) => boolean,
            timeoutMs?: number,
        ) => Promise<MockOutboxEntry>;
    }
    Index
    connect: () => void

    Emit connection.update open.

    connectionState: "open" | "close"
    disconnect: (error?: Error) => void

    Emit connection.update close (optionally with an error).

    eventLog: { data: unknown; event: string }[]

    Every event emitted, in order: full audit trail.

    outbox: MockOutboxEntry[]

    Every message the bot "sent", in order.

    presenceLog: { toJid: string | null; type: string }[]

    Presence updates sent via sendPresenceUpdate().

    readReceipts: proto.IMessageKey[]

    Keys passed to readMessages().

    receiveMessage: (msg: IWebMessageInfo) => Promise<IWebMessageInfo>

    Inject any raw incoming WAMessage.

    receiveText: (
        fromJid: string,
        text: string,
        opts?: ReceiveTextOptions,
    ) => Promise<IWebMessageInfo>

    Inject an incoming text message; resolves after handlers get a turn.

    reset: () => void

    Clear outbox/logs and reject pending waiters; listeners stay attached.

    sock: any

    The mock sock — hand to bot code in place of makeWASocket().

    waitForReply: (
        filter?: (entry: MockOutboxEntry) => boolean,
        timeoutMs?: number,
    ) => Promise<MockOutboxEntry>

    Wait for the next outgoing message (optionally filtered). Rejects on timeout.