Announce votes in Discord
Paste one address and every counted vote is posted. The second half shows signed webhooks for your own systems.
Discord and webhooks4 steps
What you need
- Permission to edit a Discord channel
- Or an https address of your own
Create a channel webhook
In Discord, open the settings of the channel, then Integrations, then Webhooks. Create one and choose Copy Webhook URL.
Integrations, Webhooks
Paste it into VoteScript
Open Webhooks, paste it into Discord channel and save.
Webhooks
Send a test
Press Send a test and look at the channel.
# votes
Emberfall APP Today at 14:02
Quill voted on VoteRank. Vote too: votescript.voterank.net/v/emberfall
Emberfall APP Today at 14:05
Iron Moss voted on TopG. Vote too: votescript.voterank.net/v/emberfall
Optional: your own system
Put an https address into Send votes to. Check the signature with the secret that appears on the page: HMAC-SHA256 over the raw body.
<?php
$body = file_get_contents('php://input');
$sig = 'sha256=' . hash_hmac('sha256', $body, 'YOUR_SIGNING_SECRET');
if (!hash_equals($sig, $_SERVER['HTTP_X_VOTESCRIPT_SIGNATURE'] ?? '')) {
http_response_code(403);
exit;
}
$vote = json_decode($body, true); // remember $vote['id'], ignore it the second time
http_response_code(204);import { createHmac, timingSafeEqual } from 'node:crypto';
export function valid(rawBody, header) {
const want = 'sha256=' + createHmac('sha256', 'YOUR_SIGNING_SECRET').update(rawBody).digest('hex');
return header?.length === want.length && timingSafeEqual(Buffer.from(header), Buffer.from(want));
}If it does not work
Discord says the webhook is unknown
My system gets the same vote twice
Nothing is sent
Next
GuideEmbed on your websiteWorks on any site where you can paste HTML.
GuideRewards, bonuses and streaksStart with one reward per vote: an item, a day of VIP, a title, a teleport. Add a bonus and a streak when the first one works.
GuideConnect your gameWhen a player types your command, the game asks VoteScript what is waiting and hands it out.
Give your players one place to vote
Your page is live as soon as you create your server. You can connect the rest step by step.

