Skip to content

Commit 95c3847

Browse files
committed
relative timestamps in /help ping
1 parent a857eda commit 95c3847

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/net/javadiscord/javabot/listener/HugListener.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package net.javadiscord.javabot.listener;
22

33
import lombok.RequiredArgsConstructor;
4-
import net.dv8tion.jda.api.entities.Message;
5-
import net.dv8tion.jda.api.entities.Webhook;
64
import net.dv8tion.jda.api.entities.channel.ChannelType;
75
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
86
import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildChannel;

src/main/java/net/javadiscord/javabot/systems/help/commands/HelpPingSubcommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ private void acknowledgeChangeAction(ButtonInteractionEvent event, boolean ackno
217217
.map(e->new EmbedBuilder(e)
218218
.setColor(acknowledged ? Color.GRAY : Color.YELLOW)
219219
.addField("marked as " + (acknowledged?"acknowledged":"needs help"),
220-
"by " + event.getUser().getAsMention()+" at "+getCurrentFormattedTimestamp(), false))
220+
"by " + event.getUser().getAsMention()+" "+getCurrentFormattedTimestamp(), false))
221221
.map(this::removeOldField)
222222
.map(EmbedBuilder::build)
223223
.toList())
@@ -226,7 +226,7 @@ private void acknowledgeChangeAction(ButtonInteractionEvent event, boolean ackno
226226
}
227227

228228
private String getCurrentFormattedTimestamp() {
229-
return TimeFormat.DATE_TIME_SHORT.format(Instant.now().toEpochMilli());
229+
return TimeFormat.RELATIVE.format(Instant.now().toEpochMilli());
230230
}
231231

232232
private String getForumTagText(ForumTag tag) {

0 commit comments

Comments
 (0)