File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export async function mentionEachUser(
2727 const msgToBeSent = transformedArgument ?. displayMessageObj ?. value ;
2828 const dev = transformedArgument ?. dev ?. value || false ;
2929 const showroles = transformedArgument ?. showroles ?. value || false ;
30+ // optional chaining here only because display message obj is optional argument
3031 const usersWithMatchingRole = filterUserByRoles (
3132 getMembersInServerResponse as UserArray [ ] ,
3233 roleId
@@ -50,6 +51,7 @@ export async function mentionEachUser(
5051 }
5152 return discordTextResponse ( responseMessage ) ;
5253 } else if ( ! dev || usersWithMatchingRole . length === 0 ) {
54+ if ( ! dev || usersWithMatchingRole . length === 0 ) {
5355 const responseData = checkDisplayType ( {
5456 usersWithMatchingRole,
5557 msgToBeSent,
You can’t perform that action at this time.
0 commit comments