Fix youtube downloading wrong track, saving exceptions, attempt to fix deezer
This commit is contained in:
32
bot/keyboards/inline/search_variants.py
Normal file
32
bot/keyboards/inline/search_variants.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from aiogram.utils.keyboard import (InlineKeyboardMarkup, InlineKeyboardButton,
|
||||
InlineKeyboardBuilder)
|
||||
|
||||
|
||||
deezer = {
|
||||
'd': '🎵 Search in Deezer'
|
||||
}
|
||||
soundcloud = {
|
||||
'c': '☁️ Search in SoundCloud'
|
||||
}
|
||||
youtube = {
|
||||
'y': '▶️ Search in YouTube'
|
||||
}
|
||||
spotify = {
|
||||
's': '🎧 Search in Spotify'
|
||||
}
|
||||
|
||||
|
||||
def get_search_variants_kb(
|
||||
query: str,
|
||||
services: dict[str, str],
|
||||
) -> InlineKeyboardMarkup:
|
||||
buttons = [
|
||||
[
|
||||
InlineKeyboardButton(
|
||||
text=services[key],
|
||||
switch_inline_query_current_chat=f'{key}:{query}'
|
||||
)
|
||||
] for key in services.keys()
|
||||
]
|
||||
|
||||
return InlineKeyboardBuilder(buttons).as_markup()
|
||||
Reference in New Issue
Block a user