Developing Bot
This commit is contained in:
@@ -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)
|
||||
)
|
||||
Reference in New Issue
Block a user