diff --git a/CHANGELOG.md b/CHANGELOG.md index 958b0211d3..1175042bb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ must be regular text ### 0.9.2 +* `RequestsExecutor#executeAsync(Request, CoroutineScope)` now will return `Deferred` for cases when you need result + ### 0.8.5 * Add extension `String#toMarkdown` diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/RequestsExecutor.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/RequestsExecutor.kt index 5d9165a40c..564517415f 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/RequestsExecutor.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/RequestsExecutor.kt @@ -164,7 +164,7 @@ fun RequestsExecutor.executeAsync( fun RequestsExecutor.executeAsync( request: Request, scope: CoroutineScope = GlobalScope -): Job { +): Deferred { return scope.async { execute(request) } }