init commit
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
2025-09-04 01:51:59 +09:00
commit aca280b64d
1841 changed files with 753304 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
from telegram import Update
from telegram.ext import CommandHandler, ContextTypes
from db import SessionLocal
from models import Button
async def del_button(update: Update, context: ContextTypes.DEFAULT_TYPE):
args = context.args
if not args:
await update.message.reply_text('Используйте: /del_button <название>')
return
name = args[0]
session = SessionLocal()
button = session.query(Button).filter_by(name=name).first()
if not button:
await update.message.reply_text('Кнопка не найдена.')
session.close()
return
session.delete(button)
session.commit()
session.close()
await update.message.reply_text(f'Кнопка "{name}" удалена.')