mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-15 20:16:34 +00:00
[AB-85] adding feature mode to automatically create a thread for suggestions
reworking post target service to function with optionals fixing trying to add reactions for suggestions if there was no message created not showing votes in case the buttons feature mode is active
This commit is contained in:
@@ -36,7 +36,8 @@ public class SuggestionFeatureConfig implements FeatureConfig {
|
||||
return Arrays.asList(
|
||||
SuggestionFeatureMode.SUGGESTION_REMINDER,
|
||||
SuggestionFeatureMode.SUGGESTION_BUTTONS,
|
||||
SuggestionFeatureMode.SUGGESTION_AUTO_EVALUATE);
|
||||
SuggestionFeatureMode.SUGGESTION_AUTO_EVALUATE,
|
||||
SuggestionFeatureMode.SUGGESTION_THREAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,10 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum SuggestionFeatureMode implements FeatureMode {
|
||||
SUGGESTION_REMINDER("suggestionReminder"), SUGGESTION_BUTTONS("suggestionButton"), SUGGESTION_AUTO_EVALUATE("suggestionAutoEvaluate");
|
||||
SUGGESTION_REMINDER("suggestionReminder"),
|
||||
SUGGESTION_BUTTONS("suggestionButton"),
|
||||
SUGGESTION_AUTO_EVALUATE("suggestionAutoEvaluate"),
|
||||
SUGGESTION_THREAD("suggestionThread");
|
||||
|
||||
private final String key;
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package dev.sheldan.abstracto.suggestion.model.template;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.User;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public class SuggestionThreadModel {
|
||||
private Long suggestionId;
|
||||
private User suggester;
|
||||
private Member member;
|
||||
private String text;
|
||||
private Long serverId;
|
||||
private Instant autoEvaluationTargetDate;
|
||||
private Boolean autoEvaluationEnabled;
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import net.dv8tion.jda.api.entities.User;
|
||||
public class SuggestionUpdateModel {
|
||||
private Long suggestionId;
|
||||
private SuggestionState state;
|
||||
private Boolean buttonsActive;
|
||||
private User suggester;
|
||||
private Member member;
|
||||
private String text;
|
||||
|
||||
Reference in New Issue
Block a user