mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-27 14:23:56 +00:00
added undo logic to mod mail logging
added some more logging when closing the mod mail thread
This commit is contained in:
@@ -14,11 +14,19 @@ public class UndoActionInstance {
|
||||
private List<Long> ids;
|
||||
private UndoAction action;
|
||||
|
||||
public static UndoActionInstance getChannelDeleteAction(Long channelId, Long serverId) {
|
||||
public static UndoActionInstance getChannelDeleteAction(Long serverId, Long channelId) {
|
||||
return UndoActionInstance
|
||||
.builder()
|
||||
.action(UndoAction.DELETE_CHANNEL)
|
||||
.ids(Arrays.asList(serverId, channelId))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UndoActionInstance getMessageDeleteAction(Long serverId, Long channelId, Long messageId) {
|
||||
return UndoActionInstance
|
||||
.builder()
|
||||
.action(UndoAction.DELETE_MESSAGE)
|
||||
.ids(Arrays.asList(serverId, channelId, messageId))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package dev.sheldan.abstracto.core.utils;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
public class CompletableFutureList<T> {
|
||||
private CompletableFuture<Void> mainFuture;
|
||||
private List<CompletableFuture<T>> futures;
|
||||
}
|
||||
Reference in New Issue
Block a user