forked from PluralFlux/PluralFlux
accidental error with memberHelper not allowing pf;member fixed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user