LogoRobo.js
Packages@robojs/giveaways

Giveaway

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

PropertyTypeDescription
allowRoleIdsstring[]Whitelist of role IDs; empty array allows all roles to enter.
channelIdstringDiscord channel ID where the giveaway message lives.
createdAtnumberEpoch timestamp (ms) when the giveaway record was created.
cronJobId?null | stringOptional cron job identifier when scheduled via @robojs/cron.
denyRoleIdsstring[]Blacklist of role IDs prohibited from entering.
endsAtnumberEpoch timestamp (ms) at which the giveaway should end.
entriesRecord<string, number>Entrant weighting map keyed by Discord user ID.
finalizedAtnull | numberEpoch timestamp (ms) when the giveaway ended or was cancelled.
guildIdstringDiscord guild ID hosting the giveaway.
idstringUnique giveaway identifier, currently a ULID string.
messageIdstringDiscord message ID for the giveaway announcement.
minAccountAgeDaysnull | numberMinimum required account age for entrants, or null to disable.
prizestringPrize description that appears in embeds and DMs.
rerollsstring[][]Historical reroll batches, newest appended to the array.
startedBystringDiscord user ID of the moderator that started the giveaway.
status"active" | "ended" | "cancelled"Current lifecycle state of the giveaway.
winnersstring[]User IDs selected as winners when the giveaway finalized.
winnersCountnumberNumber of winners that should be selected when the giveaway ends.

On this page