@borg.on(admin_cmd(pattern='getsticker ?(.*)'))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    if (not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY)):
        os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
    if event.reply_to_msg_id:
        reply_message = (await event.get_reply_message())
        if (not reply_message.sticker):
            return
        sticker = reply_message.sticker
        sticker_attrib = find_instance(sticker.attributes, DocumentAttributeSticker)
        if (not sticker_attrib.stickerset):
            (await event.reply('This sticker is not part of a pack'))
            return
        is_a_s = is_it_animated_sticker(reply_message)
        file_ext_ns_ion = 'webp'
        file_caption = 'https://t.me/RoseSupportChat/33801'
        if is_a_s:
            file_ext_ns_ion = 'tgs'
            file_caption = 'Forward the ZIP file to @AnimatedStickersRoBot to get lottIE JSON containing the vector information.'
        sticker_set = (await borg(GetStickerSetRequest(sticker_attrib.stickerset)))
        pack_file = os.path.join(Config.TMP_DOWNLOAD_DIRECTORY, sticker_set.set.short_name, 'pack.txt')
        if os.path.isfile(pack_file):
            os.remove(pack_file)
        emojis = defaultdict(str)
        for pack in sticker_set.packs:
            for document_id in pack.documents:
                emojis[document_id] += pack.emoticon

        async def download(sticker, emojis, path, file):
            (await borg.download_media(sticker, file=os.path.join(path, file)))
            with open(pack_file, 'a') as f:
                f.write(f"{{'image_file': '{file}','emojis':{emojis[sticker.id]}}},")
        pending_tasks = [asyncio.ensure_future(download(document, emojis, (Config.TMP_DOWNLOAD_DIRECTORY + sticker_set.set.short_name), f'{i:03d}.{file_ext_ns_ion}')) for (i, document) in enumerate(sticker_set.documents)]
        (await event.edit(f'Downloading {sticker_set.set.count} sticker(s) to .{Config.TMP_DOWNLOAD_DIRECTORY}{sticker_set.set.short_name}...'))
        num_tasks = len(pending_tasks)
        while 1:
            (done, pending_tasks) = (await asyncio.wait(pending_tasks, timeout=2.5, return_when=asyncio.FIRST_COMPLETED))
            try:
                (await event.edit(f'Downloaded {(num_tasks - len(pending_tasks))}/{sticker_set.set.count}'))
            except MessageNotModifiedError:
                pass
            if (not pending_tasks):
                break
        (await event.edit('Downloading to my local completed'))
        directory_name = (Config.TMP_DOWNLOAD_DIRECTORY + sticker_set.set.short_name)
        zipf = zipfile.ZipFile((directory_name + '.zip'), 'w', zipfile.ZIP_DEFLATED)
        zipdir(directory_name, zipf)
        zipf.close()
        (await borg.send_file(event.chat_id, (directory_name + '.zip'), caption=file_caption, force_document=True, allow_cache=False, reply_to=event.message.id, progress_callback=progress))
        try:
            os.remove((directory_name + '.zip'))
            os.remove(directory_name)
        except:
            pass
        (await event.edit('task Completed'))
        (await asyncio.sleep(3))
        (await event.delete())
    else:
        (await event.edit('TODO: Not Implemented'))
@borg.on(admin_cmd(pattern='getsticker ?(.*)'))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    if (not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY)):
        os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
    if event.reply_to_msg_id:
        reply_message = (await event.get_reply_message())
        if (not reply_message.sticker):
            return
        sticker = reply_message.sticker
        sticker_attrib = find_instance(sticker.attributes, DocumentAttributeSticker)
        if (not sticker_attrib.stickerset):
            (await event.reply('This sticker is not part of a pack'))
            return
        is_a_s = is_it_animated_sticker(reply_message)
        file_ext_ns_ion = 'webp'
        file_caption = 'https://t.me/RoseSupportChat/33801'
        if is_a_s:
            file_ext_ns_ion = 'tgs'
            file_caption = 'Forward the ZIP file to @AnimatedStickersRoBot to get lottIE JSON containing the vector information.'
        sticker_set = (await borg(GetStickerSetRequest(sticker_attrib.stickerset)))
        pack_file = os.path.join(Config.TMP_DOWNLOAD_DIRECTORY, sticker_set.set.short_name, 'pack.txt')
        if os.path.isfile(pack_file):
            os.remove(pack_file)
        emojis = defaultdict(str)
        for pack in sticker_set.packs:
            for document_id in pack.documents:
                emojis[document_id] += pack.emoticon

        async def download(sticker, emojis, path, file):
            (await borg.download_media(sticker, file=os.path.join(path, file)))
            with open(pack_file, 'a') as f:
                f.write(f"{{'image_file': '{file}','emojis':{emojis[sticker.id]}}},")
        pending_tasks = [asyncio.ensure_future(download(document, emojis, (Config.TMP_DOWNLOAD_DIRECTORY + sticker_set.set.short_name), f'{i:03d}.{file_ext_ns_ion}')) for (i, document) in enumerate(sticker_set.documents)]
        (await event.edit(f'Downloading {sticker_set.set.count} sticker(s) to .{Config.TMP_DOWNLOAD_DIRECTORY}{sticker_set.set.short_name}...'))
        num_tasks = len(pending_tasks)
        while 1:
            (done, pending_tasks) = (await asyncio.wait(pending_tasks, timeout=2.5, return_when=asyncio.FIRST_COMPLETED))
            try:
                (await event.edit(f'Downloaded {(num_tasks - len(pending_tasks))}/{sticker_set.set.count}'))
            except MessageNotModifiedError:
                pass
            if (not pending_tasks):
                break
        (await event.edit('Downloading to my local completed'))
        directory_name = (Config.TMP_DOWNLOAD_DIRECTORY + sticker_set.set.short_name)
        zipf = zipfile.ZipFile((directory_name + '.zip'), 'w', zipfile.ZIP_DEFLATED)
        zipdir(directory_name, zipf)
        zipf.close()
        (await borg.send_file(event.chat_id, (directory_name + '.zip'), caption=file_caption, force_document=True, allow_cache=False, reply_to=event.message.id, progress_callback=progress))
        try:
            os.remove((directory_name + '.zip'))
            os.remove(directory_name)
        except:
            pass
        (await event.edit('task Completed'))
        (await asyncio.sleep(3))
        (await event.delete())
    else:
        (await event.edit('TODO: Not Implemented'))