[AB-xxx] adding initial support for components v2

fixing issue with buttons which only provide an emoji
adding logging in case updating a starboard post goes wrong
This commit is contained in:
Sheldan
2025-07-13 19:44:40 +02:00
parent 7b7fdf781a
commit fa22009007
43 changed files with 901 additions and 260 deletions

View File

@@ -14,6 +14,7 @@ public class CachedAttachment implements Serializable {
private Long id;
private String proxyUrl;
private String fileName;
private String contentType;
private Boolean spoiler;
private Integer size;
private Integer height;

View File

@@ -8,10 +8,10 @@ import lombok.Setter;
@Setter
@Builder
public class MessageConfig {
private boolean allowsRoleMention;
private boolean allowsEveryoneMention;
private Boolean allowsRoleMention;
private Boolean allowsEveryoneMention;
@Builder.Default
private boolean allowsUserMention = true;
private Boolean allowsUserMention = true;
@Builder.Default
private boolean mentionsReferencedMessage = true;
private Boolean mentionsReferencedMessage = true;
}

View File

@@ -4,6 +4,7 @@ import dev.sheldan.abstracto.core.models.database.ComponentType;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import net.dv8tion.jda.api.components.MessageTopLevelComponent;
import net.dv8tion.jda.api.entities.MessageEmbed;
import net.dv8tion.jda.api.components.actionrow.ActionRow;
@@ -20,10 +21,16 @@ import java.util.Map;
@Builder
public class MessageToSend {
/**
* The collections of embeds to be send. The first embed is in the same message as the string message.
* The collections of embeds to send. The first embed is in the same message as the string message.
*/
@Builder.Default
private List<MessageEmbed> embeds = new ArrayList<>();
@Builder.Default
private List<MessageTopLevelComponent> components = new ArrayList<>();
@Builder.Default
private Boolean useComponentsV2 = false;
/**
* The string content to be used in the first message.
*/