Files
malenia/handlers/support.py

28 lines
734 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 keyboards.client import support_url_kb
from 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)