mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-07 00:30:50 +00:00
added purge command to delete messages via bulk delete
adapted api of status message service added concept of self destruct command results, these will cause the command message to be deleted
This commit is contained in:
@@ -114,6 +114,11 @@ public class TemplateServiceBean implements TemplateService {
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessageToSend renderTemplateToMessageToSend(String key, Object model) {
|
||||
return MessageToSend.builder().message(renderTemplate(key, model)).build();
|
||||
}
|
||||
|
||||
private void createFieldsForEmbed(List<EmbedBuilder> embedBuilders, EmbedConfiguration configuration) {
|
||||
for (int i = 0; i < configuration.getFields().size(); i++) {
|
||||
EmbedField field = configuration.getFields().get(i);
|
||||
|
||||
@@ -18,6 +18,14 @@ public interface TemplateService {
|
||||
*/
|
||||
MessageToSend renderEmbedTemplate(String key, Object model);
|
||||
|
||||
/**
|
||||
* Renders the given template directly into a {@link MessageToSend} but the template only represents a text message.
|
||||
* @param key The key of the string template to be rendered.
|
||||
* @param model The model used to render the template
|
||||
* @return A {@link MessageToSend} instance only containing the string property.
|
||||
*/
|
||||
MessageToSend renderTemplateToMessageToSend(String key, Object model);
|
||||
|
||||
/**
|
||||
* Renders the template identified by the key with the given {@link HashMap} used as model and returns the value as a string
|
||||
* @param key The key of the template to be rendered.
|
||||
|
||||
Reference in New Issue
Block a user