Skip to navigation

Check a vote

Beta
Look up whether a specific Fluxer user currently has an active vote for your bot or server.
View as Markdown

The voters endpoints are great for paging through everyone who’s ever voted, but sometimes you just need to know about one person right now - for example, gating a /vote command’s reward on whether they’ve actually voted today. The check endpoints answer that in a single call instead of paging through the full list.

You’ll need an API key. Bot checks work for the bot’s owner or a listed developer; server checks work for the server’s owner only - co-admins can’t use it.

The endpoints

ListingEndpoint{id} is
BotGET /api/v1/bots/{id}/checkYour Fluxer bot ID, FluxerList UUID, or listing slug
ServerGET /api/v1/servers/{id}/checkYour Fluxer guild ID

Both take one query parameter.

ParameterRequiredDescription
fluxerIdYesThe Fluxer user ID to check, as a numeric string.
{ "voted": true, "votes": 128 }

voted is whether that specific user currently has an active vote. votes is the listing’s total vote count, included so you don’t need a separate call if you’re already showing it somewhere.

Gate a reward

async function hasVoted(botId, fluxerId) {
const res = await fetch(
`https://fluxerlist.com/api/v1/bots/${botId}/check?fluxerId=${fluxerId}`,
{ headers: { Authorization: `Bearer ${process.env.FLUXERLIST_KEY}` } },
);
if (!res.ok) throw new Error(`FluxerList returned ${res.status}`);
const { voted } = await res.json();
return voted;
}
// Inside your /vote-reward command handler:
if (!(await hasVoted(process.env.BOT_ID, interaction.user.id))) {
return interaction.reply("Vote for us on FluxerList first, then come back!");
}

This endpoint is capped at 60 requests/min per key (see Rate limits), so it’s fine to call it live when a user runs a command - just don’t poll it in a loop for every member.

Troubleshooting

fluxerId is missing or isn’t a numeric string. Send the raw Fluxer user ID, not a username or mention.

For a bot, the key isn’t tied to the owner or a listed developer. For a server, the key must belong to the owner specifically - a co-admin’s key won’t work here even though it can manage the listing elsewhere.

Double-check the ID. Bots accept a Fluxer bot ID, FluxerList UUID, or listing slug; servers only accept the Fluxer guild ID.

Votes expire after 12 hours. If it’s been longer than that, voted correctly reflects that the vote is no longer active.