"""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 TypeChannelMessagesFilter, TypeInputChannel class GetChannelDifferenceRequest(TLRequest): CONSTRUCTOR_ID = 0x3173d78 SUBCLASS_OF_ID = 0x29896f5d def __init__(self, channel: 'TypeInputChannel', filter: 'TypeChannelMessagesFilter', pts: int, limit: int, force: Optional[bool]=None): """ :returns updates.ChannelDifference: Instance of either ChannelDifferenceEmpty, ChannelDifferenceTooLong, ChannelDifference. """ self.channel = channel self.filter = filter self.pts = pts self.limit = limit self.force = force async def resolve(self, client, utils): self.channel = utils.get_input_channel(await client.get_input_entity(self.channel)) def to_dict(self): return { '_': 'GetChannelDifferenceRequest', 'channel': self.channel.to_dict() if isinstance(self.channel, TLObject) else self.channel, 'filter': self.filter.to_dict() if isinstance(self.filter, TLObject) else self.filter, 'pts': self.pts, 'limit': self.limit, 'force': self.force } def _bytes(self): return b''.join(( b'x=\x17\x03', struct.pack('