From c4c6ad0fddc4c25d35787f2e88dc980455e95137 Mon Sep 17 00:00:00 2001 From: Aster Fialla Date: Thu, 19 Feb 2026 19:31:18 -0500 Subject: [PATCH] fixed bug for import not sending help text, added help text if you type a unrecognized command --- src/bot.js | 3 +++ src/commands.js | 5 +++-- src/enums.js | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bot.js b/src/bot.js index b07058d..7a81c6c 100644 --- a/src/bot.js +++ b/src/bot.js @@ -44,6 +44,9 @@ client.on(Events.MessageCreate, async (message) => { throw e }); } + else { + await message.reply("Command not recognized. Try typing `pf;help` for command list."); + } } catch(error) { console.error(error); diff --git a/src/commands.js b/src/commands.js index 469314c..bdfd9ce 100644 --- a/src/commands.js +++ b/src/commands.js @@ -45,8 +45,9 @@ cmds.set('help', { cmds.set('import', { description: enums.help.SHORT_DESC_IMPORT, - async execute(message) { - if (message.content.includes('--help')) { + async execute(message, client, args) { + console.log(args); + if (message.content.includes('--help') || (args[0] === '' && args.length === 1)) { return await message.reply(enums.help.IMPORT); } const attachmentUrl = message.attachments.size > 0 ? message.attachments.first().url : null; diff --git a/src/enums.js b/src/enums.js index 7a58d17..0cc2888 100644 --- a/src/enums.js +++ b/src/enums.js @@ -34,9 +34,9 @@ helperEnums.help = { LIST: "Lists members in the system. Currently only lists the first 25.", NAME: "Updates the name for a specific member based on their current name, for ex: `pf;member john name jane`. The member name should ideally be short so you can write other commands with it easily.", DISPLAY_NAME: "Updates the display name for a specific member based on their name, for example: `pf;member jane \"Jane Doe | ze/hir\"`.This can be up to 32 characters long. If it has spaces, put it in __double quotes__.", - PROXY: "Updates the proxy tag for a specific member based on their name. The proxy must be formatted with the tags surrounding the word 'text', for example: `pf;member jane proxy Jane:text` or `pf;member amal proxy [text]` This is so the bot can detect what the proxy tags are. Only one proxy can be set per member currently.", + PROXY: "Updates the proxy tag for a specific member based on their name. The proxy must be formatted with the tags surrounding the word 'text', for example: `pf;member jane proxy Jane:text` or `pf;member amal proxy [text]` This is so the bot can detect what the proxy tags are. **Only one proxy can be set per member currently.**", PROPIC: "Updates the profile picture for the member. Must be in JPG, PNG, or WEBP format and less than 10MB. The two options are:\n1. Pass in a direct remote image URL, for example: `pf;member jane propic https://cdn.pixabay.com/photo/2020/05/02/02/54/animal-5119676_1280.jpg`. You can upload images on sites like https://imgbb.com/.\n2. Upload an attachment directly.\n\n**NOTE:** Fluxer does not save your attachments forever, so option #1 is recommended.", - IMPORT: "Imports from PluralKit using the JSON file provided by their export command. Importing from other proxy bots is TBD. `pf;import` and attach your JSON file to the message. This will only save the fields that are present in the bot currently, not anything else like birthdays or system handles (yet?)." + IMPORT: "Imports from PluralKit using the JSON file provided by their export command. Importing from other proxy bots is TBD. `pf;import` and attach your JSON file to the message. This will only save the fields that are present in the bot currently, not anything else like birthdays or system handles (yet?). **Only one proxy can be set per member currently.**" } helperEnums.misc = {