added some utility methods to bot service

reworked message cache to not be jda messages, but own objects: cachedMessages, jda messages should not be kept around
added listener to listen for message links, to represent them in an embed (or embeds)
added offsetDateTime handling for gson
introduced a way on how to handle async transaction handling for suggestions and message loading (self reference with another method with transactional)
added timestamp support to embeds
This commit is contained in:
Sheldan
2020-03-24 20:36:36 +01:00
parent 8cd9068cfc
commit 7d63f6b8af
43 changed files with 696 additions and 136 deletions

View File

@@ -3,6 +3,7 @@ package dev.sheldan.abstracto.templating.embed;
import lombok.Getter;
import lombok.Setter;
import java.time.OffsetDateTime;
import java.util.List;
@Getter @Setter
@@ -15,4 +16,5 @@ public class EmbedConfiguration {
private String imageUrl;
private List<EmbedField> fields;
private EmbedFooter footer;
private OffsetDateTime timeStamp;
}

View File

@@ -82,6 +82,7 @@ public class TemplateServiceBean implements TemplateService {
builder.addField(embedField.getName(), embedField.getValue(), inline);
});
}
builder.setTimestamp(configuration.getTimeStamp());
builder.setImage(configuration.getImageUrl());