import os

import telegram

from leonard import Leonard

if __name__ == '__main__':
    os.chdir('../')
    telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
    bot = Leonard(telegram_client)
    i = 0
    while True:
        if i % 10 == 0:
            bot.collect_plugins()
        for name, check, send in bot.subscriptions:
            send(bot, check(bot))
        i += 1

@@ -2,16 +2,28 @@
 mport os
+%0Aimport time
 %0A%0Aimport
@@ -208,66 +208,8 @@
 nt)%0A
-    i = 0%0A    while True:%0A        if i %25 10 == 0:%0A        
     
@@ -230,16 +230,32 @@
 ugins()%0A
+    while True:%0A
         
@@ -344,11 +344,19 @@
     
-i += 1
+time.sleep(60)
 %0A

Remove collecting plugins every second