Docs/API Reference/Check Votes

Check Votes

Check if a user has voted for your bot in the last 8 hours.

Check if a specific user has voted for your bot in the last 8 hours. Useful for implementing vote-gated features and rewards.

GEThttps://discordforge.org/api/bots/:id/votes/check?userId=...

Rate Limit

60 requests per minute.

Headers

1Authorization: <YOUR_API_KEY>

Query Parameters

  • userId – The Discord user ID to check

Response

1{
2 "hasVoted": true,
3 "votedAt": "2026-03-29T10:00:00.000Z",
4 "nextVoteAt": "2026-03-29T22:00:00.000Z"
5}

SDK Usage

check-votes.ts
1import { ForgeClient } from "discordforge-sdk";
2 
3const forge = new ForgeClient(process.env.FORGE_API_KEY, process.env.FORGE_BOT_ID);
4 
5// Check if a user voted
6const vote = await forge.checkVote("123456789012345678");
7 
8if (vote.hasVoted) {
9 // Grant premium features, extra coins, etc.
10 console.log(`Voted at ${vote.votedAt}`);
11 console.log(`Can vote again at ${vote.nextVoteAt}`);
12} else {
13 // Prompt to vote
14 console.log("Vote at https://discordforge.org/bots/YOUR_BOT_ID");
15}