some refactoring
This commit is contained in:
@@ -19,6 +19,8 @@ public interface TelegramBot {
|
||||
|
||||
File awaitDownloadFile(TelegramFile telegramFile, Path targetDirectory);
|
||||
|
||||
void shutdown();
|
||||
|
||||
default CompletableFuture<File> downloadFile(TelegramFile telegramFile, Path targetDirectory) throws TelegramApiException, TelegramApiNetworkException {
|
||||
return CompletableFuture.supplyAsync(() -> awaitDownloadFile(telegramFile, targetDirectory));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user