used black
This commit is contained in:
@@ -7,4 +7,4 @@ router = Router()
|
||||
|
||||
@router.startup()
|
||||
async def startup(bot: Bot):
|
||||
print(f'[green]Started as[/] @{(await bot.me()).username}')
|
||||
print(f"[green]Started as[/] @{(await bot.me()).username}")
|
||||
|
||||
@@ -12,15 +12,15 @@ from bot.modules.settings import UserSettings
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.inline_query(F.query != '')
|
||||
@router.inline_query(F.query != "")
|
||||
async def default_inline_query(inline_query: InlineQuery, settings: UserSettings):
|
||||
await inline_query.answer(
|
||||
await {
|
||||
'd': get_deezer_search_results,
|
||||
'c': get_soundcloud_search_results,
|
||||
'y': get_youtube_search_results,
|
||||
's': get_spotify_search_results
|
||||
}[settings['default_search_provider'].value](inline_query.query, settings),
|
||||
"d": get_deezer_search_results,
|
||||
"c": get_soundcloud_search_results,
|
||||
"y": get_youtube_search_results,
|
||||
"s": get_spotify_search_results,
|
||||
}[settings["default_search_provider"].value](inline_query.query, settings),
|
||||
cache_time=0,
|
||||
is_personal=True
|
||||
is_personal=True,
|
||||
)
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
from aiogram import Router, F
|
||||
from aiogram.types import (
|
||||
InlineQuery, InputTextMessageContent, InlineQueryResultArticle
|
||||
)
|
||||
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 == '')
|
||||
@router.inline_query(F.query == "")
|
||||
async def empty_inline_query(inline_query: InlineQuery):
|
||||
await inline_query.answer(
|
||||
[
|
||||
InlineQueryResultArticle(
|
||||
id='show_menu',
|
||||
title='⚙️ Open menu',
|
||||
input_message_content=InputTextMessageContent(
|
||||
message_text='⚙️ Menu'
|
||||
),
|
||||
reply_markup=get_full_menu_kb()
|
||||
id="show_menu",
|
||||
title="⚙️ Open menu",
|
||||
input_message_content=InputTextMessageContent(message_text="⚙️ Menu"),
|
||||
reply_markup=get_full_menu_kb(),
|
||||
)
|
||||
], cache_time=0
|
||||
],
|
||||
cache_time=0,
|
||||
)
|
||||
|
||||
@@ -8,10 +8,10 @@ from bot.filters import ServiceSearchFilter
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.inline_query(ServiceSearchFilter('error'))
|
||||
@router.inline_query(ServiceSearchFilter("error"))
|
||||
async def search_spotify_inline_query(inline_query: InlineQuery):
|
||||
await inline_query.answer(
|
||||
await get_error_search_results(inline_query.query.removeprefix('error:')),
|
||||
await get_error_search_results(inline_query.query.removeprefix("error:")),
|
||||
cache_time=0,
|
||||
is_personal=True
|
||||
is_personal=True,
|
||||
)
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
from aiogram import Router
|
||||
|
||||
from . import (on_inline_spotify, on_inline_deezer, on_inline_youtube,
|
||||
on_inline_soundcloud)
|
||||
from . import (
|
||||
on_inline_spotify,
|
||||
on_inline_deezer,
|
||||
on_inline_youtube,
|
||||
on_inline_soundcloud,
|
||||
)
|
||||
|
||||
router = Router()
|
||||
router.include_routers(
|
||||
on_inline_spotify.router,
|
||||
on_inline_deezer.router,
|
||||
on_inline_youtube.router,
|
||||
on_inline_soundcloud.router
|
||||
on_inline_soundcloud.router,
|
||||
)
|
||||
|
||||
@@ -9,13 +9,12 @@ from bot.modules.settings import UserSettings
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.inline_query(ServiceSearchFilter('d'))
|
||||
@router.inline_query(ServiceSearchFilter("d"))
|
||||
async def search_deezer_inline_query(inline_query: InlineQuery, settings: UserSettings):
|
||||
await inline_query.answer(
|
||||
await get_deezer_search_results(
|
||||
inline_query.query.removeprefix('d:'),
|
||||
settings
|
||||
inline_query.query.removeprefix("d:"), settings
|
||||
),
|
||||
cache_time=0,
|
||||
is_personal=True
|
||||
is_personal=True,
|
||||
)
|
||||
|
||||
@@ -9,16 +9,14 @@ from bot.modules.settings import UserSettings
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.inline_query(ServiceSearchMultiletterFilter(['c', 'с']))
|
||||
@router.inline_query(ServiceSearchMultiletterFilter(["c", "с"]))
|
||||
async def search_soundcloud_inline_query(
|
||||
inline_query: InlineQuery,
|
||||
settings: UserSettings
|
||||
inline_query: InlineQuery, settings: UserSettings
|
||||
):
|
||||
await inline_query.answer(
|
||||
await get_soundcloud_search_results(
|
||||
inline_query.query.removeprefix('c:').removesuffix('с:'),
|
||||
settings
|
||||
inline_query.query.removeprefix("c:").removesuffix("с:"), settings
|
||||
),
|
||||
cache_time=0,
|
||||
is_personal=True
|
||||
is_personal=True,
|
||||
)
|
||||
|
||||
@@ -9,14 +9,14 @@ from bot.modules.settings import UserSettings
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.inline_query(ServiceSearchFilter('s'))
|
||||
@router.inline_query(ServiceSearchFilter("s"))
|
||||
async def search_spotify_inline_query(
|
||||
inline_query: InlineQuery,
|
||||
settings: UserSettings
|
||||
inline_query: InlineQuery, settings: UserSettings
|
||||
):
|
||||
await inline_query.answer(
|
||||
await get_spotify_search_results(inline_query.query.removeprefix('s:'),
|
||||
settings),
|
||||
await get_spotify_search_results(
|
||||
inline_query.query.removeprefix("s:"), settings
|
||||
),
|
||||
cache_time=0,
|
||||
is_personal=True
|
||||
is_personal=True,
|
||||
)
|
||||
|
||||
@@ -9,12 +9,14 @@ from bot.modules.settings import UserSettings
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.inline_query(ServiceSearchFilter('y'))
|
||||
async def search_youtube_inline_query(inline_query: InlineQuery,
|
||||
settings: UserSettings):
|
||||
@router.inline_query(ServiceSearchFilter("y"))
|
||||
async def search_youtube_inline_query(
|
||||
inline_query: InlineQuery, settings: UserSettings
|
||||
):
|
||||
await inline_query.answer(
|
||||
await get_youtube_search_results(inline_query.query.removeprefix('y:'),
|
||||
settings),
|
||||
await get_youtube_search_results(
|
||||
inline_query.query.removeprefix("y:"), settings
|
||||
),
|
||||
cache_time=0,
|
||||
is_personal=True
|
||||
is_personal=True,
|
||||
)
|
||||
|
||||
@@ -14,5 +14,5 @@ async def url_deezer_inline_query(inline_query: InlineQuery, settings: UserSetti
|
||||
await inline_query.answer(
|
||||
await get_url_results(inline_query.query, settings),
|
||||
cache_time=0,
|
||||
is_personal=True
|
||||
is_personal=True,
|
||||
)
|
||||
|
||||
@@ -12,4 +12,4 @@ router.include_routers(
|
||||
suppress_verify.router,
|
||||
)
|
||||
|
||||
__all__ = ['router']
|
||||
__all__ = ["router"]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from aiogram import Router, Bot, F
|
||||
from aiogram.types import (
|
||||
BufferedInputFile, URLInputFile, InputMediaAudio,
|
||||
BufferedInputFile,
|
||||
URLInputFile,
|
||||
InputMediaAudio,
|
||||
ChosenInlineResult,
|
||||
)
|
||||
|
||||
@@ -11,11 +13,11 @@ from bot.modules.database import db
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.chosen_inline_result(F.result_id.startswith('deez::'))
|
||||
@router.chosen_inline_result(F.result_id.startswith("deez::"))
|
||||
async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot):
|
||||
bytestream: DeezerBytestream = await (await deezer.downloader.from_id(
|
||||
chosen_result.result_id.removeprefix('deez::')
|
||||
)).to_bytestream()
|
||||
bytestream: DeezerBytestream = await (
|
||||
await deezer.downloader.from_id(chosen_result.result_id.removeprefix("deez::"))
|
||||
).to_bytestream()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
@@ -34,5 +36,5 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot):
|
||||
await bot.edit_message_media(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
media=InputMediaAudio(media=audio.audio.file_id),
|
||||
reply_markup=None
|
||||
reply_markup=None,
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from aiogram import Router, Bot, F
|
||||
from aiogram.types import (
|
||||
BufferedInputFile, InputMediaAudio,
|
||||
BufferedInputFile,
|
||||
InputMediaAudio,
|
||||
ChosenInlineResult,
|
||||
)
|
||||
|
||||
@@ -16,42 +17,37 @@ router = Router()
|
||||
|
||||
|
||||
@router.chosen_inline_result(
|
||||
F.result_id.startswith('spotc::') | F.result_id.startswith('ytc::')
|
||||
F.result_id.startswith("spotc::") | F.result_id.startswith("ytc::")
|
||||
)
|
||||
async def on_cached_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
settings: UserSettings):
|
||||
if settings['recode_youtube'].value != 'yes':
|
||||
async def on_cached_chosen(
|
||||
chosen_result: ChosenInlineResult, bot: Bot, settings: UserSettings
|
||||
):
|
||||
if settings["recode_youtube"].value != "yes":
|
||||
await bot.edit_message_reply_markup(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
reply_markup=None
|
||||
inline_message_id=chosen_result.inline_message_id, reply_markup=None
|
||||
)
|
||||
return
|
||||
|
||||
if (
|
||||
type(
|
||||
db.recoded.get(
|
||||
song_id := chosen_result.result_id
|
||||
.removeprefix('spotc::')
|
||||
.removeprefix('ytc::')
|
||||
if type(
|
||||
db.recoded.get(
|
||||
song_id := chosen_result.result_id.removeprefix("spotc::").removeprefix(
|
||||
"ytc::"
|
||||
)
|
||||
) in [bool, type(None)]
|
||||
):
|
||||
)
|
||||
) in [bool, type(None)]:
|
||||
await bot.edit_message_reply_markup(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
reply_markup=None
|
||||
inline_message_id=chosen_result.inline_message_id, reply_markup=None
|
||||
)
|
||||
return
|
||||
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='🔄 Recoding...',
|
||||
reply_markup=None
|
||||
caption="🔄 Recoding...",
|
||||
reply_markup=None,
|
||||
)
|
||||
|
||||
message = await bot.forward_message(
|
||||
config.telegram.files_chat,
|
||||
config.telegram.files_chat,
|
||||
db.recoded[song_id]
|
||||
config.telegram.files_chat, config.telegram.files_chat, db.recoded[song_id]
|
||||
)
|
||||
|
||||
song_io: BytesIO = await bot.download( # type: ignore
|
||||
@@ -76,7 +72,7 @@ async def on_cached_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
),
|
||||
thumbnail=BufferedInputFile(
|
||||
file=(await bot.download(message.audio.thumbnail.file_id)).read(),
|
||||
filename='thumbnail.jpg'
|
||||
filename="thumbnail.jpg",
|
||||
),
|
||||
performer=message.audio.performer,
|
||||
title=message.audio.title,
|
||||
@@ -85,15 +81,15 @@ async def on_cached_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='',
|
||||
caption="",
|
||||
reply_markup=None,
|
||||
)
|
||||
await bot.edit_message_media(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
media=InputMediaAudio(media=audio.audio.file_id)
|
||||
media=InputMediaAudio(media=audio.audio.file_id),
|
||||
)
|
||||
|
||||
if chosen_result.result_id.startswith('spotc::'):
|
||||
if chosen_result.result_id.startswith("spotc::"):
|
||||
db.spotify[song_id] = audio.audio.file_id
|
||||
else:
|
||||
db.youtube[song_id] = audio.audio.file_id
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from aiogram import Router, Bot, F
|
||||
from aiogram.types import (
|
||||
BufferedInputFile, URLInputFile, InputMediaAudio,
|
||||
BufferedInputFile,
|
||||
URLInputFile,
|
||||
InputMediaAudio,
|
||||
ChosenInlineResult,
|
||||
)
|
||||
|
||||
@@ -11,11 +13,13 @@ from bot.modules.database import db
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.chosen_inline_result(F.result_id.startswith('sc::'))
|
||||
@router.chosen_inline_result(F.result_id.startswith("sc::"))
|
||||
async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot):
|
||||
bytestream: SoundCloudBytestream = await (await soundcloud.downloader.from_id(
|
||||
chosen_result.result_id.removeprefix('sc::')
|
||||
)).to_bytestream()
|
||||
bytestream: SoundCloudBytestream = await (
|
||||
await soundcloud.downloader.from_id(
|
||||
chosen_result.result_id.removeprefix("sc::")
|
||||
)
|
||||
).to_bytestream()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
@@ -33,5 +37,5 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot):
|
||||
await bot.edit_message_media(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
media=InputMediaAudio(media=audio.audio.file_id),
|
||||
reply_markup=None
|
||||
reply_markup=None,
|
||||
)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from aiogram import Router, Bot, F
|
||||
from aiogram.types import (
|
||||
BufferedInputFile, URLInputFile, InputMediaAudio,
|
||||
BufferedInputFile,
|
||||
URLInputFile,
|
||||
InputMediaAudio,
|
||||
ChosenInlineResult,
|
||||
)
|
||||
|
||||
@@ -16,16 +18,17 @@ router = Router()
|
||||
|
||||
|
||||
def not_strict_name(song, yt_song):
|
||||
if 'feat' in yt_song.name.lower():
|
||||
if "feat" in yt_song.name.lower():
|
||||
return any(artist.lower() in yt_song.name.lower() for artist in song.artists)
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
@router.chosen_inline_result(F.result_id.startswith('spot::'))
|
||||
async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
settings: UserSettings):
|
||||
song = spotify.songs.from_id(chosen_result.result_id.removeprefix('spot::'))
|
||||
@router.chosen_inline_result(F.result_id.startswith("spot::"))
|
||||
async def on_new_chosen(
|
||||
chosen_result: ChosenInlineResult, bot: Bot, settings: UserSettings
|
||||
):
|
||||
song = spotify.songs.from_id(chosen_result.result_id.removeprefix("spot::"))
|
||||
|
||||
bytestream = None
|
||||
audio = None
|
||||
@@ -34,14 +37,15 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
song.full_name,
|
||||
exact_match=True,
|
||||
)
|
||||
if settings['exact_spotify_search'].value == 'yes':
|
||||
if ((song.all_artists != yt_song.all_artists or song.name != yt_song.name)
|
||||
and not not_strict_name(song, yt_song)):
|
||||
if settings["exact_spotify_search"].value == "yes":
|
||||
if (
|
||||
song.all_artists != yt_song.all_artists or song.name != yt_song.name
|
||||
) and not not_strict_name(song, yt_song):
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='🙄 Cannot find this song on YouTube, trying Deezer...',
|
||||
caption="🙄 Cannot find this song on YouTube, trying Deezer...",
|
||||
reply_markup=None,
|
||||
parse_mode='HTML',
|
||||
parse_mode="HTML",
|
||||
)
|
||||
yt_song = None
|
||||
bytestream = False
|
||||
@@ -66,9 +70,9 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
except AgeRestrictedError:
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='🔞 This song is age restricted, trying Deezer...',
|
||||
caption="🔞 This song is age restricted, trying Deezer...",
|
||||
reply_markup=None,
|
||||
parse_mode='HTML',
|
||||
parse_mode="HTML",
|
||||
)
|
||||
yt_song = None
|
||||
|
||||
@@ -99,29 +103,29 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
assert e
|
||||
|
||||
if audio:
|
||||
if settings['exact_spotify_search'].value == 'yes':
|
||||
if settings["exact_spotify_search"].value == "yes":
|
||||
db.spotify[song.id] = audio.audio.file_id
|
||||
|
||||
await bot.edit_message_media(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
media=InputMediaAudio(media=audio.audio.file_id),
|
||||
reply_markup=None
|
||||
reply_markup=None,
|
||||
)
|
||||
|
||||
else:
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='🤷♂️ Cannot download this song',
|
||||
caption="🤷♂️ Cannot download this song",
|
||||
reply_markup=None,
|
||||
parse_mode='HTML',
|
||||
parse_mode="HTML",
|
||||
)
|
||||
|
||||
if yt_song and settings['recode_youtube'].value == 'yes':
|
||||
if yt_song and settings["recode_youtube"].value == "yes":
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='🔄 Recoding...',
|
||||
caption="🔄 Recoding...",
|
||||
reply_markup=None,
|
||||
parse_mode='HTML',
|
||||
parse_mode="HTML",
|
||||
)
|
||||
await bytestream.rerender()
|
||||
|
||||
@@ -139,20 +143,20 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
db.youtube[yt_song.id] = audio.audio.file_id
|
||||
db.recoded[yt_song.id] = True
|
||||
|
||||
if settings['exact_spotify_search'].value == 'yes':
|
||||
if settings["exact_spotify_search"].value == "yes":
|
||||
db.spotify[song.id] = audio.audio.file_id
|
||||
db.recoded[song.id] = True
|
||||
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='',
|
||||
caption="",
|
||||
reply_markup=None,
|
||||
)
|
||||
await bot.edit_message_media(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
media=InputMediaAudio(media=audio.audio.file_id)
|
||||
media=InputMediaAudio(media=audio.audio.file_id),
|
||||
)
|
||||
elif yt_song and settings['recode_youtube'].value == 'no':
|
||||
elif yt_song and settings["recode_youtube"].value == "no":
|
||||
db.recoded[yt_song.id] = audio.message_id
|
||||
if settings['exact_spotify_search'].value == 'yes':
|
||||
if settings["exact_spotify_search"].value == "yes":
|
||||
db.recoded[song.id] = audio.message_id
|
||||
|
||||
@@ -7,10 +7,9 @@ router = Router()
|
||||
|
||||
|
||||
@router.chosen_inline_result(
|
||||
F.result_id.startswith('deezc::') | F.result_id.startswith('scc::')
|
||||
F.result_id.startswith("deezc::") | F.result_id.startswith("scc::")
|
||||
)
|
||||
async def on_unneeded_cached_chosen(chosen_result: ChosenInlineResult, bot: Bot):
|
||||
await bot.edit_message_reply_markup(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
reply_markup=None
|
||||
inline_message_id=chosen_result.inline_message_id, reply_markup=None
|
||||
)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from aiogram import Router, Bot, F
|
||||
from aiogram.types import (
|
||||
BufferedInputFile, URLInputFile, InputMediaAudio,
|
||||
BufferedInputFile,
|
||||
URLInputFile,
|
||||
InputMediaAudio,
|
||||
ChosenInlineResult,
|
||||
)
|
||||
|
||||
@@ -12,19 +14,20 @@ from bot.modules.settings import UserSettings
|
||||
router = Router()
|
||||
|
||||
|
||||
@router.chosen_inline_result(F.result_id.startswith('yt::'))
|
||||
async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
settings: UserSettings):
|
||||
song = youtube.songs.from_id(chosen_result.result_id.removeprefix('yt::'))
|
||||
@router.chosen_inline_result(F.result_id.startswith("yt::"))
|
||||
async def on_new_chosen(
|
||||
chosen_result: ChosenInlineResult, bot: Bot, settings: UserSettings
|
||||
):
|
||||
song = youtube.songs.from_id(chosen_result.result_id.removeprefix("yt::"))
|
||||
|
||||
try:
|
||||
bytestream = await song.to_bytestream()
|
||||
except AgeRestrictedError:
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='🔞 This song is age restricted, so I can\'t download it. '
|
||||
'Try downloading it from Deezer or SoundCloud',
|
||||
reply_markup=None
|
||||
caption="🔞 This song is age restricted, so I can't download it. "
|
||||
"Try downloading it from Deezer or SoundCloud",
|
||||
reply_markup=None,
|
||||
)
|
||||
return
|
||||
|
||||
@@ -45,14 +48,14 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
await bot.edit_message_media(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
media=InputMediaAudio(media=audio.audio.file_id),
|
||||
reply_markup=None
|
||||
reply_markup=None,
|
||||
)
|
||||
|
||||
if settings['recode_youtube'].value == 'yes':
|
||||
if settings["recode_youtube"].value == "yes":
|
||||
await bot.edit_message_caption(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
caption='🔄 Recoding...',
|
||||
reply_markup=None
|
||||
caption="🔄 Recoding...",
|
||||
reply_markup=None,
|
||||
)
|
||||
|
||||
await bytestream.rerender()
|
||||
@@ -75,7 +78,7 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot,
|
||||
await bot.edit_message_media(
|
||||
inline_message_id=chosen_result.inline_message_id,
|
||||
media=InputMediaAudio(media=audio.audio.file_id),
|
||||
reply_markup=None
|
||||
reply_markup=None,
|
||||
)
|
||||
else:
|
||||
db.recoded[song.id] = audio.message_id
|
||||
|
||||
Reference in New Issue
Block a user