From 909118a7064b3fed06b9db9bf0aef9f7ac13e2d8 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Tue, 6 Jun 2023 15:49:25 +0000 Subject: [PATCH] fix --- misskaty/plugins/genss.py | 1 + misskaty/plugins/stickers.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/misskaty/plugins/genss.py b/misskaty/plugins/genss.py index f2fc21d5..e386e4f2 100644 --- a/misskaty/plugins/genss.py +++ b/misskaty/plugins/genss.py @@ -22,6 +22,7 @@ from misskaty.core.decorator import ratelimiter, new_task from misskaty.core.misskaty_patch.listen.listen import ListenerTimeout from misskaty.helper import is_url, progress_for_pyrogram, take_ss from misskaty.helper.localization import use_chat_lang +from misskaty.helper.pyro_progress import humanbytes from misskaty.vars import COMMAND_HANDLER LOGGER = getLogger(__name__) diff --git a/misskaty/plugins/stickers.py b/misskaty/plugins/stickers.py index 84743e8e..70506c26 100644 --- a/misskaty/plugins/stickers.py +++ b/misskaty/plugins/stickers.py @@ -77,10 +77,14 @@ async def getstickerid(self: Client, ctx: Message): @ratelimiter @use_chat_lang() async def getstickerid(self: Client, ctx: Message, strings): - if ctx.reply_to_message.sticker: + 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 ctx.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: - decoded = FileId.decode(ctx.reply_to_message.sticker.file_id) + decoded = FileId.decode(sticker.file_id) sticker = InputDocument( id=decoded.media_id, access_hash=decoded.access_hash,