Relative Content

Tag Archive for pythonloggingerror-handlingpython-telegram-botapscheduler

How to handle errors in Python Telegram Bot from other modules?

I am using PTB with job queue – aka apscheduler. I have set up a custom error handler for the bot itself to send the error info to a specific channel, however, I am also logging errors from apscheduler and would like those errors to be sent to the same channel. How do I go about doing that? I have tried using the logging module to create a custom handler, but was unable to figure out how to have the error info sent using telegram.