Skip to content

Commit

Permalink
refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Oct 12, 2023
1 parent 14612cd commit c8761bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/commands/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ async def _(client: Client, message: Message):
photo = image_scraper.save_images(image_urls, keep_filenames=True)
mime_type = (
message.reply_to_message.video.mime_type.split("/", 1)[1]
or message.reply_to_message.file.mime_type.split("/", 1)[1]
if message.reply_to_message.video
else message.reply_to_message.file.mime_type.split("/", 1)[1]
)
file_name = f"/tmp/{str(uuid.uuid4())}.{mime_type}"
video = await assistant.download_media(
Expand Down

0 comments on commit c8761bc

Please sign in to comment.