diff --git a/telegram_helper.py b/telegram_helper.py index f2f1b3e..d19bc31 100644 --- a/telegram_helper.py +++ b/telegram_helper.py @@ -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() \ No newline at end of file