mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +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")
|
||||
class TelegramBotMiddlewaresPipelinesHandler(
|
||||
private val middlewares: List<TelegramBotMiddleware> = listOf(ExceptionsThrottlerTelegramBotMiddleware())
|
||||
private val middlewares: List<TelegramBotMiddleware> = emptyList()
|
||||
) : TelegramBotPipelinesHandler {
|
||||
override suspend fun <T : Any> onRequestException(request: Request<T>, t: Throwable): T? {
|
||||
return middlewares.firstNotNullOfOrNull {
|
||||
|
Loading…
Reference in New Issue
Block a user