From 4a4eb51bd407c2591d12ee265e9e4c1bd356ac1d Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 20 Feb 2022 17:11:04 +0200 Subject: [PATCH] Changed skip updates method (#842) --- aiogram/dispatcher/dispatcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 5b3cafd3..7abe1d8d 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -216,11 +216,11 @@ class Dispatcher(DataMixin, ContextInstanceMixin): async def skip_updates(self): """ You can skip old incoming updates from queue. - This method is not recommended to use if you use payments or you bot has high-load. + This method is not recommended for using in production. - :return: None + Note that the webhook will be deleted! """ - await self.bot.get_updates(offset=-1, timeout=1) + await self.bot.delete_webhook(drop_pending_updates=True) async def process_updates(self, updates, fast: bool = True): """