Skip to content

Commit

Permalink
Only show if there is more than one user matched
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Dec 15, 2023
1 parent be09543 commit 9a6ec9f
Showing 1 changed file with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ class DailyCheckCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrap

context.reply(true) {
content = buildString {
appendLine("**Resumo do Loritta Client IDs:**")
for (matchedSameClientId in matchedSameClientIds) {
appendLine("- **${matchedSameClientId.key}:** ${matchedSameClientId.value.joinToString()}")
val moreThanOneUsersMatches = matchedSameClientIds.filter { it.value.size > 1 }
if (moreThanOneUsersMatches.isNotEmpty()) {
appendLine("**Loritta Client IDs com múltiplos users:**")
for (matchedSameClientId in moreThanOneUsersMatches) {
appendLine("- **${matchedSameClientId.key}:** ${matchedSameClientId.value.joinToString()}")
}
}
}

Expand Down Expand Up @@ -213,9 +216,12 @@ class DailyCheckCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrap
for (userId in foundIds) {
appendLine("- $userId")
}
appendLine("**Resumo do Loritta Client IDs:**")
for (matchedSameClientId in matchedSameClientIds) {
appendLine("- **${matchedSameClientId.key}:** ${matchedSameClientId.value.joinToString()}")
val moreThanOneUsersMatches = matchedSameClientIds.filter { it.value.size > 1 }
if (moreThanOneUsersMatches.isNotEmpty()) {
appendLine("**Loritta Client IDs com múltiplos users:**")
for (matchedSameClientId in moreThanOneUsersMatches) {
appendLine("- **${matchedSameClientId.key}:** ${matchedSameClientId.value.joinToString()}")
}
}
}

Expand Down Expand Up @@ -319,9 +325,12 @@ class DailyCheckCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrap
for (userId in foundIds) {
appendLine("- $userId")
}
appendLine("**Resumo do Loritta Client IDs:**")
for (matchedSameClientId in matchedSameClientIds) {
appendLine("- **${matchedSameClientId.key}:** ${matchedSameClientId.value.joinToString()}")
val moreThanOneUsersMatches = matchedSameClientIds.filter { it.value.size > 1 }
if (moreThanOneUsersMatches.isNotEmpty()) {
appendLine("**Loritta Client IDs com múltiplos users:**")
for (matchedSameClientId in moreThanOneUsersMatches) {
appendLine("- **${matchedSameClientId.key}:** ${matchedSameClientId.value.joinToString()}")
}
}
}

Expand Down

0 comments on commit 9a6ec9f

Please sign in to comment.