32 lines
1004 B
Python
32 lines
1004 B
Python
|
|
from aiogram import types, Router, F
|
|
|
|
from app.core._config import WEB_APP_URLS
|
|
from app.core._keyboards import get_inline_keyboard
|
|
from app.core._utils.tg_process_template import tg_process_template
|
|
|
|
router = Router()
|
|
|
|
|
|
async def t_callback_owned_content(query: types.CallbackQuery, memory=None, user=None, db_session=None, chat_wrap=None, **extra):
|
|
message_text = user.translated("ownedContent_menu")
|
|
return await tg_process_template(
|
|
chat_wrap, message_text,
|
|
keyboard=get_inline_keyboard([
|
|
[{
|
|
'text': user.translated('webApp_uploadContent_button'),
|
|
'web_app': types.WebAppInfo(
|
|
url=WEB_APP_URLS['uploadContent']
|
|
)
|
|
}],
|
|
[{
|
|
'text': user.translated('back_button'),
|
|
'callback_data': 'home'
|
|
}]
|
|
]), message_id=query.message.message_id
|
|
)
|
|
|
|
|
|
router.callback_query.register(t_callback_owned_content, F.data == 'ownedContent')
|
|
|