Add spotify search (only search), default menu
This commit is contained in:
1
bot/handlers/inline_empty/__init__.py
Normal file
1
bot/handlers/inline_empty/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .on_inline_empty import router
|
||||
23
bot/handlers/inline_empty/on_inline_empty.py
Normal file
23
bot/handlers/inline_empty/on_inline_empty.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from aiogram import Router, Bot, F
|
||||
from aiogram.types import (
|
||||
InlineQuery, InputTextMessageContent, InlineQueryResultArticle
|
||||
)
|
||||
from bot.keyboards.inline.full_menu import get_full_menu_kb
|
||||
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.inline_query(F.query == '')
|
||||
async def empty_inline_query(inline_query: InlineQuery, bot: Bot):
|
||||
await inline_query.answer(
|
||||
[
|
||||
InlineQueryResultArticle(
|
||||
id='show_menu',
|
||||
title='⚙️ Open menu',
|
||||
input_message_content=InputTextMessageContent(
|
||||
message_text='⚙️ Menu'
|
||||
),
|
||||
reply_markup=get_full_menu_kb()
|
||||
)
|
||||
], cache_time=0
|
||||
)
|
||||
Reference in New Issue
Block a user