diff --git a/mybot/__init__.py b/mybot/__init__.py index 35555ee..460229a 100644 --- a/mybot/__init__.py +++ b/mybot/__init__.py @@ -23,8 +23,8 @@ def create_bot(config: Config, i18n: I18N, engine): register_handlers(bot) setup_middlewares(bot, i18n, engine) add_custom_filters(bot, config) + bot.delete_webhook() if config.use_webhook: - bot.delete_webhook() bot.set_webhook(config.webhook.url, drop_pending_updates=config.webhook.drop_pending_updates, max_connections=config.webhook.max_connections)