"""File generated by TLObjects' generator. All changes will be ERASED""" from ...tl.tlobject import TLObject from ...tl.tlobject import TLRequest from typing import Optional, List, Union, TYPE_CHECKING import os import struct from datetime import datetime if TYPE_CHECKING: from ...tl.types import TypeInputDocument, TypeInputStickerSet, TypeInputStickerSetItem, TypeInputUser, TypeMaskCoords class AddStickerToSetRequest(TLRequest): CONSTRUCTOR_ID = 0x8653febe SUBCLASS_OF_ID = 0x9b704a5a def __init__(self, stickerset: 'TypeInputStickerSet', sticker: 'TypeInputStickerSetItem'): """ :returns messages.StickerSet: Instance of either StickerSet, StickerSetNotModified. """ self.stickerset = stickerset self.sticker = sticker def to_dict(self): return { '_': 'AddStickerToSetRequest', 'stickerset': self.stickerset.to_dict() if isinstance(self.stickerset, TLObject) else self.stickerset, 'sticker': self.sticker.to_dict() if isinstance(self.sticker, TLObject) else self.sticker } def _bytes(self): return b''.join(( b'\xbe\xfeS\x86', self.stickerset._bytes(), self.sticker._bytes(), )) @classmethod def from_reader(cls, reader): _stickerset = reader.tgread_object() _sticker = reader.tgread_object() return cls(stickerset=_stickerset, sticker=_sticker) class ChangeStickerRequest(TLRequest): CONSTRUCTOR_ID = 0xf5537ebc SUBCLASS_OF_ID = 0x9b704a5a def __init__(self, sticker: 'TypeInputDocument', emoji: Optional[str]=None, mask_coords: Optional['TypeMaskCoords']=None, keywords: Optional[str]=None): """ :returns messages.StickerSet: Instance of either StickerSet, StickerSetNotModified. """ self.sticker = sticker self.emoji = emoji self.mask_coords = mask_coords self.keywords = keywords async def resolve(self, client, utils): self.sticker = utils.get_input_document(self.sticker) def to_dict(self): return { '_': 'ChangeStickerRequest', 'sticker': self.sticker.to_dict() if isinstance(self.sticker, TLObject) else self.sticker, 'emoji': self.emoji, 'mask_coords': self.mask_coords.to_dict() if isinstance(self.mask_coords, TLObject) else self.mask_coords, 'keywords': self.keywords } def _bytes(self): return b''.join(( b'\xbc~S\xf5', struct.pack('