This commit is contained in:
dj
2023-12-01 18:17:58 +03:00
parent e0fe8e392f
commit 2208bbf566
18 changed files with 353 additions and 190 deletions
+7 -6
View File
@@ -3,17 +3,18 @@ from aiogram import Router, Bot, F
from aiogram.filters import Command
from aiogram.types import Message, CallbackQuery
from tgbot.database.db_users import UserModel
from tgbot.keyboards.inline_main import menu_finl
from tgbot.keyboards.inline_misc import user_inl
from tgbot.keyboards.reply_misc import user_rep
from tgbot.utils.misc.bot_models import FSM, RS
from tgbot.utils.misc.bot_models import FSM, ARS
router = Router(name=__name__)
# Кнопка - User Inline
@router.message(F.text == 'User Inline')
async def user_button_inline(message: Message, bot: Bot, state: FSM, rSession: RS, my_user):
async def user_button_inline(message: Message, bot: Bot, state: FSM, arSession: ARS, User: UserModel):
await state.clear()
await message.answer(
@@ -24,7 +25,7 @@ async def user_button_inline(message: Message, bot: Bot, state: FSM, rSession: R
# Кнопка - User Reply
@router.message(F.text == 'User Reply')
async def user_button_reply(message: Message, bot: Bot, state: FSM, rSession: RS, my_user):
async def user_button_reply(message: Message, bot: Bot, state: FSM, arSession: ARS, User: UserModel):
await state.clear()
await message.answer(
@@ -35,7 +36,7 @@ async def user_button_reply(message: Message, bot: Bot, state: FSM, rSession: RS
# Команда - /inline
@router.message(Command(commands="inline"))
async def user_command_inline(message: Message, bot: Bot, state: FSM, rSession: RS, my_user):
async def user_command_inline(message: Message, bot: Bot, state: FSM, arSession: ARS, User: UserModel):
await state.clear()
await message.answer(
@@ -46,13 +47,13 @@ async def user_command_inline(message: Message, bot: Bot, state: FSM, rSession:
# Колбэк - User X
@router.callback_query(F.data == 'user_inline_x')
async def user_callback_inline_x(call: CallbackQuery, bot: Bot, state: FSM, rSession: RS, my_user):
async def user_callback_inline_x(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS, User: UserModel):
await call.answer(f"Click User X")
# Колбэк - User
@router.callback_query(F.data.startswith('user_inline:'))
async def user_callback_inline(call: CallbackQuery, bot: Bot, state: FSM, rSession: RS, my_user):
async def user_callback_inline(call: CallbackQuery, bot: Bot, state: FSM, arSession: ARS, User: UserModel):
get_data = call.data.split(":")[1]
await call.answer(f"Click User - {get_data}", True)