From 7b19538b5af201bfd3e6749e7c1a99d7df69e9ae Mon Sep 17 00:00:00 2001 From: christolis Date: Tue, 29 Oct 2024 21:49:12 +0200 Subject: [PATCH] feat(cool-message): forward messages instead of using embed For this feature, the version of JDA had to be bumped to 5.1.2 --- application/build.gradle | 2 +- .../tjbot/features/basic/CoolMessagesBoardManager.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/application/build.gradle b/application/build.gradle index 08282a6890..bbd4f804d4 100644 --- a/application/build.gradle +++ b/application/build.gradle @@ -46,7 +46,7 @@ dependencies { implementation project(':utils') implementation project(':formatter') - implementation 'net.dv8tion:JDA:5.1.0' + implementation 'net.dv8tion:JDA:5.1.2' implementation 'org.apache.logging.log4j:log4j-core:2.23.0' runtimeOnly 'org.apache.logging.log4j:log4j-slf4j18-impl:2.18.0' diff --git a/application/src/main/java/org/togetherjava/tjbot/features/basic/CoolMessagesBoardManager.java b/application/src/main/java/org/togetherjava/tjbot/features/basic/CoolMessagesBoardManager.java index 86a1a42e18..12725cd7ea 100644 --- a/application/src/main/java/org/togetherjava/tjbot/features/basic/CoolMessagesBoardManager.java +++ b/application/src/main/java/org/togetherjava/tjbot/features/basic/CoolMessagesBoardManager.java @@ -18,7 +18,6 @@ import org.togetherjava.tjbot.features.MessageReceiverAdapter; import java.awt.Color; -import java.util.Collections; import java.util.Optional; import java.util.function.Predicate; import java.util.regex.Pattern; @@ -96,7 +95,7 @@ private Optional getBoardChannel(JDA jda, long guildId) { */ private static MessageCreateAction insertCoolMessage(TextChannel boardChannel, Message message) { - return boardChannel.sendMessageEmbeds(Collections.singleton(createQuoteEmbed(message))); + return message.forwardTo(boardChannel); } /**