From 3c90bd04e01d7a0e4bbe7a0ec4d74b8f1f80876c Mon Sep 17 00:00:00 2001 From: Aster Fialla Date: Fri, 13 Feb 2026 21:30:22 -0500 Subject: [PATCH] added some cases to memberHelper for documentation and tweaked wording --- enums.js | 8 ++++---- helpers/memberHelper.js | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/enums.js b/enums.js index 080a906..df1b940 100644 --- a/enums.js +++ b/enums.js @@ -13,10 +13,10 @@ helperEnums.err = { helperEnums.help = { MEMBER: "You can shorten this command to `pf;m`. The available subcommands for `pf;member` are `add`, `remove`, `displayname`, and `proxy`. Add ` --help` to the end of a subcommand to find out more about it, or just send it without arguments.", - ADD: "Creates a new member to proxy with: `pf;member jane`. The member name should ideally be short so you can write other commands with it. \nYou can optionally add a display name after the member name: `pf;member new jane \"Jane Doe | ze/hir\"`. If it has spaces, put it in **double quotes**. The length limit is 32 characters.", - REMOVE: "Removes a member based on their name. `pf;member remove jane`.", - DISPLAYNAME: "Updates the display name for a specific member based on their name. `pf;member jane \"Jane Doe | ze/hir\"`.This can be up to 32 characters long. If it has spaces, put it in quotes.", - PROXY: "Updates the proxy tag for a specific member based on their name. `pf;member jane proxy Jane:`. This is put at **the start** of a message to allow it to be proxied. Proxies that wrap around text or go at the end are **not** currently supported." + ADD: "Creates a new member to proxy with, for example: `pf;member jane`. The member name should ideally be short so you can write other commands with it. \nYou can optionally add a display name after the member name, for example: `pf;member new jane \"Jane Doe | ze/hir\"`. If it has spaces, put it in **double quotes**. The length limit is 32 characters.", + REMOVE: "Removes a member based on their name, for example: `pf;member remove jane`.", + DISPLAYNAME: "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 quotes.", + PROXY: "Updates the proxy tag for a specific member based on their name, for example: `pf;member jane proxy Jane:` or `pf;member amal proxy A=:`. This is put at **the start** of a message to allow it to be proxied. Proxies that wrap around text or go at the end are **not** currently supported." } export const enums = helperEnums; \ No newline at end of file diff --git a/helpers/memberHelper.js b/helpers/memberHelper.js index 5f035a2..f7bab4b 100644 --- a/helpers/memberHelper.js +++ b/helpers/memberHelper.js @@ -12,9 +12,6 @@ const mh = {}; */ mh.parseMemberCommand = async function(authorId, args){ console.log(authorId, args); - if (!args) { - return enums.help.MEMBER; - } switch(args[0]) { case '--help': return enums.help.MEMBER; @@ -22,6 +19,12 @@ mh.parseMemberCommand = async function(authorId, args){ return addNewMember(authorId, args); case 'remove': return removeMember(authorId, args); + case 'displayname': + return enums.help.DISPLAYNAME; + case 'proxy': + return enums.help.PROXY; + case '': + return enums.help.MEMBER; } switch(args[1]) { case '--help':