mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-05 16:01:49 +00:00
added embed support fo message deleted and message edited
added attachment support for message deleted added imageUrl support to embed templating
This commit is contained in:
@@ -12,6 +12,7 @@ public class EmbedConfiguration {
|
||||
private EmbedColor color;
|
||||
private String description;
|
||||
private String thumbnail;
|
||||
private String imageUrl;
|
||||
private List<EmbedField> fields;
|
||||
private EmbedFooter footer;
|
||||
}
|
||||
|
||||
@@ -76,10 +76,14 @@ public class TemplateServiceBean implements TemplateService {
|
||||
if(footer != null) {
|
||||
builder.setFooter(footer.getText(), footer.getIcon());
|
||||
}
|
||||
configuration.getFields().forEach(embedField -> {
|
||||
Boolean inline = embedField.getInline() != null ? embedField.getInline() : Boolean.FALSE;
|
||||
builder.addField(embedField.getName(), embedField.getValue(), inline);
|
||||
});
|
||||
if(configuration.getFields() != null) {
|
||||
configuration.getFields().forEach(embedField -> {
|
||||
Boolean inline = embedField.getInline() != null ? embedField.getInline() : Boolean.FALSE;
|
||||
builder.addField(embedField.getName(), embedField.getValue(), inline);
|
||||
});
|
||||
}
|
||||
|
||||
builder.setImage(configuration.getImageUrl());
|
||||
|
||||
EmbedColor color = configuration.getColor();
|
||||
if(color != null) {
|
||||
|
||||
Reference in New Issue
Block a user