@@ -16,7 +16,7 @@ export async function mentionEachUser(
1616 roleToBeTaggedObj : MentionEachUserOptions ;
1717 displayMessageObj ?: MentionEachUserOptions ;
1818 channelId : number ;
19- showroles ?: DevFlag ;
19+ devtitle ?: DevFlag ;
2020 dev ?: DevFlag ;
2121 } ,
2222 env : env ,
@@ -26,7 +26,7 @@ export async function mentionEachUser(
2626 const roleId = transformedArgument . roleToBeTaggedObj . value ;
2727 const msgToBeSent = transformedArgument ?. displayMessageObj ?. value ;
2828 const dev = transformedArgument ?. dev ?. value || false ;
29- const showroles = transformedArgument ?. showroles ?. value || false ;
29+ const devtitle = transformedArgument ?. devtitle ?. value || false ;
3030 // optional chaining here only because display message obj is optional argument
3131 const usersWithMatchingRole = filterUserByRoles (
3232 getMembersInServerResponse as UserArray [ ] ,
@@ -38,7 +38,8 @@ export async function mentionEachUser(
3838 message : msgToBeSent ,
3939 usersWithMatchingRole,
4040 } ;
41- if ( transformedArgument . showroles ?. value === true ) {
41+
42+ if ( transformedArgument . devtitle ?. value === true ) {
4243 let responseMessage = "" ;
4344 if ( usersWithMatchingRole . length === 0 ) {
4445 responseMessage = `Sorry, no user found with <@&${ roleId } > role.` ;
@@ -50,7 +51,9 @@ export async function mentionEachUser(
5051 responseMessage = `The users with <@&${ roleId } > role are ${ payload . usersWithMatchingRole } .` ;
5152 }
5253 return discordTextResponse ( responseMessage ) ;
53- } else if ( ! dev || usersWithMatchingRole . length === 0 ) {
54+ }
55+
56+ if ( ! dev || usersWithMatchingRole . length === 0 ) {
5457 const responseData = checkDisplayType ( {
5558 usersWithMatchingRole,
5659 msgToBeSent,
0 commit comments