From 80c9e17fd41123b17b336079707d3921342bc596 Mon Sep 17 00:00:00 2001 From: Robin Modisch Date: Sun, 17 Jan 2021 23:22:45 +0100 Subject: [PATCH] add apihelper.ENABLE_MIDDLEWARE = True to readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ef04483..eb1cc33 100644 --- a/README.md +++ b/README.md @@ -231,9 +231,11 @@ def test_callback(call): A middleware handler is a function that allows you to modify requests or the bot context as they pass through the Telegram to the bot. You can imagine middleware as a chain of logic connection handled before any other handlers are -executed. +executed. Middleware processing is disabled by default, enable it by setting `apihelper.ENABLE_MIDDLEWARE = True`. ```python +apihelper.ENABLE_MIDDLEWARE = True + @bot.middleware_handler(update_types=['message']) def modify_message(bot_instance, message): # modifying the message before it reaches any other handler