- Removed unused prehandling, referrals, support, and states files. - Updated admin and client handlers to improve structure and functionality. - Introduced admin filters and routers for better access control. - Added new billing and deposit functionalities for client interactions. - Enhanced keyboard layouts for admin and client menus. - Implemented promotion handling for admin users. - Updated configuration to include admin settings. - Improved utility functions for quote fetching and menu text building. - Added common handlers for undefined commands and message deletions.
28 lines
742 B
Python
28 lines
742 B
Python
import logging
|
|
|
|
from aiogram import F, Router
|
|
from aiogram.filters import Command
|
|
from aiogram.fsm.context import FSMContext
|
|
from aiogram.types import CallbackQuery, Message
|
|
|
|
from bot.keyboards.client import support_url_kb
|
|
from bot.texts import SUPPORT_INIT
|
|
|
|
router = Router()
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
@router.callback_query(F.data == "support")
|
|
async def support_init(cb: CallbackQuery, state: FSMContext):
|
|
await state.clear()
|
|
|
|
await cb.message.edit_text(text=SUPPORT_INIT, reply_markup=support_url_kb)
|
|
|
|
|
|
@router.message(Command("support"))
|
|
async def support_init_cmd(msg: Message, state: FSMContext):
|
|
await state.clear()
|
|
await msg.delete()
|
|
|
|
await msg.answer(text=SUPPORT_INIT, reply_markup=support_url_kb)
|