[AB-333] providing some dates as separate instants instead of relying on the member attributes

truncating date to day when displaying the date for export emote stats
fixing wrong message when confirming a command and adding missing exception handling
This commit is contained in:
Sheldan
2021-10-14 01:31:52 +02:00
parent 36ca9b11e4
commit 8909e8ebe5
10 changed files with 49 additions and 31 deletions

View File

@@ -425,6 +425,7 @@ public class ModMailThreadServiceBean implements ModMailThreadService {
.builder()
.member(member)
.latestModMailThread(latestThread)
.memberJoinDate(member.getTimeJoined().toInstant())
.pastModMailThreadCount((long)oldThreads.size())
.build();
List<CompletableFuture<Message>> messages = channelService.sendEmbedTemplateInTextChannelList("modmail_thread_header", header, channel);

View File

@@ -6,6 +6,8 @@ import lombok.Getter;
import lombok.Setter;
import net.dv8tion.jda.api.entities.Member;
import java.time.Instant;
/**
* This is the model used when a new mod mail thread is opened and a message containing some information about the user
* is displayed for the user handling the mod mail thread.
@@ -23,6 +25,7 @@ public class ModMailThreaderHeader {
* for the user
*/
private ModMailThread latestModMailThread;
private Instant memberJoinDate;
/**
* The amount of previous mod mail thread the user has.
*/