[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-05-29 21:35:08 +02:00
parent 15d41c58ef
commit 4a3d43b1b0
51 changed files with 934 additions and 291 deletions

View File

@@ -138,8 +138,12 @@ public abstract class StarboardListener {
protected void updateStarboardPost(CachedMessage message, AUserInAServer userReacting, boolean adding, StarboardPost starboardPost, List<AUserInAServer> userExceptAuthor) {
starboardPost.setIgnored(false);
// TODO handle futures correctly
starboardService.updateStarboardPost(starboardPost, message, userExceptAuthor);
starboardService.updateStarboardPost(starboardPost, message, userExceptAuthor)
.thenAccept(unused -> log.info("Updated starboard post."))
.exceptionally(throwable -> {
log.error("Failed to update starboard post.", throwable);
return null;
});
if(adding) {
log.debug("Adding reactor {} from message {}", userReacting.getUserReference().getId(), message.getMessageId());
starboardPostReactorManagementService.addReactor(starboardPost, userReacting);