Back to Python Telegram Bot

Application

docs/substitutions/application.rst

22.7403 B
Original Source

.. |app_run_shutdown| replace:: The app will shut down when :exc:KeyboardInterrupt or :exc:SystemExit is raised. This also works from within handlers, error handlers and jobs. However, using :meth:~telegram.ext.Application.stop_running will give a somewhat cleaner shutdown behavior than manually raising those exceptions. On unix, the app will also shut down on receiving the signals specified by