mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-25 05:57:06 +00:00
added ability to delete embedded posts (only the author and the person embedding can delete them) (this requires the embeds to be stored, they are deleted if the embed is deleted)
added filter to only handle reactions not done by the bot introduced completable future to the delete message wrapper fixed multi embed handling always resulting in two embeds added logging of template exceptions refactored link embed handling to be in a service instead of the listener
This commit is contained in:
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.security.auth.login.LoginException;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Service
|
||||
public interface Bot {
|
||||
@@ -18,7 +19,7 @@ public interface Bot {
|
||||
JDA getInstance();
|
||||
ServerChannelUser getServerChannelUser(Long serverId, Long channelId, Long userId);
|
||||
Member getMemberInServer(Long serverId, Long memberId);
|
||||
void deleteMessage(Long serverId, Long channelId, Long messageId);
|
||||
CompletableFuture<Void> deleteMessage(Long serverId, Long channelId, Long messageId);
|
||||
Optional<Emote> getEmote(Long serverId, AEmote emote);
|
||||
Optional<TextChannel> getTextChannelFromServer(Guild serverId, Long textChannelId);
|
||||
Optional<TextChannel> getTextChannelFromServer(Long serverId, Long textChannelId);
|
||||
|
||||
@@ -2,6 +2,9 @@ package dev.sheldan.abstracto.core.service;
|
||||
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public interface MessageService {
|
||||
void addReactionToMessage(String emoteKey, Long serverId, Message message);
|
||||
CompletableFuture<Void> deleteMessageInChannelInServer(Long serverId, Long channelId, Long messageId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user