Interface: Giveaway
Flashcore-backed data model representing a single giveaway lifecycle.
Giveaway records are written when a giveaway is created, mutated as entries
are collected and winners announced, and stored in the giveaways:data
namespace for durability across restarts.
Properties
allowRoleIds
allowRoleIds: string[];
Whitelist of role IDs; empty array allows all roles to enter.
channelId
channelId: string;
Discord channel ID where the giveaway message lives.
createdAt
createdAt: number;
Epoch timestamp (ms) when the giveaway record was created.
cronJobId?
optional cronJobId: null | string;
Optional cron job identifier when scheduled via @robojs/cron.
denyRoleIds
denyRoleIds: string[];
Blacklist of role IDs prohibited from entering.
endsAt
endsAt: number;
Epoch timestamp (ms) at which the giveaway should end.
entries
entries: Record<string, number>;
Entrant weighting map keyed by Discord user ID.
finalizedAt
finalizedAt: null | number;
Epoch timestamp (ms) when the giveaway ended or was cancelled.
guildId
guildId: string;
Discord guild ID hosting the giveaway.
id
id: string;
Unique giveaway identifier, currently a ULID string.
messageId
messageId: string;
Discord message ID for the giveaway announcement.
minAccountAgeDays
minAccountAgeDays: null | number;
Minimum required account age for entrants, or null to disable.
prize
prize: string;
Prize description that appears in embeds and DMs.
rerolls
rerolls: string[][];
Historical reroll batches, newest appended to the array.
startedBy
startedBy: string;
Discord user ID of the moderator that started the giveaway.
status
status: "active" | "ended" | "cancelled";
Current lifecycle state of the giveaway.
winners
winners: string[];
User IDs selected as winners when the giveaway finalized.
winnersCount
winnersCount: number;
Number of winners that should be selected when the giveaway ends.