From 7ce25d1630a2309e04f14599ddd5873345eb12de Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 19 Feb 2022 14:11:44 +0200 Subject: [PATCH] Changed skip updates method --- 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): """