diff --git a/misskaty/plugins/download_upload.py b/misskaty/plugins/download_upload.py index f09598d4..8ab35ca8 100644 --- a/misskaty/plugins/download_upload.py +++ b/misskaty/plugins/download_upload.py @@ -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: {url}\n" - current_message += f"File Name: {custom_file_name}\n" + current_message += f"File Name: {unquote(custom_file_name)}\n" current_message += f"Speed: {speed}\n" current_message += f"{progress_str}\n" current_message += f"{downloaded} of {humanbytes(total_length)}\n" diff --git a/misskaty/plugins/genss.py b/misskaty/plugins/genss.py index e386e4f2..2feba339 100644 --- a/misskaty/plugins/genss.py +++ b/misskaty/plugins/genss.py @@ -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: {url}\n" - current_message += f"File Name: {file_name}\n" + current_message += f"File Name: {unquote(file_name)}\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 {download_file_path} 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( diff --git a/misskaty/plugins/stickers.py b/misskaty/plugins/stickers.py index 5c6299ee..65cd7520 100644 --- a/misskaty/plugins/stickers.py +++ b/misskaty/plugins/stickers.py @@ -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: