Source code for hydrogram.raw.functions.phone.create_group_call
# Hydrogram - Telegram MTProto API Client Library for Python# Copyright (C) 2023-present Hydrogram <https://hydrogram.org>## This file is part of Hydrogram.## Hydrogram is free software: you can redistribute it and/or modify# it under the terms of the GNU Lesser General Public License as published# by the Free Software Foundation, either version 3 of the License, or# (at your option) any later version.## Hydrogram is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU Lesser General Public License for more details.## You should have received a copy of the GNU Lesser General Public License# along with Hydrogram. If not, see <http://www.gnu.org/licenses/>.fromioimportBytesIOfromhydrogram.raw.core.primitivesimportInt,Long,Int128,Int256,Bool,Bytes,String,Double,Vectorfromhydrogram.raw.coreimportTLObjectfromhydrogramimportrawfromtypingimportList,Optional,Any# # # # # # # # # # # # # # # # # # # # # # # ## !!! WARNING !!! ## This is a generated file! ## All changes made in this file will be lost! ## # # # # # # # # # # # # # # # # # # # # # # #
[docs]classCreateGroupCall(TLObject):# type: ignore"""Create a group call or livestream Details: - Layer: ``181`` - ID: ``48CDC6D8`` Parameters: peer (:obj:`InputPeer <hydrogram.raw.base.InputPeer>`): Associate the group call or livestream to the provided group/supergroup/channel random_id (``int`` ``32-bit``): Unique client message ID required to prevent creation of duplicate group calls rtmp_stream (``bool``, *optional*): Whether RTMP stream support should be enabled: only the group/supergroup/channel owner can use this flag. title (``str``, *optional*): Call title schedule_date (``int`` ``32-bit``, *optional*): For scheduled group call or livestreams, the absolute date when the group call will start Returns: :obj:`Updates <hydrogram.raw.base.Updates>` """__slots__:List[str]=["peer","random_id","rtmp_stream","title","schedule_date"]ID=0x48cdc6d8QUALNAME="functions.phone.CreateGroupCall"def__init__(self,*,peer:"raw.base.InputPeer",random_id:int,rtmp_stream:Optional[bool]=None,title:Optional[str]=None,schedule_date:Optional[int]=None)->None:self.peer=peer# InputPeerself.random_id=random_id# intself.rtmp_stream=rtmp_stream# flags.2?trueself.title=title# flags.0?stringself.schedule_date=schedule_date# flags.1?int@staticmethoddefread(b:BytesIO,*args:Any)->"CreateGroupCall":flags=Int.read(b)rtmp_stream=Trueifflags&(1<<2)elseFalsepeer=TLObject.read(b)random_id=Int.read(b)title=String.read(b)ifflags&(1<<0)elseNoneschedule_date=Int.read(b)ifflags&(1<<1)elseNonereturnCreateGroupCall(peer=peer,random_id=random_id,rtmp_stream=rtmp_stream,title=title,schedule_date=schedule_date)defwrite(self,*args)->bytes:b=BytesIO()b.write(Int(self.ID,False))flags=0flags|=(1<<2)ifself.rtmp_streamelse0flags|=(1<<0)ifself.titleisnotNoneelse0flags|=(1<<1)ifself.schedule_dateisnotNoneelse0b.write(Int(flags))b.write(self.peer.write())b.write(Int(self.random_id))ifself.titleisnotNone:b.write(String(self.title))ifself.schedule_dateisnotNone:b.write(Int(self.schedule_date))returnb.getvalue()