@@ -55,9 +55,8 @@ public void onMessageReceived(MessageReceivedEvent event) {
5555 /**
5656 * Checks whether the given message has no media attached.
5757 * <p>
58- * A message is considered to have media if it contains attachments, embeds,
59- * or a URL in its text content. For forwarded messages, the snapshots are also
60- * checked for media.
58+ * A message is considered to have media if it contains attachments, embeds, or a URL in its
59+ * text content. For forwarded messages, the snapshots are also checked for media.
6160 *
6261 * @param message the message to check
6362 * @return {@code true} if the message has no media, {@code false} otherwise
@@ -67,24 +66,25 @@ private boolean messageHasNoMediaAttached(Message message) {
6766 return false ;
6867 }
6968
70- return message .getMessageSnapshots ().stream ().noneMatch (snapshot ->
71- hasMedia (snapshot .getAttachments (), snapshot .getEmbeds (), snapshot .getContentRaw ()));
69+ return message .getMessageSnapshots ()
70+ .stream ()
71+ .noneMatch (snapshot -> hasMedia (snapshot .getAttachments (), snapshot .getEmbeds (),
72+ snapshot .getContentRaw ()));
7273 }
74+
7375 /**
7476 * Checks whether the given content contains any media.
7577 * <p>
76- * Media is considered present if there are attachments, embeds,
77- * or a URL (identified by {@code "http"}) in the text content.
78+ * Media is considered present if there are attachments, embeds, or a URL (identified by
79+ * {@code "http"}) in the text content.
7880 *
7981 * @param attachments the attachments of the message or snapshot
8082 * @param embeds the embeds of the message or snapshot
8183 * @param content the raw text content of the message or snapshot
8284 */
83- private boolean hasMedia (List <Message .Attachment > attachments ,
84- List <MessageEmbed > embeds , String content ) {
85- return !attachments .isEmpty ()
86- || !embeds .isEmpty ()
87- || content .contains ("http" );
85+ private boolean hasMedia (List <Message .Attachment > attachments , List <MessageEmbed > embeds ,
86+ String content ) {
87+ return !attachments .isEmpty () || !embeds .isEmpty () || content .contains ("http" );
8888 }
8989
9090 private MessageCreateData createNotificationMessage (Message message ) {
0 commit comments