From c2869fcf5a2b1b4abad10f2168a4fdcf8f7ec476 Mon Sep 17 00:00:00 2001 From: alexsuhor <76397241+alexsuhor@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:38:26 +0500 Subject: [PATCH] Update README.md should have to functions -> should have two functions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dc98ea5b..f545ccb50 100644 --- a/README.md +++ b/README.md @@ -374,7 +374,7 @@ class Middleware(BaseMiddleware): if exception: # check for exception print(exception) ``` -Class-based middleware should have to functions: post and pre process. +Class-based middleware should have two functions: post and pre process. So, as you can see, class-based middlewares work before and after handler execution. For more, check out in [examples](https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/middleware/class_based)