Skip to content

Commit ba086c3

Browse files
committed
ux improvements for the text
1 parent 6220219 commit ba086c3

File tree

1 file changed

+3
-2
lines changed
  • application/src/main/java/org/togetherjava/tjbot/features/moderation/scam

1 file changed

+3
-2
lines changed

application/src/main/java/org/togetherjava/tjbot/features/moderation/scam/ScamBlocker.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,9 @@ private void reportScamMessage(MessageReceivedEvent event, String reportTitle,
255255
String attachmentInfo = attachments.stream()
256256
.map(Message.Attachment::getFileName)
257257
.collect(Collectors.joining(", "));
258-
content += (content.isEmpty() ? "" : " ") + "and " + attachments.size() + " attachment"
259-
+ (attachments.size() > 1 ? "s " : " ") + "(" + attachmentInfo + ")";
258+
content += "%s(The message has %d attachment%s: %s)".formatted(
259+
content.isBlank() ? "" : "\n", attachments.size(),
260+
attachments.size() > 1 ? "s " : " ", attachmentInfo);
260261
}
261262
MessageEmbed embed = new EmbedBuilder().setDescription(content)
262263
.setTitle(reportTitle)

0 commit comments

Comments
 (0)