Giveaways
The Giveaways module: prize draws by place with dates, entry terms and tickets, and a result from a random number any participant can check.
You build a giveaway in the admin: prizes by place, joining dates, entry terms and tickets. Players join on the site, in the bot or in the game menu, and at the set time the site picks the winners itself and puts the prizes in their inventories. The hash of the secret number is published in advance, so after the draw anyone can recompute who won.


| Dependencies | Games | Permissions | Studio blocks | Bot commands | Cron tasks |
|---|---|---|---|---|---|
| Flute 2.0, the Rewards module; optionally Quests, Chat | does not depend on the game; server prizes and the game menu go through GameLink | admin.giveaways, admin.giveaways.view | "Giveaways" (giveaways.active) | /giveaways — "Running giveaways" | two, below |
Where the module shows up
| Place | What is there |
|---|---|
| AdminGiveaways | the list grouped into "Running", "Starting soon", "Drafts", "Drawn", "Called off", and the "New giveaway" button |
| A giveaway's page in the admin | the "Result", "Participants", "Details" and "Quests" tabs and the "At a glance" block with dates, terms and the seed hash |
| AdminGiveawaysSettings | module settings, at /admin/modules/Giveaways/settings |
| Admin home | the "Giveaways" tile with running giveaways and participants, a line for each giveaway that waits for its draw, and the lines "Giveaway prizes not handed" and "Giveaway prizes not given" |
| Player card in the admin | in "Overview", the "Activity" block: lines about joining, winning and being taken out of giveaways |
/giveaways | the "Giveaways" section and a menu item of the same name |
/giveaways/<address> | the giveaway page: prizes, "Terms", "Your entry", and after the draw "Fairness check" |
| Profile on the site | the "My giveaways" card on the profile overview, visible to the player only |
| Studio | the "Giveaways" block and the giveaways_active and giveaways_winners data sources for your own components |
| Game menu | running giveaways with a join button, see Game menu |
| Telegram and Discord bots | the /giveaways command: the list of giveaways and a "Join" button, see Bots |
Install and first setup
Install the module
Giveaways is installed from the marketplace together with Rewards. A "Giveaways" row appears in the admin menu, in the "Activities" group.
Check the scheduler
Giveaways open, close and draw through a task that runs once a minute. Without the scheduler a giveaway gets stuck as "Coming" or "Open", see Scheduler.
Connect the servers if prizes go to the game
A server group or command reaches the game through GameLink, and the site needs the winner's game account. Installing the plugin is covered in connecting a server.
Look through the settings
The defaults work. "Reserves" and "Days a prize waits" are the ones people change most, all fields are described under Settings.
Give away VIP to players
The example: three places with a 30-day VIP group. Players with Steam linked who have played at least two hours on the servers can take part.
Create a draft
Open AdminGiveaways and press "New giveaway". The giveaway is saved as a draft, players do not see it yet. In "Main" fill in "Title", for example "VIP for a month". You can leave "Page address" empty, it is made from the title.

Set the prizes by place
In "Prizes by place" set "Prize places" to 3. In "Reward 1" pick "Server group by name", enter the group vip and a "Term" of 30 days. With more places than prizes the remaining places get the last prize, so one row covers all three places.
A prize you hand over yourself, a T-shirt for example, is the "Keepsake" type with "Own name". The giveaway page marks it "handed over in person".
Set the dates
In "Dates" fill in "Joining opens" and "Joining closes". You can leave "Draw" empty: it then comes 10 minutes after joining closes, a pause set by "Pause before the draw, min". The "Draw automatically" switch is on. With it off, an administrator draws with the "Draw now" button.
Limit who takes part
Open "Who may take part". In "Condition 1" pick "A game account is linked" with "Which account" set to Steam, in "Condition 2" pick "Time played on a server" with "Not less than, hours" at 2. A giveaway takes up to eight conditions, among them "Age of the account", "Has a role" and "Confirmed email".
"Without the staff" is on: the author and everyone with admin.giveaways do not take part. "Participants per address" is 2 by default. With that limit nobody can join through the bot or the game menu, and the field cannot change once joining opens. If joining from the game matters, set it to 0.
Set up tickets
In "Tickets", "Tickets for joining" is 1 by default. To let players buy more, set "Price of a paid ticket" and "Paid per participant". When site coins are on, "Paid with" appears: the site balance or coins.
Publish
Press "Publish" and confirm. At this point the site fixes the secret number, and its hash shows in "At a glance" and on the giveaway page. If the start time has passed, the giveaway is "Open" right away, otherwise "Coming".
Once joining opens, only "Description" and "Picture" can change, because the participants have seen the prizes, dates and terms. While the giveaway is "Coming", you can edit all of it. If the giveaway has paid tickets or a money prize, publishing asks you to confirm the action with your password or a 2FA code. Cancelling always asks for it.
The draw and the prizes
Right before the draw the site checks the participants again. Accounts that were removed, blocked or no longer meet the terms are taken out with a reason, for example "The account is blocked". Then the places are drawn over the ticket table: winners by place first, then reserves, 3 by default. More tickets mean better odds, and one account wins at most one place.

