Developing Bot

This commit is contained in:
2025-12-24 02:06:17 +01:00
parent aa3c656537
commit ba8c1823e3
17 changed files with 246 additions and 93 deletions
+26
View File
@@ -0,0 +1,26 @@
import traceback
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update
from telegram.ext import ContextTypes
from config import config
import user_permissions
import log
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not user_permissions.is_user_admin(update.effective_user.id):
log.warning(chat_id=update.effective_chat.id, message=f"Unauthorized direct message access attempt by user {update.effective_user.id}\n{traceback.format_exc()}")
await update.message.reply_text("You are not authorized to use this bot in this chat.")
return
keyboard = [
[InlineKeyboardButton("Eventmanagement", callback_data='list_event_actions')],
]
await update.message.reply_text(
f"""Willkommen beim {config.BOT_NAME} Admin Interface!
Hier kannst du verschiedene Verwaltungsaufgaben durchführen. Nutze die verfügbaren Befehle, um loszulegen.
(c) SinusFox.dev 2025
""",
reply_markup=InlineKeyboardMarkup(keyboard)
)