I already have a script which checks my gmail inbox and twits the certain mails at certain intervals, for this i use a while True
loop to have it run infinitely.
When i want to apply the same thing into a Telegram bot:
bot.polling()
takes precedence over while True
loop, or the the other way around. How to keep my while True
loop running in a Telegram bot while the other functions of the bot without being interrupted?
No answer came in as yet, however i found a transient solution. I've made use of threading library and put the '''bot.polling()''' into o function and called this function in a thread. Basically, multithreading has resolved my issue.