This commit is contained in:
NoLogicAlan committed 2026-05-17 00:19:27 +03:00
1 parent d24ae4070f
commit 81669296dc
4 files changed
+13 -13

No files matched your search

+2 -2
View File
@@ -26,7 +26,7 @@ export const command = new CommandBuilder()
) )
.addStringOption(o => .addStringOption(o =>
o.setName("id") o.setName("id")
.setDescription("The server or bot UUID (uses config default if not provided)") .setDescription("The server or bot slug (uses config default if not provided)")
.setRequired(false) .setRequired(false)
) )
.addNumberOption(o => .addNumberOption(o =>
@@ -49,7 +49,7 @@ function noResourceId(type, prefix) {
return { return {
embeds: [new EmbedBuilder() embeds: [new EmbedBuilder()
.setColor("#ff0000") .setColor("#ff0000")
.setDescription(`No ${type} ID configured. Provide it with \`${prefix}vote check ${type} <uuid>\` or set it in config.json.`)] .setDescription(`No ${type} ID configured. Provide it with \`${prefix}vote check ${type} <slug>\` or set it in config.json.`)]
}; };
} }
+2 -2
View File
@@ -105,8 +105,8 @@
"fluxerlist": { "fluxerlist": {
"Comment": "FluxerList integration: check voters for your server/bot. API keys are allocated by site admins, prefixed with fl_, and visible in your Dashboard. To request access, open a ticket in the Fluxer server.", "Comment": "FluxerList integration: check voters for your server/bot. API keys are allocated by site admins, prefixed with fl_, and visible in your Dashboard. To request access, open a ticket in the Fluxer server.",
"apiKey": "fl_your_api_key_here", "apiKey": "fl_your_api_key_here",
"serverId": "your server UUID (optional, used as default for %vote check server)", "serverId": "your server slug, e.g. remix-hq (optional, used as default for %vote check server)",
"botId": "your bot UUID (optional, used as default for %vote check bot)" "botId": "your bot slug, e.g. remix (optional, used as default for %vote check bot)"
}, },
"owners": ["user id for owner-only commands", "another user id"], "owners": ["user id for owner-only commands", "another user id"],
"playerAFKTimeout": 60000, "playerAFKTimeout": 60000,
+6 -6
View File
@@ -24,8 +24,8 @@ export class FluxerListManager {
/** /**
* @param {object} config - The `fluxerlist` section from config.json * @param {object} config - The `fluxerlist` section from config.json
* @param {string} [config.apiKey] - FluxerList API key (prefixed with fl_) * @param {string} [config.apiKey] - FluxerList API key (prefixed with fl_)
* @param {string} [config.serverId] - Default server UUID for voter queries * @param {string} [config.serverId] - Default server slug for voter queries
* @param {string} [config.botId] - Default bot UUID for voter queries * @param {string} [config.botId] - Default bot slug for voter queries
*/ */
constructor(config = {}) { constructor(config = {}) {
this.apiKey = config?.apiKey ?? ""; this.apiKey = config?.apiKey ?? "";
@@ -99,7 +99,7 @@ export class FluxerListManager {
* Fetch the list of voters for a server or bot. * Fetch the list of voters for a server or bot.
* *
* @param {"server"|"bot"} type - Resource type * @param {"server"|"bot"} type - Resource type
* @param {string} [id] - Server or bot UUID (falls back to config default) * @param {string} [id] - Server or bot slug (falls back to config default)
* @param {object} [options] * @param {object} [options]
* @param {number} [options.page=1] - Page number (1-based) * @param {number} [options.page=1] - Page number (1-based)
* @param {number} [options.limit=50] - Results per page (max 100) * @param {number} [options.limit=50] - Results per page (max 100)
@@ -173,7 +173,7 @@ export class FluxerListManager {
/** /**
* Convenience: fetch voters for a server. * Convenience: fetch voters for a server.
* @param {string} [id] - Server UUID (falls back to config default) * @param {string} [id] - Server slug (falls back to config default)
* @param {object} [options] - Same as getVoters options * @param {object} [options] - Same as getVoters options
* @returns {Promise<object>} * @returns {Promise<object>}
*/ */
@@ -183,7 +183,7 @@ export class FluxerListManager {
/** /**
* Convenience: fetch voters for a bot. * Convenience: fetch voters for a bot.
* @param {string} [id] - Bot UUID (falls back to config default) * @param {string} [id] - Bot slug (falls back to config default)
* @param {object} [options] - Same as getVoters options * @param {object} [options] - Same as getVoters options
* @returns {Promise<object>} * @returns {Promise<object>}
*/ */
@@ -196,7 +196,7 @@ export class FluxerListManager {
* Use with caution on resources with many voters — this makes multiple API calls. * Use with caution on resources with many voters — this makes multiple API calls.
* *
* @param {"server"|"bot"} type * @param {"server"|"bot"} type
* @param {string} [id] - Resource UUID * @param {string} [id] - Resource slug
* @param {object} [options] * @param {object} [options]
* @param {number} [options.limit=100] - Results per page (uses max to minimize calls) * @param {number} [options.limit=100] - Results per page (uses max to minimize calls)
* @returns {Promise<Array<{ username: string, fluxerId: number, votedAt: string }>>} * @returns {Promise<Array<{ username: string, fluxerId: number, votedAt: string }>>}
+3 -3
View File
@@ -71,7 +71,7 @@ export const FLUXERLIST_LIMITS = {
* Build a full FluxerList API URL by replacing :id in the endpoint path. * Build a full FluxerList API URL by replacing :id in the endpoint path.
* *
* @param {string} endpoint - One of FLUXERLIST.ENDPOINTS values (e.g. "/servers/:id/voters") * @param {string} endpoint - One of FLUXERLIST.ENDPOINTS values (e.g. "/servers/:id/voters")
* @param {string} resourceId - The server or bot UUID to substitute for :id * @param {string} resourceId - The server or bot slug to substitute for :id
* @param {object} [queryParams] - Optional query parameters * @param {object} [queryParams] - Optional query parameters
* @param {number} [queryParams.page] - Page number (default: 1) * @param {number} [queryParams.page] - Page number (default: 1)
* @param {number} [queryParams.limit] - Results per page, max 100 (default: 50) * @param {number} [queryParams.limit] - Results per page, max 100 (default: 50)
@@ -95,7 +95,7 @@ export function buildFluxerListUrl(endpoint, resourceId, queryParams = {}) {
* Build the vote link for a resource on FluxerList. * Build the vote link for a resource on FluxerList.
* *
* @param {"server"|"bot"} type - Resource type * @param {"server"|"bot"} type - Resource type
* @param {string} resourceId - The server or bot UUID * @param {string} resourceId - The server or bot slug
* @returns {string} URL to the vote page on FluxerList * @returns {string} URL to the vote page on FluxerList
*/ */
export function buildVoteLink(type, resourceId) { export function buildVoteLink(type, resourceId) {
@@ -107,7 +107,7 @@ export function buildVoteLink(type, resourceId) {
* Build the profile link for a resource on FluxerList. * Build the profile link for a resource on FluxerList.
* *
* @param {"server"|"bot"} type - Resource type * @param {"server"|"bot"} type - Resource type
* @param {string} resourceId - The server or bot UUID * @param {string} resourceId - The server or bot slug
* @returns {string} URL to the profile page on FluxerList * @returns {string} URL to the profile page on FluxerList
*/ */
export function buildProfileLink(type, resourceId) { export function buildProfileLink(type, resourceId) {