SetStickerSetThumbRequest

Only bots can use this request. See code examples.

---functions---
stickers.setStickerSetThumb#a76a5392 flags:# stickerset:InputStickerSet thumb:flags.0?InputDocument thumb_document_id:flags.1?long = messages.StickerSet

Returns

messages.StickerSet

This type can be an instance of either:

StickerSetStickerSetNotModified

Parameters

stickersetInputStickerSet
thumbInputDocumentThis argument defaults to None and can be omitted.
thumb_document_idlongThis argument defaults to None and can be omitted.

Known RPC errors

This request can cause 2 known errors:

StickerThumbPngNopngErrorStickerset thumb must be a png file but the used file was not png.
StickerThumbTgsNotgsErrorStickerset thumb must be a tgs file but the used file was not tgs.

You can import these from telethon.errors.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.stickers.SetStickerSetThumbRequest(
        stickerset=types.InputStickerSetID(
            id=-12398745604826,
            access_hash=-12398745604826
        ),
        thumb=types.InputDocument(
            id=-12398745604826,
            access_hash=-12398745604826,
            file_reference=b'arbitrary\x7f data \xfa here'
        ),
        thumb_document_id=-12398745604826
    ))
    print(result.stringify())