Source code for hydrogram.raw.functions.phone.join_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]classJoinGroupCall(TLObject):# type: ignore"""Join a group call Details: - Layer: ``181`` - ID: ``B132FF7B`` Parameters: call (:obj:`InputGroupCall <hydrogram.raw.base.InputGroupCall>`): The group call join_as (:obj:`InputPeer <hydrogram.raw.base.InputPeer>`): Join the group call, presenting yourself as the specified user/channel params (:obj:`DataJSON <hydrogram.raw.base.DataJSON>`): WebRTC parameters muted (``bool``, *optional*): If set, the user will be muted by default upon joining. video_stopped (``bool``, *optional*): If set, the user's video will be disabled by default upon joining. invite_hash (``str``, *optional*): The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat. Returns: :obj:`Updates <hydrogram.raw.base.Updates>` """__slots__:List[str]=["call","join_as","params","muted","video_stopped","invite_hash"]ID=0xb132ff7bQUALNAME="functions.phone.JoinGroupCall"def__init__(self,*,call:"raw.base.InputGroupCall",join_as:"raw.base.InputPeer",params:"raw.base.DataJSON",muted:Optional[bool]=None,video_stopped:Optional[bool]=None,invite_hash:Optional[str]=None)->None:self.call=call# InputGroupCallself.join_as=join_as# InputPeerself.params=params# DataJSONself.muted=muted# flags.0?trueself.video_stopped=video_stopped# flags.2?trueself.invite_hash=invite_hash# flags.1?string@staticmethoddefread(b:BytesIO,*args:Any)->"JoinGroupCall":flags=Int.read(b)muted=Trueifflags&(1<<0)elseFalsevideo_stopped=Trueifflags&(1<<2)elseFalsecall=TLObject.read(b)join_as=TLObject.read(b)invite_hash=String.read(b)ifflags&(1<<1)elseNoneparams=TLObject.read(b)returnJoinGroupCall(call=call,join_as=join_as,params=params,muted=muted,video_stopped=video_stopped,invite_hash=invite_hash)defwrite(self,*args)->bytes:b=BytesIO()b.write(Int(self.ID,False))flags=0flags|=(1<<0)ifself.mutedelse0flags|=(1<<2)ifself.video_stoppedelse0flags|=(1<<1)ifself.invite_hashisnotNoneelse0b.write(Int(flags))b.write(self.call.write())b.write(self.join_as.write())ifself.invite_hashisnotNone:b.write(String(self.invite_hash))b.write(self.params.write())returnb.getvalue()