slidge.util.lottie

This module implements vector animated stickers in the lottie format to webp images.

Functions

from_url(url, sticker_id, http)

Get a webp attachment from a URL.

Module Contents

async slidge.util.lottie.from_url(url, sticker_id, http)

Get a webp attachment from a URL.

Parameters:
  • url (str) – URL where the lottie sticker can be downloaded.

  • sticker_id (str) – A unique identifier for this sticker.

  • http (aiohttp.ClientSession) – The aiohttp.ClientSession used to download the sticker.

Returns:

A LegacyAttachment with the sticker in the webp format if config.CONVERT_STICKERS == True, in the original lottie format otherwise.

Return type:

slidge.util.types.LegacyAttachment