accidental error with memberHelper not allowing pf;member fixed

This commit is contained in:
Aster Fialla
2026-02-22 11:52:51 -05:00
parent eb7340faf7
commit fa4ca779ee
2 changed files with 4 additions and 0 deletions

View File

@@ -25,6 +25,9 @@ const commandList = ['--help', 'new', 'remove', 'name', 'list', 'displayName', '
* @throws {Error}
*/
mh.parseMemberCommand = async function (authorId, authorFull, args, attachmentUrl = null, attachmentExpiration = null) {
if (!args[0]) {
return mh.getMemberCommandInfo();
}
const memberName = !commandList.includes(args[0]) ? args[0] : args[1];
// checks whether command is in list, otherwise assumes it's a name

View File

@@ -98,6 +98,7 @@ describe('MemberHelper', () => {
test.each([
[['--help']],
[['']],
[[]]
])('%s calls getMemberCommandInfo and returns expected result', async (args) => {
// Act
return memberHelper.parseMemberCommand(authorId, authorFull, args).then((result) => {