Skip to content

Commit a0fc9cf

Browse files
committed
Use current time for suggestion embed timestamps
1 parent 4ce98c2 commit a0fc9cf

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎src/main/java/net/discordjug/javabot/systems/staff_commands/suggestions/AcceptSuggestionSubcommand.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import org.jetbrains.annotations.NotNull;
1616

17+
import java.time.Instant;
18+
1719
/**
1820
* Subcommand that lets staff members accept suggestions.
1921
*/
@@ -46,7 +48,7 @@ protected WebhookMessageCreateAction<Message> handleSuggestionCommand(@NotNull S
4648
.setAuthor(embed.getAuthor().getName(), embed.getAuthor().getUrl(), embed.getAuthor().getIconUrl())
4749
.setTitle("Suggestion Accepted")
4850
.setDescription(embed.getDescription())
49-
.setTimestamp(embed.getTimestamp())
51+
.setTimestamp(Instant.now())
5052
.setFooter("Accepted by " + UserUtils.getUserTag(user))
5153
.build();
5254
}

‎src/main/java/net/discordjug/javabot/systems/staff_commands/suggestions/DeclineSuggestionSubcommand.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
import org.jetbrains.annotations.NotNull;
1717

18+
import java.time.Instant;
19+
1820
/**
1921
* <h3>This class represents the /suggestion decline command.</h3>
2022
*/
@@ -48,7 +50,7 @@ protected WebhookMessageCreateAction<Message> handleSuggestionCommand(@NotNull S
4850
.setAuthor(embed.getAuthor().getName(), embed.getAuthor().getUrl(), embed.getAuthor().getIconUrl())
4951
.setTitle("Suggestion Declined")
5052
.setDescription(embed.getDescription())
51-
.setTimestamp(embed.getTimestamp())
53+
.setTimestamp(Instant.now())
5254
.setFooter("Declined by " + UserUtils.getUserTag(user));
5355
if (reason != null) builder.addField("Reason", reason, false);
5456
return builder.build();

‎src/main/java/net/discordjug/javabot/systems/staff_commands/suggestions/OnHoldSuggestionSubcommand.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import org.jetbrains.annotations.NotNull;
1616

17+
import java.time.Instant;
18+
1719
/**
1820
* <h3>This class represents the /suggestion on-hold command.</h3>
1921
*/
@@ -47,7 +49,7 @@ protected WebhookMessageCreateAction<Message> handleSuggestionCommand(@NotNull S
4749
.setAuthor(embed.getAuthor().getName(), embed.getAuthor().getUrl(), embed.getAuthor().getIconUrl())
4850
.setTitle("Suggestion On Hold")
4951
.setDescription(embed.getDescription())
50-
.setTimestamp(embed.getTimestamp())
52+
.setTimestamp(Instant.now())
5153
.setFooter("Suggestion marked as On Hold by " + UserUtils.getUserTag(user))
5254
.build();
5355
}

0 commit comments

Comments
 (0)