Discord bot
Giveaways
Start a giveaway with one command, set who can enter, give some roles extra entries, then edit, pause, end early or reroll it. Nothing is lost when the bot restarts.
Starting one#
/giveaway start prize:Nitro duration:1d winners:2. The length can be 30m, 2h, 1d 12h or 1w (1 minute to 60 days). Optional:
- description: more about the prize or how to claim it.
- channel: post it somewhere else (default: where you type the command).
- ping_role: mention a role when it starts.
- required_role / blocked_role: only members with a role can enter, or members with a role can't.
- min_account_days / min_member_days: a minimum Discord account age and time on the server (stops alt accounts).
- bonus_role + bonus_entries: members with that role get 1 to 10 extra entries.
Entering#
Members press Enter. The bot checks the requirements and says why if someone can't enter. Pressing it again offers Leave the giveaway. Details shows the requirements and the entry count, which also updates on the message itself every 30 seconds.
Managing it#
Every command has a giveaway picker with the running ones (paste a message ID or link works too). Leave it empty to use the newest giveaway in the channel.
Commands
| /giveaway edit | Prize, description (- removes it), winners, a new length (duration) or more/less time (extend: 30m, -15m), requirements, bonus, or clear all requirements. | |
| /giveaway end | Ends it now and draws the winners. | |
| /giveaway pause / resume | Pausing closes entries and stops the clock; resuming gives back the time that was left. | |
| /giveaway reroll | Draws new winners for an ended giveaway (up to 30 days later), never someone who already won. | |
| /giveaway cancel | Ends it without winners, with an optional reason on the message. | |
| /giveaway list | Running giveaways and the last five ended ones. | |
| /giveaway entries | Who entered (and who has bonus entries). |
How winners are drawn#
- A fair random draw (cryptographic random numbers); bonus entries count as extra tickets, and nobody can win twice.
- Before someone wins the bot checks they're still on the server and still meet the requirements; if not, it draws someone else.
- Winners are mentioned under the giveaway and get a DM with a link to it.
Restarts and outages#
Every giveaway is stored, not kept in the bot's memory. If the bot restarts or is offline when a giveaway should end, it ends it within about 20 seconds of coming back. Ending is safe if the bot stops halfway: the drawn winners are saved first, so it never draws again or announces twice. Every 10 minutes the bot also checks its list of running giveaways and fixes anything that went missing.
Permissions
Managing giveaways needs Manage Server. The bot needs to see the channel, send messages and embed links there.