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

    Interface AntiLinkGuard

    interface AntiLinkGuard {
        autoDelete: boolean;
        stats: { deleted: number; detected: number };
        allow(...chats: (string | string[])[]): number;
        allowDomain(...domains: (string | string[])[]): number;
        bind(sock: unknown): () => void;
        disallowDomain(...domains: (string | string[])[]): number;
        getAllowedDomains(): string[];
        getAllowlist(): string[];
        handler(upsert: { messages: unknown[] }, sock?: unknown): Promise<void>;
        isAllowed(chat: string): boolean;
        onDetected(cb: (detection: AntiLinkDetection) => void): () => void;
        onError(cb: (info: { error: unknown; msg: unknown }) => void): () => void;
        setAutoDelete(on: boolean): boolean;
        unallow(...chats: (string | string[])[]): number;
        unbind(): void;
    }
    Index
    autoDelete: boolean

    Whether auto-delete is currently enabled.

    stats: { deleted: number; detected: number }

    Running counters since creation.

    • Add exempt chat jid(s) to the allowlist at runtime. Returns the new allowlist size.

      Parameters

      • ...chats: (string | string[])[]

      Returns number

    • Add allowed link domain(s) at runtime (non-invite mode). Returns the new count.

      Parameters

      • ...domains: (string | string[])[]

      Returns number

    • Remove allowed link domain(s) at runtime. Returns the new count.

      Parameters

      • ...domains: (string | string[])[]

      Returns number

    • Parameters

      • upsert: { messages: unknown[] }
      • Optionalsock: unknown

      Returns Promise<void>

    • Is this chat currently exempt?

      Parameters

      • chat: string

      Returns boolean

    • Parameters

      • cb: (info: { error: unknown; msg: unknown }) => void

      Returns () => void

    • Toggle delete-for-everyone on detections at runtime. Returns the new state.

      Parameters

      • on: boolean

      Returns boolean

    • Remove chat jid(s) from the allowlist at runtime. Returns the new allowlist size.

      Parameters

      • ...chats: (string | string[])[]

      Returns number