GuildGiveawaysType: {
    existing: GuildGiveawayWithEntry[];
    limits: {
        canBonusEntries: boolean;
        canLimitEntries: boolean;
        canModifyWhileRunning: boolean;
        canRequirements: boolean;
        canSchedule: boolean;
        maxDurationMinutes: number;
        maxRequirements: number;
        maxScheduleAheadMinutes: number;
    };
    premium: {
        tierId: string | null;
        tierName: string | null;
    };
    scheduled: {
        data: GuildGiveawayCreateSchema;
        shouldStartAt: Date;
    }[];
}

Type declaration

  • existing: GuildGiveawayWithEntry[]
  • limits: {
        canBonusEntries: boolean;
        canLimitEntries: boolean;
        canModifyWhileRunning: boolean;
        canRequirements: boolean;
        canSchedule: boolean;
        maxDurationMinutes: number;
        maxRequirements: number;
        maxScheduleAheadMinutes: number;
    }

    The guild's effective giveaway caps, served rather than resolved by the caller.

    MINUTES, not hours: the create form's inputs are minutes, and hours would make every consumer convert. The can* flags come from the guild's FEATURE BITS rather than from the numbers - maxScheduleAheadMinutes is 0 on Free, and rendering that as a cap shows a "0 minutes" limit with no explanation. Gate the control on canSchedule; use the number only to bound the input.

    • canBonusEntries: boolean
    • canLimitEntries: boolean
    • canModifyWhileRunning: boolean
    • canRequirements: boolean
    • canSchedule: boolean
    • maxDurationMinutes: number
    • maxRequirements: number
    • maxScheduleAheadMinutes: number
  • premium: {
        tierId: string | null;
        tierName: string | null;
    }

    Which tier those caps came from, so the UI can name the plan in a limit message.

    • tierId: string | null
    • tierName: string | null
  • scheduled: {
        data: GuildGiveawayCreateSchema;
        shouldStartAt: Date;
    }[]