Skip to content

Commit

Permalink
chore: seems that block is bad
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Oct 12, 2023
1 parent cec0fd3 commit 3a8b48c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
1 change: 0 additions & 1 deletion bot/commands/play_song.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ async def _(client: Client, message: Message):
await _message.edit("💾 **__Downloading...__**")
media = await client.download_media(
message.reply_to_message,
block=False,
file_name=file_name,
progress=progress,
progress_args=(client, message.chat.id, _message.id),
Expand Down
1 change: 0 additions & 1 deletion bot/commands/play_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ async def _(client: Client, message: Message):
await _message.edit("💾 **__Downloading...__**")
media = await assistant.download_media(
message.reply_to_message,
block=False,
file_name=file_name,
progress=progress,
progress_args=(client, message.chat.id, _message.id),
Expand Down
16 changes: 3 additions & 13 deletions bot/commands/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def _(client: Client, message: Message):
return await message.reply(
"**__How to use this command.\n\nNext we show two ways to use this command, click on the button with the mode you are looking for to know details.__**"
)
_message = await message.reply("**__Searching...__**")
_message = await message.reply("🔎 **__Searching...__**")
await sleep(2)
search = message.text.split(maxsplit=1)[1]
movie_name = f"/tmp/{str(uuid.uuid4())}.mp4"
Expand Down Expand Up @@ -70,22 +70,12 @@ async def _(client: Client, message: Message):
)
image_urls = image_scraper.find_image_urls()
photo = image_scraper.save_images(image_urls, keep_filenames=True)
if media["type"] == "serie":
video = await assistant.download_media(
video = await assistant.download_media(
media["file_id"],
block=False,
file_name=serie_name,
progress=progress,
progress_args=(client, message.chat.id, _message.id),
)
if media["type"] == "movie":
video = await assistant.download_media(
media["file_id"],
block=False,
file_name=movie_name,
progress=progress,
progress_args=(client, message.chat.id, _message.id),
)
)
if VOICE_CHATS.get(message.chat.id) is None:
await _message.edit("🪄 **__Joining the voice chat...__**")
await tgcalls.start(message.chat.id)
Expand Down

0 comments on commit 3a8b48c

Please sign in to comment.