forked from PluralFlux/PluralFlux
fixed bug for import not sending help text, added help text if you type a unrecognized command
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user