diff --git a/.gitignore b/.gitignore index 155e758..ff26bde 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,10 @@ bin/ include/ lib/ lib64/ +__pycache__/ lib64 -*.log \ No newline at end of file +*.log.* +*.log +__pycache__/ +__pycache__/db.cpython-312.pyc +__pycache__/logger_config.cpython-312.pyc diff --git a/bot.py b/bot.py index 9d5fcea..db33f72 100644 --- a/bot.py +++ b/bot.py @@ -1,5 +1,5 @@ from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update -from telegram.ext import Application, CallbackQueryHandler, ContextTypes, MessageHandler, filters +from telegram.ext import Application, CallbackQueryHandler, ContextTypes, MessageHandler, filters,CommandHandler from db import User, VPNServer, Transaction, Subscription, get_db_session, init_db, SessionLocal from sqlalchemy import desc from service import UserService @@ -131,6 +131,8 @@ async def button_handler(update: Update, context): def main() -> None: init_db() application = Application.builder().token(config['token']).build() + + application.add_handler(CommandHandler("start", start)) application.add_handler(CallbackQueryHandler(button_handler)) application.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, sup))