Skip to content

Commit a85bf56

Browse files
committed
refactor: rename to firstImageAttachment
1 parent 64e0d2e commit a85bf56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

application/src/main/java/org/togetherjava/tjbot/features/basic/CoolMessagesBoardManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ private static MessageEmbed createQuoteEmbed(Message message) {
9292
EmbedBuilder embedBuilder = new EmbedBuilder();
9393

9494
// If the message contains image(s), include the first one
95-
var imageAttachment = message.getAttachments()
95+
var firstImageAttachment = message.getAttachments()
9696
.stream()
9797
.parallel()
9898
.filter(Message.Attachment::isImage)
9999
.findAny()
100100
.orElse(null);
101101

102-
if (imageAttachment != null) {
103-
embedBuilder.setThumbnail(imageAttachment.getUrl());
102+
if (firstImageAttachment != null) {
103+
embedBuilder.setThumbnail(firstImageAttachment.getUrl());
104104
}
105105

106106
return embedBuilder.setDescription(message.getContentDisplay())

0 commit comments

Comments
 (0)