Giveaway Reroll Event
Sent when giveaway winners are rerolled from the bot or the dashboard, carrying only the new winners. The giveaway.reroll webhook event, with an example.
Event Type
"giveaway.reroll"Description
This event is triggered when winners are rerolled, from the bot or from the dashboard. It carries only the winners this reroll drew. The winners the giveaway ended with went out with giveaway.end.
Payload Structure
Prop
Type
Example Payload
{
"type": "giveaway.reroll",
"payload": {
"giveawayId": "hT7pLm2Qa9",
"prize": "Nitro Classic",
"channelId": "1140972530400776294",
"messageId": "1141002938471829504",
"messageUrl": "https://discord.com/channels/1140972530400776290/1140972530400776294/1141002938471829504",
"newWinners": ["1140972530400776299"]
}
}Example Usage
app.post('/webhook', (req, res) => {
const { type, payload } = req.body;
if (type === 'giveaway.reroll') {
console.log(`Rerolled ${payload.prize}`);
// Hand the prize to whoever replaced the old winner
for (const userId of payload.newWinners) {
await grantReward(userId, payload.prize);
}
}
res.status(200).send('OK');
});Use Cases
- Hand a prize to a replacement winner without watching Discord
- Keep an external winner list in sync after a reroll
- Audit how often winners are rerolled
Join
Sent when a member enters a giveaway by button, captcha or the giveaway page. The giveaway.join webhook event, with its payload, an example and use cases.
Uploads
Fetch the images members uploaded as answers to ticket forms and applications, with the endpoint, authentication, response fields, status codes and rate limits.