def run(self):
if ENV == "prod":
self._updater.start_webhook(listen='0.0.0.0', port=PORT,
url_path=TOKEN)
self._updater.bot.set_webhook(URL + TOKEN)
self._updater.idle()
else:
self._updater.start_polling(poll_interval=1)
文章目录