Reward your voters
Votes are the most direct signal that someone likes your community. The voters endpoints return who voted and when, so you can hand out a role, a perk, or a shout-out.
You’ll need an API key. Server voters work for the server’s owner only. Bot voters work for the bot’s owner or a listed developer.
The endpoints
Both take the same query parameters and return the same shape.
Voters come back newest first. username is the person’s display name if they’ve chosen to show it, otherwise their username. Use fluxerId to identify people, since names can change. It’s a string, so don’t parse it as a number.
Fetch every voter
Walk the pages until you’ve collected total voters.
Give voters something
Once you have the list, you can decide what a vote is worth. A few patterns that work:
- Voter role. Grant a role to anyone whose
votedAtis within the last few days, and remove it after. - Leaderboard. Count votes per
fluxerIdacross time and post a monthly top list. - Milestones. Announce when
totalcrosses round numbers like 50 or 100.
Votes can be removed by the voter at any time, and the tokens they earned are reversed. Re-fetch the list before you hand out anything you can’t take back.
Voter lists are capped at 10 requests/min per key. Poll every few minutes at most, and cache the result. Fetching with limit=100 keeps the number of requests down. To reward voters the moment they vote, use webhooks instead of polling.