Source code for hydrogram.raw.functions.phone.toggle_group_call_settings
# 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]classToggleGroupCallSettings(TLObject):# type: ignore"""Change group call settings Details: - Layer: ``181`` - ID: ``74BBB43D`` Parameters: call (:obj:`InputGroupCall <hydrogram.raw.base.InputGroupCall>`): Group call reset_invite_hash (``bool``, *optional*): Invalidate existing invite links join_muted (``bool``, *optional*): Whether all users will that join this group call are muted by default upon joining the group call Returns: :obj:`Updates <hydrogram.raw.base.Updates>` """__slots__:List[str]=["call","reset_invite_hash","join_muted"]ID=0x74bbb43dQUALNAME="functions.phone.ToggleGroupCallSettings"def__init__(self,*,call:"raw.base.InputGroupCall",reset_invite_hash:Optional[bool]=None,join_muted:Optional[bool]=None)->None:self.call=call# InputGroupCallself.reset_invite_hash=reset_invite_hash# flags.1?trueself.join_muted=join_muted# flags.0?Bool@staticmethoddefread(b:BytesIO,*args:Any)->"ToggleGroupCallSettings":flags=Int.read(b)reset_invite_hash=Trueifflags&(1<<1)elseFalsecall=TLObject.read(b)join_muted=Bool.read(b)ifflags&(1<<0)elseNonereturnToggleGroupCallSettings(call=call,reset_invite_hash=reset_invite_hash,join_muted=join_muted)defwrite(self,*args)->bytes:b=BytesIO()b.write(Int(self.ID,False))flags=0flags|=(1<<1)ifself.reset_invite_hashelse0flags|=(1<<0)ifself.join_mutedisnotNoneelse0b.write(Int(flags))b.write(self.call.write())ifself.join_mutedisnotNone:b.write(Bool(self.join_muted))returnb.getvalue()