Update git import and add package requirement comment

This commit is contained in:
2024-08-20 14:24:15 -05:00
parent 573f08c949
commit b122734195
+3 -2
View File
@@ -3,7 +3,8 @@ import logging
import sys import sys
import asyncio import asyncio
import time import time
import git # Note: You need to install the GitPython package: pip install GitPython
from git import Repo
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes, CallbackQueryHandler from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes, CallbackQueryHandler
@@ -11,7 +12,7 @@ class TelegramHelper:
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
self.telegram_bot_token = os.getenv('TELEGRAM_BOT_TOKEN') self.telegram_bot_token = os.getenv('TELEGRAM_BOT_TOKEN')
self.repo = git.Repo(os.getcwd()) self.repo = Repo(os.getcwd())
self.start_time = time.time() self.start_time = time.time()
async def start(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: async def start(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: