discord / action / schema v1
Giveaway
Post a giveaway members enter by clicking a button or reacting, then automatically pick and announce winners when it ends, no other nodes needed.
Prerequisites
- Add the discord plugin inside this workflow.
Parameters
| Parameter | Type | Description |
|---|---|---|
ServerguildId | discord_guild Required | |
ChannelchannelId | discord_channel Required | Where the giveaway is posted. |
Prizeprize | text Required | What the winner(s) get. Shown in the giveaway post and the winner announcement. |
Durationduration | text Required Default: | How long entries stay open before winners are picked automatically, e.g. "30m", "2h", "3d". |
Number of winnerswinnerCount | number Required Default: | How many entrants are picked when the giveaway ends. |
How members enterentryStyle | select Required Default: | Buttons give an instant "you're entered" reply. Emoji reactions are the classic giveaway-bot style. Options: Click a button (button), React with an emoji (reaction) |
Entry emojientryEmoji | text Conditionally required Default: | The emoji members react with to enter.Field conditions{
"visible": {
"key": "entryStyle",
"values": [
"reaction"
]
},
"required": {
"key": "entryStyle",
"values": [
"reaction"
]
}
} |
Required rolerequiredRoleId | discord_role Optional | Only members with this role can enter. Leave empty to let anyone enter. |
Minimum account age (days)minAccountAgeDays | number Optional Default: | 0 = no limit. Otherwise a Discord account created more recently than this cannot enter. The usual defence against throwaway accounts farming a giveaway. |
Minimum time on the server (days)minServerAgeDays | number Optional Default: | 0 = no limit. Otherwise a member who joined more recently than this cannot enter, so the prize goes to the community rather than to people who joined for it. |
Bonus entry rolesbonusEntryRoleIds | discord_role Optional | Members holding any of these get extra entries, so they are likelier to win: boosters, subscribers, veterans. They can still only win once. |
Entries for bonus rolesbonusEntries | number Optional Default: | How many entries a bonus role is worth. 2 = double odds. Holding several bonus roles still counts once, not once per role. |
Giveaway post textannounceText | textarea Optional | {{prize}}, {{duration}} and {{winnerCount}} are filled in by this node when the giveaway is posted. Leave empty to use the default text. |
Winner announcementwinnerMessage | text Optional | {{winners}} is replaced with the winner mention(s), {{prize}} with the prize. Filled in when the giveaway ends. |
No-entries messagenoWinnersMessage | text Optional | Posted instead of the winner announcement when nobody entered. {{prize}} works here too. |
Winner announcement channelannounceChannelId | discord_channel Optional | Leave empty to announce in the same channel as the giveaway post. |
Also DM winnersdmWinners | boolean Optional | Send each winner the winner-announcement text as a direct message too. A winner with DMs closed simply doesn't get one. Everyone else still does. |
Inputs and outputs
Inputs
execute- Execute (input)
Outputs
done- Done (output)message_id- Message ID (output)error- Error (output)
No detailed data schema is declared. Inspect a test run to see its result.
Examples and troubleshooting have not yet been reviewed for this contract.
Version and compatibility
This reference follows the current authoring contract. Existing workflows retain their saved node revisions.
Contract identifier
934c2f7256748bd7c3a9fbbc60c779c382ecbcef23ed6f391a3a7d1d905edbc5