August 22, 2026 · The Minely team
How to build a giveaway bot with AI (entries, draws, rerolls)
Giveaways are Discord's growth fuel: a prize, a timer, a flood of entries, and one happy winner. The bot that runs them has to be boring in the best way — fair draws, clean entries, and rerolls when the winner ghosts. Get those right and the hype takes care of itself.
What a giveaway bot actually is
A giveaway bot lets staff start timed giveaways with a prize and a winner count, collects entries through a reaction or button, draws winners fairly at the end, and supports rerolls when a winner does not claim.
How it works under the hood
A giveaway record holds: prize, end time, winner count, entry message id, and state. Entries are unique per user via the reaction or button interaction, with optional requirements (account age, role). The draw is a seeded random pick from the entry set at end time, announced with a message edit and a ping to the winners. Rerolls re-pick from the same entries minus previous winners.
The prompt that builds it
You do not have to write this yourself. A precise description is enough:
a giveaway bot with /giveaway start, timed entries, fair random winner draw, /giveaway reroll, and entry requirements like minimum account age
Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.
Building it in the right order
- Implement the start command with prize, duration, and winners.
- Collect entries with dedupe and requirements.
- Build the end-of-giveaway draw with a fair random pick.
- Announce winners and handle unclaimed rerolls.
- Add listing, ending early, and deleting giveaways.
The details that matter in production
In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.
Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.
Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.
Tuning it after the first build
Entry requirements matter more than prize size: a day-old account minimum kills the alt flood. One to three winners keeps odds exciting; ten winners feels rigged to lose. End with a visible countdown edit so nobody claims it ended early.
Tips that save you a rebuild
- Pick winners from stored entries at end time, never from live reactions — reactions get gamed.
- Ping winners publicly; public proof is the whole point of the giveaway.
- Log every draw with its seed and entries; fairness questions come eventually.
- Cap concurrent giveaways per guild to keep the channel readable.
Questions people ask
Can winners be weighted?
Entry multipliers for roles (boosters get 2x) are the classic, stored in the giveaway record.
What if the winner never claims?
A claim window with automatic reroll at expiry keeps prizes moving.
How do I prove fairness?
Publish the entry count and draw seed in the winner message.
Try the prompt above on a fresh project. You will see the plan, the code streaming in, and the repair loop finish the job — then a jar to download.
