used black

This commit is contained in:
hhh
2024-11-02 00:10:24 +02:00
parent 1b1f217b75
commit e0a3d256d5
79 changed files with 658 additions and 733 deletions

View File

@@ -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,
)