Add support for sending view once messages

Closes #1812
This commit is contained in:
AsamK 2025-07-14 16:42:06 +02:00
parent c924d5c03a
commit 7c7fc76a64
8 changed files with 21 additions and 0 deletions

View file

@ -6,6 +6,7 @@ import java.util.Optional;
public record Message(
String messageText,
List<String> attachments,
boolean viewOnce,
List<Mention> mentions,
Optional<Quote> quote,
Optional<Sticker> sticker,

View file

@ -810,6 +810,7 @@ public class ManagerImpl implements Manager {
} else if (!additionalAttachments.isEmpty()) {
messageBuilder.withAttachments(additionalAttachments);
}
messageBuilder.withViewOnce(message.viewOnce());
if (!message.mentions().isEmpty()) {
messageBuilder.withMentions(resolveMentions(message.mentions()));
}