fixed some catch blocks to include all exceptions

fixed message sending undo action
This commit is contained in:
Sheldan
2020-05-09 01:32:09 +02:00
parent 0e7add826b
commit 8db1cead57
5 changed files with 23 additions and 5 deletions

View File

@@ -22,11 +22,11 @@ public class UndoActionInstance {
.build();
}
public static UndoActionInstance getMessageDeleteAction(Long serverId, Long channelId, Long messageId) {
public static UndoActionInstance getMessageDeleteAction(Long channelId, Long messageId) {
return UndoActionInstance
.builder()
.action(UndoAction.DELETE_MESSAGE)
.ids(Arrays.asList(serverId, channelId, messageId))
.ids(Arrays.asList(channelId, messageId))
.build();
}
}

View File

@@ -24,6 +24,7 @@ public interface BotService {
Member getMemberInServer(AUserInAServer aUserInAServer);
Member getMemberInServer(AServer server, AUser member);
CompletableFuture<Void> deleteMessage(Long serverId, Long channelId, Long messageId);
CompletableFuture<Void> deleteMessage(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);