This commit is contained in:
yasirarism 2023-06-06 16:02:42 +00:00 committed by GitHub
parent 1768966328
commit e50348be68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import os
import time
from datetime import datetime
from logging import getLogger
from urllib.parse import unquote
from pyrogram import filters
from pyrogram.file_id import FileId
@ -116,7 +117,7 @@ async def download(client, message):
try:
current_message = "Trying to download...\n"
current_message += f"URL: <code>{url}</code>\n"
current_message += f"File Name: <code>{custom_file_name}</code>\n"
current_message += f"File Name: <code>{unquote(custom_file_name)}</code>\n"
current_message += f"Speed: {speed}\n"
current_message += f"{progress_str}\n"
current_message += f"{downloaded} of {humanbytes(total_length)}\n"

View file

@ -11,6 +11,7 @@ from asyncio import gather, sleep
from datetime import datetime
from logging import getLogger
from pySmartDL import SmartDL
from urllib.parse import unquote
from pyrogram import enums, filters, Client
from pyrogram.errors import FloodWait
@ -73,7 +74,7 @@ async def genss(self: Client, ctx: Message, strings):
try:
current_message = "Trying to download...\n"
current_message += f"URL: <code>{url}</code>\n"
current_message += f"File Name: <code>{file_name}</code>\n"
current_message += f"File Name: <code>{unquote(file_name)}</code>\n"
current_message += f"Speed: {speed}\n"
current_message += f"{progress_str}\n"
current_message += f"{downloaded} of {humanbytes(total_length)}\n"
@ -90,7 +91,7 @@ async def genss(self: Client, ctx: Message, strings):
await pesan.edit(f"Downloaded to <code>{download_file_path}</code> in {ms} seconds")
try:
images = await take_ss(download_file_path)
await process.edit_msg(strings("up_progress"))
await pesan.edit_msg(strings("up_progress"))
await self.send_chat_action(chat_id=ctx.chat.id, action=enums.ChatAction.UPLOAD_PHOTO)
try:
await gather(

View file

@ -80,7 +80,7 @@ async def getstickerid(self: Client, ctx: Message, strings):
if not ctx.from_user:
return await ctx.reply("You're anon, unkang in my PM")
if sticker := ctx.reply_to_message.sticker:
if str(ctx.from_user.id) in sticker.set_name:
if str(ctx.from_user.id) not in sticker.set_name:
return await ctx.reply_msg("This sticker is not your pack, don't do it..")
pp = await ctx.reply_msg(strings("unkang_msg"))
try: