Source code for pyrogram.raw.functions.channels.set_boosts_to_unblock_restrictions

#  Pyrogram - Telegram MTProto API Client Library for Python
#  Copyright (C) 2017-present Dan <https://github.com/delivrance>
#
#  This file is part of Pyrogram.
#
#  Pyrogram 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.
#
#  Pyrogram 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 Pyrogram.  If not, see <http://www.gnu.org/licenses/>.

from io import BytesIO

from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
from pyrogram.raw.core import TLObject
from pyrogram import raw
from typing import List, Optional, Any

# # # # # # # # # # # # # # # # # # # # # # # #
#               !!! WARNING !!!               #
#          This is a generated file!          #
# All changes made in this file will be lost! #
# # # # # # # # # # # # # # # # # # # # # # # #


[docs] class SetBoostsToUnblockRestrictions(TLObject): # type: ignore """Admins with `ban_users admin rights » <https://core.telegram.org/constructor/chatAdminRights>`_ may allow users that apply a certain number of `booosts » <https://core.telegram.org/api/boost>`_ to the group to bypass `slow mode » <https://core.telegram.org/method/channels.toggleSlowMode>`_ and `other » <https://core.telegram.org/api/rights#default-rights>`_ supergroup restrictions, see `here » <https://core.telegram.org/api/boost#bypass-slowmode-and-chat-restrictions>`_ for more info. .. include:: /_includes/usable-by/users.rst Details: - Layer: ``229`` - ID: ``AD399CEE`` Parameters: channel (:obj:`InputChannel <pyrogram.raw.base.InputChannel>`): The supergroup. boosts (``int`` ``32-bit``): The number of required boosts (1-8, 0 to disable). Returns: :obj:`Updates <pyrogram.raw.base.Updates>` """ __slots__: List[str] = ["channel", "boosts"] ID = 0xad399cee QUALNAME = "functions.channels.SetBoostsToUnblockRestrictions" def __init__(self, *, channel: "raw.base.InputChannel", boosts: int) -> None: self.channel = channel # InputChannel self.boosts = boosts # int @staticmethod def read(b: BytesIO, *args: Any) -> "SetBoostsToUnblockRestrictions": # No flags channel = TLObject.read(b) boosts = Int.read(b) return SetBoostsToUnblockRestrictions(channel=channel, boosts=boosts) def write(self, *args) -> bytes: b = BytesIO() b.write(Int(self.ID, False)) # No flags b.write(self.channel.write()) b.write(Int(self.boosts)) return b.getvalue()