|
14 | 14 | import net.dv8tion.jda.api.interactions.commands.build.SubcommandData; |
15 | 15 | import net.dv8tion.jda.api.interactions.components.buttons.Button; |
16 | 16 | import net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle; |
| 17 | +import net.dv8tion.jda.api.utils.TimeFormat; |
17 | 18 | import net.javadiscord.javabot.annotations.AutoDetectableComponentHandler; |
18 | 19 | import net.javadiscord.javabot.data.config.BotConfig; |
19 | 20 | import net.javadiscord.javabot.data.config.GuildConfig; |
|
26 | 27 | import xyz.dynxsty.dih4jda.util.ComponentIdBuilder; |
27 | 28 |
|
28 | 29 | import java.awt.Color; |
| 30 | +import java.time.Instant; |
29 | 31 | import java.time.OffsetDateTime; |
30 | 32 | import java.util.List; |
31 | 33 | import java.util.Map; |
@@ -214,14 +216,18 @@ private void acknowledgeChangeAction(ButtonInteractionEvent event, boolean ackno |
214 | 216 | .stream() |
215 | 217 | .map(e->new EmbedBuilder(e) |
216 | 218 | .setColor(acknowledged ? Color.GRAY : Color.YELLOW) |
217 | | - .addField("marked as " + (acknowledged?"acknowledged":"needs help") + " by", |
218 | | - event.getUser().getAsMention(), false)) |
| 219 | + .addField("marked as " + (acknowledged?"acknowledged":"needs help"), |
| 220 | + "by " + event.getUser().getAsMention()+" at "+getCurrentFormattedTimestamp(), false)) |
219 | 221 | .map(this::removeOldField) |
220 | 222 | .map(EmbedBuilder::build) |
221 | 223 | .toList()) |
222 | 224 | .setActionRow(acknowledged?createUndoAcknowledgementButton():createAcknowledgementButton()) |
223 | 225 | .queue(); |
224 | 226 | } |
| 227 | + |
| 228 | + private String getCurrentFormattedTimestamp() { |
| 229 | + return TimeFormat.DATE_TIME_SHORT.format(Instant.now().toEpochMilli()); |
| 230 | + } |
225 | 231 |
|
226 | 232 | private String getForumTagText(ForumTag tag) { |
227 | 233 | EmojiUnion emoji = tag.getEmoji(); |
|
0 commit comments