This commit is contained in:
yasirarism 2023-06-06 15:49:25 +00:00 committed by GitHub
parent a4102edacb
commit 909118a706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -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__)

View file

@ -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,