Merge pull request #104 from bucolucas/add-reboot-check

Add check for .doreboot file to send reboot complete message
This commit is contained in:
2024-08-20 13:13:27 -05:00
committed by GitHub
+5 -1
View File
@@ -80,6 +80,11 @@ class TelegramHelper:
sys.exit(0)
def run(self):
if os.path.exists("./.doreboot"):
# Assuming `send_message_to_user` is a method or function available in the bot context.
await self.bot.send_message_to_user("Reboot Complete")
os.remove("./.doreboot")
application = Application.builder().token(self.telegram_bot_token).build()
application.add_handler(CommandHandler("start", self.start))
@@ -92,4 +97,3 @@ class TelegramHelper:
logging.info("Bot is running...")
application.run_polling()