Giveaway Join Event
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.
Event Type
"giveaway.join"Description
This event is triggered when a member successfully enters a giveaway, through the join button, the captcha, or the giveaway page. A member who is refused, or who has already entered, produces no event.
On a busy giveaway this is the noisiest giveaway event, one request per entry. Free servers get 150 requests per day across all events, so leave the Giveaways category off if entries are not what you are after.
Payload Structure
Prop
Type
Example Payload
{
"type": "giveaway.join",
"payload": {
"giveawayId": "hT7pLm2Qa9",
"prize": "Nitro Classic",
"channelId": "1140972530400776294",
"messageId": "1141002938471829504",
"messageUrl": "https://discord.com/channels/1140972530400776290/1140972530400776294/1141002938471829504",
"userId": "713115896805064856",
"username": "johndoe",
"entries": 3,
"participantsCount": 42
}
}Example Usage
app.post('/webhook', (req, res) => {
const { type, payload } = req.body;
if (type === 'giveaway.join') {
console.log(`${payload.username} entered ${payload.prize}`);
console.log(`Entries: ${payload.entries}`);
// Show a live entry counter on your site
await updateEntryCount(payload.giveawayId, payload.participantsCount);
}
res.status(200).send('OK');
});Use Cases
- Show a live entry count outside Discord
- Track which members take part in giveaways
- Watch how boosted roles change the odds in a running giveaway
End
Sent once a giveaway has ended and its winners are announced, never twice. The giveaway.end webhook event, with its payload, an example and use cases.
Reroll
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.