[AB-277] adding report mechanism via reactions

This commit is contained in:
Sheldan
2021-05-30 21:00:49 +02:00
parent d69f597663
commit 55e0879e06
30 changed files with 714 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
package dev.sheldan.abstracto.core.models;
import dev.sheldan.abstracto.core.models.cache.CachedMessage;
import dev.sheldan.abstracto.core.utils.MessageUtils;
import lombok.Builder;
import lombok.Getter;
@@ -26,4 +27,13 @@ public class ServerChannelMessage {
.messageId(message.getIdLong())
.build();
}
public static ServerChannelMessage fromCachedMessage(CachedMessage cachedMessage) {
return ServerChannelMessage
.builder()
.serverId(cachedMessage.getServerId())
.channelId(cachedMessage.getChannelId())
.messageId(cachedMessage.getMessageId())
.build();
}
}

View File

@@ -43,6 +43,7 @@ public interface ChannelService {
CompletableFuture<Message> editTextMessageInAChannel(String text, MessageEmbed messageEmbed, MessageChannel channel, Long messageId);
List<CompletableFuture<Message>> editMessagesInAChannelFuture(MessageToSend messageToSend, MessageChannel channel, List<Long> messageIds);
CompletableFuture<Message> removeFieldFromMessage(MessageChannel channel, Long messageId, Integer index);
CompletableFuture<Message> editFieldValueInMessage(MessageChannel channel, Long messageId, Integer index, String newValue);
CompletableFuture<Message> removeFieldFromMessage(MessageChannel channel, Long messageId, Integer index, Integer embedIndex);
CompletableFuture<Void> deleteTextChannel(AChannel channel);
CompletableFuture<Void> deleteTextChannel(Long serverId, Long channelId);