mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-08 17:33:47 +00:00
get back default list of middlewares
This commit is contained in:
parent
e5bffa7c51
commit
6c9f1bc016
@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request
|
|||||||
|
|
||||||
@Warning("This API is experimental and subject of changes")
|
@Warning("This API is experimental and subject of changes")
|
||||||
class TelegramBotMiddlewaresPipelinesHandler(
|
class TelegramBotMiddlewaresPipelinesHandler(
|
||||||
private val middlewares: List<TelegramBotMiddleware> = listOf(ExceptionsThrottlerTelegramBotMiddleware())
|
private val middlewares: List<TelegramBotMiddleware> = emptyList()
|
||||||
) : TelegramBotPipelinesHandler {
|
) : TelegramBotPipelinesHandler {
|
||||||
override suspend fun <T : Any> onRequestException(request: Request<T>, t: Throwable): T? {
|
override suspend fun <T : Any> onRequestException(request: Request<T>, t: Throwable): T? {
|
||||||
return middlewares.firstNotNullOfOrNull {
|
return middlewares.firstNotNullOfOrNull {
|
||||||
|
Loading…
Reference in New Issue
Block a user