Fix doreboot file check to run after event loop starts

This commit is contained in:
2024-08-20 14:11:19 -05:00
parent 9f0c9482c7
commit c9866ac7c5
+2 -1
View File
@@ -1,6 +1,7 @@
import os
import logging
import sys
import asyncio
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes, CallbackQueryHandler
@@ -102,6 +103,6 @@ class TelegramHelper:
logging.info("Bot is running...")
# Check for .doreboot file and send message if it exists
application.create_task(self.check_doreboot_file(application))
asyncio.get_event_loop().create_task(self.check_doreboot_file(application))
application.run_polling()