@@ -16,7 +16,7 @@ export async function mentionEachUser(
16
16
roleToBeTaggedObj : MentionEachUserOptions ;
17
17
displayMessageObj ?: MentionEachUserOptions ;
18
18
channelId : number ;
19
- showroles ?: DevFlag ;
19
+ devtitle ?: DevFlag ;
20
20
dev ?: DevFlag ;
21
21
} ,
22
22
env : env ,
@@ -26,7 +26,7 @@ export async function mentionEachUser(
26
26
const roleId = transformedArgument . roleToBeTaggedObj . value ;
27
27
const msgToBeSent = transformedArgument ?. displayMessageObj ?. value ;
28
28
const dev = transformedArgument ?. dev ?. value || false ;
29
- const showroles = transformedArgument ?. showroles ?. value || false ;
29
+ const devtitle = transformedArgument ?. devtitle ?. value || false ;
30
30
// optional chaining here only because display message obj is optional argument
31
31
const usersWithMatchingRole = filterUserByRoles (
32
32
getMembersInServerResponse as UserArray [ ] ,
@@ -38,7 +38,8 @@ export async function mentionEachUser(
38
38
message : msgToBeSent ,
39
39
usersWithMatchingRole,
40
40
} ;
41
- if ( transformedArgument . showroles ?. value === true ) {
41
+
42
+ if ( transformedArgument . devtitle ?. value === true ) {
42
43
let responseMessage = "" ;
43
44
if ( usersWithMatchingRole . length === 0 ) {
44
45
responseMessage = `Sorry, no user found with <@&${ roleId } > role.` ;
@@ -50,7 +51,9 @@ export async function mentionEachUser(
50
51
responseMessage = `The users with <@&${ roleId } > role are ${ payload . usersWithMatchingRole } .` ;
51
52
}
52
53
return discordTextResponse ( responseMessage ) ;
53
- } else if ( ! dev || usersWithMatchingRole . length === 0 ) {
54
+ }
55
+
56
+ if ( ! dev || usersWithMatchingRole . length === 0 ) {
54
57
const responseData = checkDisplayType ( {
55
58
usersWithMatchingRole,
56
59
msgToBeSent,
0 commit comments