[AB-242] refactoring suggestions

adding veto and unsuggest command
adding support for configuration whether or not a reply mentions the message
adding support to reply to a message via template
changed default mention config to exclude role mentions
This commit is contained in:
Sheldan
2021-04-29 01:00:27 +02:00
parent dec398c3f1
commit 020cc58c4a
38 changed files with 524 additions and 243 deletions

View File

@@ -21,8 +21,8 @@ public interface ChannelService {
CompletableFuture<Message> sendEmbedToAChannel(MessageEmbed embed, AChannel channel);
CompletableFuture<Message> sendEmbedToChannel(MessageEmbed embed, MessageChannel channel);
MessageAction sendEmbedToChannelInComplete(MessageEmbed embed, MessageChannel channel);
List<CompletableFuture<Message>> sendMessageToSendToAChannel(MessageToSend messageToSend, AChannel channel);
CompletableFuture<Message> sendMessageToSendToAChannel(MessageToSend messageToSend, AChannel channel, Integer embedIndex);
List<CompletableFuture<Message>> sendMessageEmbedToSendToAChannel(MessageToSend messageToSend, AChannel channel);
CompletableFuture<Message> sendMessageEmbedToSendToAChannel(MessageToSend messageToSend, AChannel channel, Integer embedIndex);
CompletableFuture<Message> retrieveMessageInChannel(Long serverId, Long channelId, Long messageId);
CompletableFuture<Message> retrieveMessageInChannel(MessageChannel channel, Long messageId);

View File

@@ -12,4 +12,6 @@ public class MessageConfig {
private boolean allowsEveryoneMention;
@Builder.Default
private boolean allowsUserMention = true;
@Builder.Default
private boolean mentionsReferencedMessage = true;
}

View File

@@ -30,6 +30,7 @@ public class MessageToSend {
*/
private File fileToSend;
private MessageConfig messageConfig;
private Long referencedMessageId;
public boolean hasFileToSend() {
return fileToSend != null;