1
0
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:
InsanusMokrassar 2024-10-30 14:41:22 +06:00
parent e5bffa7c51
commit 6c9f1bc016

View File

@ -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 {