From 117156c1b235ddc9a9184034fab16b683680183d Mon Sep 17 00:00:00 2001 From: NoLogicAlan Date: Sun, 17 May 2026 00:29:27 +0300 Subject: [PATCH] ugh --- commands/vote.mjs | 4 ++-- config_example.json | 4 ++-- src/FluxerListManager.mjs | 14 +++++++------- src/constants/API.mjs | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/commands/vote.mjs b/commands/vote.mjs index f715417..87a95bb 100644 --- a/commands/vote.mjs +++ b/commands/vote.mjs @@ -26,7 +26,7 @@ export const command = new CommandBuilder() ) .addStringOption(o => o.setName("id") - .setDescription("The server or bot slug (uses config default if not provided)") + .setDescription("The server or bot ID or slug (uses config default if not provided)") .setRequired(false) ) .addNumberOption(o => @@ -49,7 +49,7 @@ function noResourceId(type, prefix) { return { embeds: [new EmbedBuilder() .setColor("#ff0000") - .setDescription(`No ${type} ID configured. Provide it with \`${prefix}vote check ${type} \` or set it in config.json.`)] + .setDescription(`No ${type} ID configured. Provide it with \`${prefix}vote check ${type} \` or set it in config.json.`)] }; } diff --git a/config_example.json b/config_example.json index 7992fa3..9e73138 100644 --- a/config_example.json +++ b/config_example.json @@ -105,8 +105,8 @@ "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.", "apiKey": "fl_your_api_key_here", - "serverId": "your server slug, e.g. remix-hq (optional, used as default for %vote check server)", - "botId": "your bot slug, e.g. remix (optional, used as default for %vote check bot)" + "serverId": "remix-hq", + "botId": "remix" }, "owners": ["user id for owner-only commands", "another user id"], "playerAFKTimeout": 60000, diff --git a/src/FluxerListManager.mjs b/src/FluxerListManager.mjs index 09ebad0..5a09122 100644 --- a/src/FluxerListManager.mjs +++ b/src/FluxerListManager.mjs @@ -24,8 +24,8 @@ export class FluxerListManager { /** * @param {object} config - The `fluxerlist` section from config.json * @param {string} [config.apiKey] - FluxerList API key (prefixed with fl_) - * @param {string} [config.serverId] - Default server slug for voter queries - * @param {string} [config.botId] - Default bot slug for voter queries + * @param {string} [config.serverId] - Default server ID or slug for voter queries + * @param {string} [config.botId] - Default bot ID or slug for voter queries */ constructor(config = {}) { this.apiKey = config?.apiKey ?? ""; @@ -99,7 +99,7 @@ export class FluxerListManager { * Fetch the list of voters for a server or bot. * * @param {"server"|"bot"} type - Resource type - * @param {string} [id] - Server or bot slug (falls back to config default) + * @param {string} [id] - Server or bot ID or slug (falls back to config default) * @param {object} [options] * @param {number} [options.page=1] - Page number (1-based) * @param {number} [options.limit=50] - Results per page (max 100) @@ -154,7 +154,7 @@ export class FluxerListManager { } if (res.status === 404) { const label = type === "server" ? "Server" : "Bot"; - throw new Error(`${label} "${resourceId}" was not found on FluxerList. Make sure the slug in your config is correct — it should match the URL slug (e.g. "remix" from fluxerlist.com/bots/remix).`); + throw new Error(`${label} "${resourceId}" was not found on FluxerList. Make sure the ID or slug in your config is correct (e.g. "remix" from fluxerlist.com/bots/remix).`); } if (!res.ok) { const text = await res.text().catch(() => ""); @@ -177,7 +177,7 @@ export class FluxerListManager { /** * Convenience: fetch voters for a server. - * @param {string} [id] - Server slug (falls back to config default) + * @param {string} [id] - Server ID or slug (falls back to config default) * @param {object} [options] - Same as getVoters options * @returns {Promise} */ @@ -187,7 +187,7 @@ export class FluxerListManager { /** * Convenience: fetch voters for a bot. - * @param {string} [id] - Bot slug (falls back to config default) + * @param {string} [id] - Bot ID or slug (falls back to config default) * @param {object} [options] - Same as getVoters options * @returns {Promise} */ @@ -200,7 +200,7 @@ export class FluxerListManager { * Use with caution on resources with many voters — this makes multiple API calls. * * @param {"server"|"bot"} type - * @param {string} [id] - Resource slug + * @param {string} [id] - Resource ID or slug * @param {object} [options] * @param {number} [options.limit=100] - Results per page (uses max to minimize calls) * @returns {Promise>} diff --git a/src/constants/API.mjs b/src/constants/API.mjs index b2f1eac..7f92c98 100644 --- a/src/constants/API.mjs +++ b/src/constants/API.mjs @@ -71,7 +71,7 @@ export const FLUXERLIST_LIMITS = { * 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} resourceId - The server or bot slug to substitute for :id + * @param {string} resourceId - The server or bot ID or slug to substitute for :id * @param {object} [queryParams] - Optional query parameters * @param {number} [queryParams.page] - Page number (default: 1) * @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. * * @param {"server"|"bot"} type - Resource type - * @param {string} resourceId - The server or bot slug + * @param {string} resourceId - The server or bot ID or slug * @returns {string} URL to the vote page on FluxerList */ export function buildVoteLink(type, resourceId) { @@ -107,7 +107,7 @@ export function buildVoteLink(type, resourceId) { * Build the profile link for a resource on FluxerList. * * @param {"server"|"bot"} type - Resource type - * @param {string} resourceId - The server or bot slug + * @param {string} resourceId - The server or bot ID or slug * @returns {string} URL to the profile page on FluxerList */ export function buildProfileLink(type, resourceId) {