mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 22:59:48 +00:00
executes was replaced
This commit is contained in:
@@ -13,8 +13,8 @@ import io.ktor.utils.io.core.Closeable
|
||||
interface RequestsExecutor : Closeable {
|
||||
/**
|
||||
* Unsafe execution of incoming [request]. Can throw almost any exception. So, it is better to use
|
||||
* something like [com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.executeAsync] or
|
||||
* [com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.executeUnsafe]
|
||||
* something like [com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.shortcuts.executeAsync] or
|
||||
* [com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.shortcuts.executeUnsafe]
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@@ -7,7 +7,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.Response
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.handleSafely
|
||||
import kotlinx.coroutines.*
|
||||
|
||||
|
||||
@Deprecated("Will be removed in next major update")
|
||||
fun <T: Any> RequestsExecutor.executeAsync(
|
||||
request: Request<T>,
|
||||
onFail: (suspend (Response) -> Unit)? = null,
|
||||
@@ -24,6 +24,7 @@ fun <T: Any> RequestsExecutor.executeAsync(
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Replaced and modified inside of TelegramBotAPI-extensions-utils")
|
||||
fun <T: Any> RequestsExecutor.executeAsync(
|
||||
request: Request<T>,
|
||||
scope: CoroutineScope = GlobalScope
|
||||
@@ -31,6 +32,7 @@ fun <T: Any> RequestsExecutor.executeAsync(
|
||||
return scope.async { execute(request) }
|
||||
}
|
||||
|
||||
@Deprecated("Replaced and modified inside of TelegramBotAPI-extensions-utils")
|
||||
suspend fun <T: Any> RequestsExecutor.executeUnsafe(
|
||||
request: Request<T>,
|
||||
retries: Int = 0,
|
||||
|
Reference in New Issue
Block a user