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

    Interface TodoList

    interface TodoList {
        add(
            chat: string,
            text: string,
            meta?: {
                assignee?: string;
                by?: string;
                priority?: "high" | "medium" | "low";
            },
        ): { id: number; position: number };
        assign(chat: string, ref: number, assignee: string): boolean;
        clear(): void;
        clearDone(chat: string): number;
        countIn(chat: string, options?: { openOnly?: boolean }): number;
        done(chat: string, ref: number): boolean;
        getOverdue(chat: string): TodoTask[];
        list(chat: string, options?: { openOnly?: boolean }): TodoTask[];
        load(snapshot: Record<string, unknown>): void;
        mentions(chat: string): string[];
        remove(chat: string, ref: number): boolean;
        render(chat: string, options?: { title?: string }): string;
        renderCompact(chat: string): string;
        setDue(chat: string, ref: number, dueAt: number | null): boolean;
        setPriority(
            chat: string,
            ref: number,
            priority: "high" | "medium" | "low" | null,
        ): boolean;
        toJSON(): Record<string, unknown>;
        undone(chat: string, ref: number): boolean;
    }
    Index
    • Parameters

      • chat: string
      • text: string
      • Optionalmeta: { assignee?: string; by?: string; priority?: "high" | "medium" | "low" }

      Returns { id: number; position: number }

    • Parameters

      • chat: string
      • ref: number
      • assignee: string

      Returns boolean

    • Parameters

      • chat: string
      • Optionaloptions: { openOnly?: boolean }

      Returns number

    • Check off by 1-based position or id.

      Parameters

      • chat: string
      • ref: number

      Returns boolean

    • Parameters

      • snapshot: Record<string, unknown>

      Returns void

    • Mentions array matching render() output.

      Parameters

      • chat: string

      Returns string[]

    • Parameters

      • chat: string
      • ref: number

      Returns boolean

    • Ready-to-send checklist text (☐/☑, @assignees).

      Parameters

      • chat: string
      • Optionaloptions: { title?: string }

      Returns string

    • One-line summary: '3/5 selesai (1 telat ⏰)'.

      Parameters

      • chat: string

      Returns string

    • Set (or clear with null) a task deadline.

      Parameters

      • chat: string
      • ref: number
      • dueAt: number | null

      Returns boolean

    • Parameters

      • chat: string
      • ref: number
      • priority: "high" | "medium" | "low" | null

      Returns boolean

    • Parameters

      • chat: string
      • ref: number

      Returns boolean