mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-16 12:28:03 +00:00
[AB-139] changing the places at which there might be an uncached member object
fixing integer validator fixing syncing roles not working if the role did not change in the database fixing warn id being flipped fixing star stats model
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package dev.sheldan.abstracto.moderation.models.template.commands;
|
||||
|
||||
import dev.sheldan.abstracto.core.models.context.UserInitiatedServerContext;
|
||||
import dev.sheldan.abstracto.core.models.context.SlimUserInitiatedServerContext;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
@Getter
|
||||
@Setter
|
||||
@SuperBuilder
|
||||
public class WarningsModel extends UserInitiatedServerContext {
|
||||
public class WarningsModel extends SlimUserInitiatedServerContext {
|
||||
/**
|
||||
* A collection of {@link dev.sheldan.abstracto.moderation.models.database.Warning}s being rendered, might be all warnings of the server, or only the warnings of a specific user
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public interface MuteService {
|
||||
CompletableFuture<Void> muteMember(Member memberToMute, Member userMuting, String reason, Instant unMuteDate, ServerChannelMessage message);
|
||||
CompletableFuture<Void> muteAUserInAServer(AUserInAServer member, AUserInAServer userMuting, String reason, Instant unMuteDate, ServerChannelMessage message);
|
||||
CompletableFuture<Void> muteUserInServer(FullUserInServer userToMute, FullUserInServer userMuting, String reason, Instant unMuteDate, ServerChannelMessage message);
|
||||
CompletableFuture<Void> applyMuteRole(AUserInAServer aUserInAServer);
|
||||
CompletableFuture<Void> muteMemberWithLog(MuteContext context);
|
||||
|
||||
@@ -31,7 +31,8 @@ public interface MuteManagementService {
|
||||
* @param muteId The id of the mute to search for
|
||||
* @return An optional containing a {@link Mute} if the ID exists, and null otherwise
|
||||
*/
|
||||
Optional<Mute> findMute(Long muteId, Long serverId);
|
||||
Optional<Mute> findMuteOptional(Long muteId, Long serverId);
|
||||
Mute findMute(Long muteId, Long serverId);
|
||||
|
||||
/**
|
||||
* Saves the given mute to the database.
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.List;
|
||||
public interface UserNoteManagementService {
|
||||
UserNote createUserNote(AUserInAServer aUserInAServer, String note);
|
||||
void deleteNote(Long id, AServer server);
|
||||
UserNote loadNote(Long userNoteId, Long serverId);
|
||||
boolean noteExists(Long id, AServer server);
|
||||
List<UserNote> loadNotesForUser(AUserInAServer aUserInAServer);
|
||||
List<UserNote> loadNotesForServer(AServer server);
|
||||
|
||||
@@ -15,6 +15,7 @@ public interface WarnManagementService {
|
||||
List<Warning> getAllWarnsForUser(AUserInAServer aUserInAServer);
|
||||
List<Warning> getAllWarningsOfServer(AServer server);
|
||||
Long getActiveWarnsForUser(AUserInAServer aUserInAServer);
|
||||
Optional<Warning> findById(Long id, Long serverId);
|
||||
Optional<Warning> findByIdOptional(Long id, Long serverId);
|
||||
Warning findById(Long id, Long serverId);
|
||||
void deleteWarning(Warning warn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user