mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 20:04:51 +00:00
fix
This commit is contained in:
parent
a4102edacb
commit
909118a706
2 changed files with 7 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ from misskaty.core.decorator import ratelimiter, new_task
|
||||||
from misskaty.core.misskaty_patch.listen.listen import ListenerTimeout
|
from misskaty.core.misskaty_patch.listen.listen import ListenerTimeout
|
||||||
from misskaty.helper import is_url, progress_for_pyrogram, take_ss
|
from misskaty.helper import is_url, progress_for_pyrogram, take_ss
|
||||||
from misskaty.helper.localization import use_chat_lang
|
from misskaty.helper.localization import use_chat_lang
|
||||||
|
from misskaty.helper.pyro_progress import humanbytes
|
||||||
from misskaty.vars import COMMAND_HANDLER
|
from misskaty.vars import COMMAND_HANDLER
|
||||||
|
|
||||||
LOGGER = getLogger(__name__)
|
LOGGER = getLogger(__name__)
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,14 @@ async def getstickerid(self: Client, ctx: Message):
|
||||||
@ratelimiter
|
@ratelimiter
|
||||||
@use_chat_lang()
|
@use_chat_lang()
|
||||||
async def getstickerid(self: Client, ctx: Message, strings):
|
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"))
|
pp = await ctx.reply_msg(strings("unkang_msg"))
|
||||||
try:
|
try:
|
||||||
decoded = FileId.decode(ctx.reply_to_message.sticker.file_id)
|
decoded = FileId.decode(sticker.file_id)
|
||||||
sticker = InputDocument(
|
sticker = InputDocument(
|
||||||
id=decoded.media_id,
|
id=decoded.media_id,
|
||||||
access_hash=decoded.access_hash,
|
access_hash=decoded.access_hash,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue