mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-24 13:44:33 +00:00
[AB-234] allow templates have individual (additional) allowed mention configurations
adding primary keys to command disabled and command cooldown group exposing service method to retrieve the channel for a post target
This commit is contained in:
@@ -3,11 +3,11 @@ package dev.sheldan.abstracto.core.service;
|
||||
import dev.sheldan.abstracto.core.models.database.AllowedMention;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public interface AllowedMentionService {
|
||||
boolean allMentionsAllowed(Long serverId);
|
||||
List<Message.MentionType> getAllowedMentionTypesForServer(Long serverId);
|
||||
Set<Message.MentionType> getAllowedMentionTypesForServer(Long serverId);
|
||||
void allowMentionForServer(Message.MentionType mentionType, Long serverId);
|
||||
void disAllowMentionForServer(Message.MentionType mentionType, Long serverId);
|
||||
AllowedMention getDefaultAllowedMention();
|
||||
|
||||
@@ -25,6 +25,7 @@ public interface PostTargetService {
|
||||
List<CompletableFuture<Message>> editOrCreatedInPostTarget(Long messageId, MessageToSend messageToSend, PostTargetEnum postTarget, Long serverId);
|
||||
void throwIfPostTargetIsNotDefined(PostTargetEnum name, Long serverId);
|
||||
boolean postTargetDefinedInServer(PostTargetEnum name, Long serverId);
|
||||
PostTarget getPostTarget(PostTargetEnum postTargetName, Long serverId);
|
||||
boolean validPostTarget(String name);
|
||||
List<PostTarget> getPostTargets(AServer server);
|
||||
List<String> getAvailablePostTargets();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package dev.sheldan.abstracto.core.templating.model;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
public class MessageConfig {
|
||||
private boolean allowsRoleMention;
|
||||
private boolean allowsEveryoneMention;
|
||||
@Builder.Default
|
||||
private boolean allowsUserMention = true;
|
||||
}
|
||||
@@ -29,6 +29,7 @@ public class MessageToSend {
|
||||
* The file handle to send attached to the message.
|
||||
*/
|
||||
private File fileToSend;
|
||||
private MessageConfig messageConfig;
|
||||
|
||||
public boolean hasFileToSend() {
|
||||
return fileToSend != null;
|
||||
|
||||
Reference in New Issue
Block a user