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

    Interface Auction

    interface Auction {
        size: number;
        bid(chat: string, user: string, amount: number): BidResult;
        cancel(chat: string): boolean;
        end(chat: string): AuctionEndResult | null;
        getHistory(limit?: number): AuctionEndResult[];
        getStatus(chat: string): AuctionStatus | null;
        isActive(chat: string): boolean;
        onBid(
            cb: (
                info: {
                    amount: number;
                    chat: string;
                    extended: boolean;
                    user: string;
                },
            ) => void,
        ): () => void;
        onEnd(cb: (result: AuctionEndResult) => void): () => void;
        onOutbid(
            cb: (
                info: { amount: number; by: string; chat: string; user: string },
            ) => void,
        ): () => void;
        render(chat: string): string | null;
        start(
            chat: string,
            options?: {
                antiSnipeMs?: number;
                buyNow?: number;
                durationMs?: number;
                item?: string;
                minIncrement?: number;
                startBid?: number;
                startedBy?: string;
            },
        ): {
            chat: string;
            endsAt: number;
            item: string;
            minIncrement: number;
            startBid: number;
        };
    }
    Index
    size: number
    • Never throws on a bad bid — returns a refusal instead.

      Parameters

      • chat: string
      • user: string
      • amount: number

      Returns BidResult

    • Parameters

      • cb: (
            info: { amount: number; chat: string; extended: boolean; user: string },
        ) => void

      Returns () => void

    • Parameters

      • cb: (info: { amount: number; by: string; chat: string; user: string }) => void

      Returns () => void

    • Parameters

      • chat: string
      • Optionaloptions: {
            antiSnipeMs?: number;
            buyNow?: number;
            durationMs?: number;
            item?: string;
            minIncrement?: number;
            startBid?: number;
            startedBy?: string;
        }

      Returns {
          chat: string;
          endsAt: number;
          item: string;
          minIncrement: number;
          startBid: number;
      }