The prize of a place goes through Rewards to the winner's inventory and waits there for 14 days ("Days a prize waits"). The winner gets the "You won!" notification, the other participants "Giveaway results". The grants show in the Rewards journal with the "Giveaways" source, and a row leads to this giveaway.
The "Result" tab has two actions:
- "Replace by a reserve" takes the prize back from the winner and gives the place to the next reserve, who gets the prize and a notification. With no reserves left, the place stays without a winner.
- "Prize handed" marks a prize handed over in person. Without the mark, "Giveaway prizes not handed" shows on the admin home after 3 days.
To take a participant out, click their row on the "Participants" tab, enter a "Reason" and press "Take out". This works after the draw too: a winner gives way to the next reserve. The participant sees the reason.
Until the draw the same window also has "Add tickets": tickets from the staff, up to 1000 at a time and with a reason. Such tickets are marked publicly on the result page.
After the draw the giveaway page shows "Fairness check": the hash published beforehand, the revealed secret seed, the participants' seed (SHA-256 of the ticket table) and the numbers of the round. "Recompute the numbers" opens the calculation on the "Fair play" page of the Rewards module (/fair), and "Copy the table" copies the ticket table as JSON. When the table and the numbers agree, "Matches" stands next to the heading.
"Cancel the giveaway" is available until the draw. Bought tickets are refunded to the balance or in coins, and participants get the "Giveaway cancelled" notification. Cancelling is final.
Links with other modules
Rewards are handed out by the Rewards module: every grant lands in its "Grants" log, and whatever did not reach the game is retried by the site. If Quests is installed, Giveaways adds the "Giveaways joined" (giveaways.entered) and "Giveaways won" (giveaways.won) metrics to the "What is counted" field, so you can build a quest such as "Join three giveaways". Without Quests the module works the same, the metrics are just missing from the list.
With Quests a giveaway also gets the "Quests" tab: quests that give the player tickets. Press "Add a quest" and fill in "Title", "What is counted", "Goal" and "Tickets for doing it". For example, "Play 2 hours before the end" with the "Play time" counter and a goal of 7200, because the goal is in the units of the counter, seconds here. The quest runs while joining is open. A player who finishes it and meets the terms joins the giveaway automatically. A giveaway takes up to 10 quests.
With the Chat module installed, the chat's announcement channel gets "A giveaway has started" when a giveaway opens and "The giveaway has been drawn" after the draw, each with the giveaway card.
Links with game servers
The giveaway itself does not depend on the game. The "Time played on a server" condition counts play time on all servers or on one. Prizes such as a server group or command reach the game through GameLink, see server delivery. In the game menu the module shows up to five running giveaways: the main prize, the next date and a join button.
A player in the game needs an account linked on the site, otherwise the button is replaced by "Link your account on the site to join". The site does not know the player's address in the game or in the bot. So for a giveaway with "Participants per address" set, the game button leads to the giveaway page on the site, and the bot replies "This giveaway can only be joined on the website."
Settings
AdminGiveawaysSettings
| Field | What it changes | Default |
|---|---|---|
| "Giveaways are on" | when off, the section and joining are unavailable | on |
| "Section address" | the first part of the section's address | giveaways |
| "Paid tickets" | lets giveaways sell tickets | on |
| "Giveaways in the game menu" | running giveaways with a join button in the game | on |
| "Pause before the draw, min" | from 0 to 10080, the least time between the end of joining and the draw | 10 |
| "Reserves" | from 0 to 20, how many reserves are picked after the winners | 3 |
| "Days a prize waits" | from 1 to 365, how long a prize waits in the inventory | 14 |
| "Remind of an unhanded prize after, days" | when a prize "handed in person" shows on the admin home | 3 |
| "Keep participant addresses, days" | how many days after the draw the address hashes are erased | 30 |
| Field | What it changes | Default |
|---|---|---|
| "Finished per page" | from 1 to 60 | 12 |
| "Show finished" | the results under the running giveaways | on |
| "Profile card" | the "My giveaways" card on the profile overview | on |
| "Default pictures" | when off, a giveaway without its own picture and the section header get no picture | on |
| "Giveaway cover", "Section head picture" | your pictures instead of the module's | empty |
| "Tell the winner", "Tell participants of the result", "Tell of a cancellation", "Tell of new giveaways" | which notifications go out | on |
| "Menu item", "Section title", "Section subtitle" | your own wording instead of the translation | empty |
"Tell of new giveaways" reaches only those who pressed "Notify me of new ones" in the section. Notification texts are edited in AdminNotifications.
Paid tickets are sold only when Rewards allows the payment too: the balance needs "Draws may be paid from the site balance", coins need "Site coins are on".
Permissions
| Permission | What it gives |
|---|---|
admin.giveaways | create, publish, draw, cancel, take participants out, add tickets, module settings. Includes admin.giveaways.view |
admin.giveaways.view | see drafts, participants and the ticket journal |
Background tasks
Shown in AdminScheduler.
| Task | How often |
|---|---|
| "Giveaways: opening, closing and drawing on time" | once a minute |
| "Giveaways: erasing the addresses of participants" | once a day, at 04:20 |
For developers
Events: flute.giveaways.opened, flute.giveaways.entered, flute.giveaways.drawn, flute.giveaways.cancelled. The "Giveaway opened" and "Giveaway drawn" webhooks are set up in Webhooks. The reward source in Rewards is giveaways, with a grant reference like g:<id>:place:<place>:o:<order>.
The API exposes the giveaways and giveaway-winners resources (read only, no drafts). A key with the giveaways:read scope reads its own account's entries: GET /api/v1/giveaways/me/entries. Metrics for Quests: giveaways.entered and giveaways.won.
How the core side works: Events and listeners, API keys and the REST API, Module REST API.
Troubleshooting
For any other message, use the error lookup.
This giveaway can only be joined on the website.
The bot replies this when the giveaway has "Participants per address" set, because the site does not know the player's address in the bot. The field is 2 by default. If joining through the bot and the game menu matters more than the limit, set it to 0 before publishing.
Paid tickets are not on sale
This warning sits above the giveaway when settings switched sales off: "Paid tickets" in the module, or paying with the balance or coins in Rewards. Players get free tickets only. The "Open settings" button leads to the right field.
The draw did not happen on time
The admin home says the giveaway waits for its draw: joining is closed and the draw time has passed. If the giveaway has "Draw automatically" off, press "Draw now" on its page. If it is on, check that the scheduler runs once a minute.
| Message | What to do |
|---|---|
| "Once joining opens only the description and the picture change: the participants have seen the prizes, dates and terms." | cancel the giveaway and create a new one with the right prizes |
| "Joining would already be over, move the dates." | move "Joining closes" into the future before publishing |
| "The draw is possible once joining is closed and its time has come." | both are needed: joining is closed (by its date or with "Close joining") and the time in "Draw" has come |
| "The most accounts from this address already take part." | raise "Participants per address" in a new giveaway, or keep the limit |
| "Quests are unavailable: the quests module is off." | turn Quests on in "Extensions" |
| "Giveaway prizes not given" on the admin home | in the Rewards "Grants" journal pick "Giveaways" as the "Source", fix the reason shown in the row and press "Retry" |
| "Not given" in the "Delivery" column of the "Result" tab | the prize never got to Rewards: its reward type is unavailable, for example the module with that type is off. The site does not retry this prize itself |