Returns: File

class aiogram.methods.upload_sticker_file.UploadStickerFile(*, user_id: int, sticker: InputFile, sticker_format: str, **extra_data: Any)[source]#

Use this method to upload a file with a sticker for later use in the aiogram.methods.create_new_sticker_set.CreateNewStickerSet, aiogram.methods.add_sticker_to_set.AddStickerToSet, or aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet methods (the file can be used multiple times). Returns the uploaded aiogram.types.file.File on success.

Source: https://core.telegram.org/bots/api#uploadstickerfile

user_id: int#

User identifier of sticker file owner

sticker: InputFile#

A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers <https://core.telegram.org/stickers>`_`https://core.telegram.org/stickers for technical requirements. More information on Sending Files »

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_post_init(_ModelMetaclass__context: Any) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

sticker_format: str#

Format of the sticker, must be one of ‘static’, ‘animated’, ‘video’


As bot method#

result: File = await bot.upload_sticker_file(...)

Method as object#


  • from aiogram.methods.upload_sticker_file import UploadStickerFile

  • alias: from aiogram.methods import UploadStickerFile

With specific bot#

result: File = await bot(UploadStickerFile(...))