import logging from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import ContextTypes from .base import InfoCommandsBase logger = logging.getLogger(__name__) class CommandsInfo(InfoCommandsBase): """Handles the commands information command.""" async def commands_command(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """Handle the /commands and /c command with quick action buttons.""" chat_id = update.effective_chat.id if not self._is_authorized(update): return commands_text = """ 📱 Quick Commands Tap any button below for instant access to bot functions: 💡 Pro Tip: These buttons work the same as typing the commands manually, but faster! """ keyboard = [ [ InlineKeyboardButton("💰 Balance", callback_data="/balance"), InlineKeyboardButton("📈 Positions", callback_data="/positions") ], [ InlineKeyboardButton("📋 Orders", callback_data="/orders"), InlineKeyboardButton("📊 Stats", callback_data="/stats") ], [ InlineKeyboardButton("💵 Price", callback_data="/price"), InlineKeyboardButton("📊 Market", callback_data="/market") ], [ InlineKeyboardButton("🏆 Performance", callback_data="/performance"), InlineKeyboardButton("🔔 Alarms", callback_data="/alarm") ], [ InlineKeyboardButton("📅 Daily", callback_data="/daily"), InlineKeyboardButton("📊 Weekly", callback_data="/weekly") ], [ InlineKeyboardButton("📆 Monthly", callback_data="/monthly"), InlineKeyboardButton("🔄 Trades", callback_data="/trades") ], [ InlineKeyboardButton("🔄 Monitoring", callback_data="/monitoring"), InlineKeyboardButton("📝 Logs", callback_data="/logs") ], [ InlineKeyboardButton("🎲 Risk", callback_data="/risk"), InlineKeyboardButton("⚙️ Help", callback_data="/help") ] ] reply_markup = InlineKeyboardMarkup(keyboard) await context.bot.send_message(chat_id=chat_id, text=commands_text, parse_mode='HTML', reply_markup=reply_markup)