diff --git a/aiogram/utils/executor.py b/aiogram/utils/executor.py index cc53ba6e..62e1cd1e 100644 --- a/aiogram/utils/executor.py +++ b/aiogram/utils/executor.py @@ -11,15 +11,15 @@ async def _startup(dispatcher: Dispatcher, skip_updates=False, callback=None): user = await dispatcher.bot.me log.info(f"Bot: {user.full_name} [@{user.username}]") - if callable(callback): - await callback(dispatcher) - if skip_updates: await dispatcher.reset_webhook(True) count = await dispatcher.skip_updates() if count: log.warning(f"Skipped {count} updates.") + if callable(callback): + await callback(dispatcher) + async def _wh_startup(app): callback = app.get('_startup_callback', None)