diff --git a/aprsd_telegram_plugin/telegram.py b/aprsd_telegram_plugin/telegram.py index 9ead0dc..a3d54c6 100644 --- a/aprsd_telegram_plugin/telegram.py +++ b/aprsd_telegram_plugin/telegram.py @@ -1,6 +1,7 @@ import datetime import logging import threading +import time from aprsd import messaging, objectstore, plugin, threads, trace from telegram.ext import Filters, MessageHandler, Updater @@ -77,7 +78,7 @@ class TelegramChatPlugin(plugin.APRSDRegexCommandPluginBase): _help = [ "telegram: Chat with a user on telegram Messenger.", "telegram: username has to message you first." - "tg: Send tg ", + "tg: Send tg ", ] return _help @@ -206,5 +207,7 @@ class TelegramThread(threads.APRSDThread): timeout=2, drop_pending_updates=True, ) + # So we don't eat 100% CPU + time.sleep(1) # so we can continue looping return True