mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-28 08:38:52 +00:00
[AB-365] introducing slash commands for a selection of commands
adding method for pinning a message moving suggestion to correct deployment
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package dev.sheldan.abstracto.suggestion.config;
|
||||
|
||||
public class SuggestionSlashCommandNames {
|
||||
public static final String SUGGEST = "suggest";
|
||||
public static final String SUGGEST_PUBLIC = "suggestpublic";
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class Suggestion implements Serializable {
|
||||
|
||||
@Getter
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "command_channel_id")
|
||||
@JoinColumn(name = "command_channel_id", nullable = false)
|
||||
private AChannel commandChannel;
|
||||
|
||||
@Column(name = "command_message_id")
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
import net.dv8tion.jda.api.entities.User;
|
||||
|
||||
@Getter
|
||||
@@ -21,7 +20,7 @@ public class SuggestionLog {
|
||||
private Member member;
|
||||
private AUserInAServer suggesterUser;
|
||||
private String text;
|
||||
private Message message;
|
||||
private String attachmentURL;
|
||||
private String reason;
|
||||
private Long serverId;
|
||||
private Long originalChannelId;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package dev.sheldan.abstracto.suggestion.service;
|
||||
|
||||
import dev.sheldan.abstracto.core.models.ServerChannelMessageUser;
|
||||
import dev.sheldan.abstracto.core.models.ServerSpecificId;
|
||||
import dev.sheldan.abstracto.suggestion.model.database.Suggestion;
|
||||
import dev.sheldan.abstracto.suggestion.model.template.SuggestionInfoModel;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public interface SuggestionService {
|
||||
String SUGGESTION_REMINDER_DAYS_CONFIG_KEY = "suggestionReminderDays";
|
||||
CompletableFuture<Void> createSuggestionMessage(Message commandMessage, String text);
|
||||
CompletableFuture<Void> acceptSuggestion(Long suggestionId, Message commandMessage, String text);
|
||||
CompletableFuture<Void> vetoSuggestion(Long suggestionId, Message commandMessage, String text);
|
||||
CompletableFuture<Void> rejectSuggestion(Long suggestionId, Message commandMessage, String text);
|
||||
CompletableFuture<Void> createSuggestionMessage(ServerChannelMessageUser cause, String text, String attachmentURL);
|
||||
CompletableFuture<Void> acceptSuggestion(Long suggestionId, Member actingMember, String text);
|
||||
CompletableFuture<Void> vetoSuggestion(Long suggestionId, Member actingMember, String text);
|
||||
CompletableFuture<Void> rejectSuggestion(Long suggestionId, Member actingMember, String text);
|
||||
CompletableFuture<Void> removeSuggestion(Long suggestionId, Member member);
|
||||
void cleanUpSuggestions();
|
||||
CompletableFuture<Void> remindAboutSuggestion(ServerSpecificId suggestionId);
|
||||
|
||||
@@ -11,8 +11,8 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface SuggestionManagementService {
|
||||
Suggestion createSuggestion(Member suggester, String text, Message message, Long suggestionId, Message commandMessage);
|
||||
Suggestion createSuggestion(AUserInAServer suggester, String text, Message message, Long suggestionId, Message commandMessage);
|
||||
Suggestion createSuggestion(Member suggester, String text, Message message, Long suggestionId, Long suggestionChannelId, Long suggestionMessageId);
|
||||
Suggestion createSuggestion(AUserInAServer suggester, String text, Message message, Long suggestionId, Long suggestionChannelId, Long suggestionMessageId);
|
||||
Optional<Suggestion> getSuggestionOptional(Long serverId, Long suggestionId);
|
||||
Suggestion getSuggestion(Long serverId, Long suggestionId);
|
||||
void setSuggestionState(Suggestion suggestion, SuggestionState newState);
|
||||
|
||||
Reference in New Issue
Block a user