/** * Finalize an active giveaway by selecting winners, persisting results, and * notifying participants. * * The implementation is idempotent: if the giveaway has already ended or been * cancelled the function resolves early without side effects. When the * giveaway is still active it marks the record as ended, updates the message, * moves the giveaway to the recent list, optionally DMs winners, and cleans up * any scheduled jobs. * * @param giveawayId - Unique identifier of the giveaway to finalize. * @returns Promise that resolves once the giveaway has been processed. * @example * await endGiveaway('01HQRS5F1GZ9J3YF7WXT7H2K2B') */ export declare function endGiveaway(giveawayId: string): Promise; /** * Reroll a completed giveaway, selecting additional winners from the remaining * eligible entrants. * * Previously selected winners (including historical rerolls) are excluded from * the candidate pool, ensuring no duplicates are produced. The giveaway * message is updated to display the full winner list and the new winners are * appended to the reroll history. * * @param giveawayId - Unique identifier of the giveaway being rerolled. * @param count - Number of new winners to draw from remaining entrants. * @returns Promise that resolves to the newly selected winner IDs (empty array * if insufficient eligible entrants remain). * @example * const newWinners = await rerollWinners('01HQRS5F1GZ9J3YF7WXT7H2K2B', 2) */ export declare function rerollWinners(giveawayId: string, count: number): Promise; /** * Randomly select winners from an entrant map without replacement. * * Uses the Fisher–Yates shuffle to guarantee unbiased permutations of the * candidate list, then slices the requested number of winners. The contained * `giveaway` context is currently unused by the algorithm but provides rich * metadata for future weighting strategies. * * @param entries - Map of eligible user IDs to entry weights. * @param count - Maximum number of winners to select. * @returns Array of selected user IDs; length can be less than `count` when * there are not enough entrants. */ declare function selectWinners(entries: Record, count: number): string[]; export declare const __test: { selectWinners: typeof selectWinners; }; export {};