async def on_sticker(event): if not event.sticker: return media = await convert_sticker_to_gif(event.sticker) await event( SaveGifRequest(id=media, unsave=False) )
async def on_save(event): await event.delete() target = await event.get_reply_message() media = target.gif or target.sticker if not media: return if target.sticker: media = await convert_sticker_to_gif(media) await event(SaveGifRequest(id=media, unsave=False))