Skip to navigation

Reward your voters

Beta
Page through everyone who voted for your server or bot and thank them in your community.
View as Markdown

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 from the account that owns the listing. Co-admins and co-developers can’t use the voters endpoints.

The endpoints

ListingEndpoint{id} is
ServerGET /api/v1/servers/{id}/votersYour Fluxer guild ID
BotGET /api/v1/bots/{id}/votersYour Fluxer bot ID

Both take the same query parameters and return the same shape.

ParameterDefaultDescription
page1Page number, starting at 1
limit50Results per page. Values over 100 are capped at 100.
{
"total": 42,
"page": 1,
"limit": 50,
"voters": [
{
"username": "jack",
"fluxerId": "123456789",
"votedAt": "2026-09-18T12:00:00.000Z"
}
]
}

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.

async function fetchAllVoters(serverId) {
const voters = [];
let page = 1;
let total = Infinity;
while (voters.length < total) {
const res = await fetch(
`https://fluxerlist.com/api/v1/servers/${serverId}/voters?page=${page}&limit=100`,
{ headers: { Authorization: `Bearer ${process.env.FLUXERLIST_KEY}` } },
);
if (res.status === 429) {
const wait = Number(res.headers.get("Retry-After") ?? 30);
await new Promise((r) => setTimeout(r, wait * 1000));
continue;
}
if (!res.ok) throw new Error(`FluxerList returned ${res.status}`);
const body = await res.json();
total = body.total;
if (body.voters.length === 0) break;
voters.push(...body.voters);
page += 1;
}
return 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 votedAt is within the last few days, and remove it after.
  • Leaderboard. Count votes per fluxerId across time and post a monthly top list.
  • Milestones. Announce when total crosses 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.

Poll every few minutes at most, and cache the result. Fetching with limit=100 keeps the number of requests down.