From 72ff444a2c769b6d5e8e7f3637d96d25e379b9fc Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 30 Jul 2023 00:07:42 +0300 Subject: [PATCH] Update a migration guide --- docs/migration_2_to_3.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/migration_2_to_3.rst b/docs/migration_2_to_3.rst index c21cd158..6fc90f7c 100644 --- a/docs/migration_2_to_3.rst +++ b/docs/migration_2_to_3.rst @@ -36,6 +36,10 @@ Dispatcher - Executor entirely removed, now you can use Dispatcher directly to start polling or webhook. - Throttling method is completely removed, now you can use middlewares to control the execution context and use any throttling mechanism you want. +- Removed global context variables from the API types, Bot and Dispatcher object, + from now if you want to get current bot instance inside handlers or filters you should + accept the argument :code:`bot: Bot` and use it instead of :code:`Bot.get_current()` + Inside middlewares it can be accessed via :code:`data["bot"]`. Filtering events