Make run deleteWebhook even if polling assumed

This commit is contained in:
Ilya Bezrukov 2024-07-30 18:01:08 +03:00
parent 4ac6be06cf
commit c309d4975e

View File

@ -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)