UNPKG

discordbotlist

Version:

Integrate with discordbotlist.com and support voting rewards and promote your bot's stats on the website.

25 lines 1.62 kB
import type { RESTPutAPIApplicationCommandsJSONBody } from "discord.js"; import type { BotStats, RecentVotes } from "./types"; export declare const BASE_URL = "https://discordbotlist.com/api/v1"; export declare function route<Path extends string>(path: Path): `${typeof BASE_URL}${Path}`; /** * Post bot stats to be displayed on the website. * @param apiKey API key generated by selecting "Generate token" in the Admin section of your bot's page. **Do not use your Discord bot token.** * @param botId ID of the bot to post stats for. * @param stats Stats as they should appear on the website. */ export declare function postBotStats(apiKey: string, botId: string, stats: BotStats): Promise<void>; /** * Get recent votes (within the past 12 hours) for a bot. * @param apiKey API key generated by selecting "Generate token" in the Admin section of your bot's page. **Do not use your Discord bot token.** * @param botId ID of the bot to get recent votes for. */ export declare function fetchRecentVotes(apiKey: string, botId: string): Promise<RecentVotes>; /** * Post the slash commands your bot supports. These will be shown on your bot page. * @param apiKey API key generated by selecting "Generate token" in the Admin section of your bot's page. **Do not use your Discord bot token.** * @param botId ID of the bot to post commands for. * @param commands The commands to post, in the same format as they'd be sent to Discord. */ export declare function postBotCommands(apiKey: string, botId: string, commands: RESTPutAPIApplicationCommandsJSONBody): Promise<void>; //# sourceMappingURL=endpoints.d.ts.map