mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
36 lines
743 B
Plaintext
36 lines
743 B
Plaintext
{notice}
|
|
|
|
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}
|
|
|
|
|
|
class {name}(TLObject): # type: ignore
|
|
"""{docstring}
|
|
"""
|
|
|
|
__slots__: List[str] = [{slots}]
|
|
|
|
ID = {id}
|
|
QUALNAME = "{qualname}"
|
|
|
|
def __init__(self{arguments}) -> None:
|
|
{fields}
|
|
|
|
@staticmethod
|
|
def read(b: BytesIO, *args: Any) -> "{name}":
|
|
{read_types}
|
|
return {name}({return_arguments})
|
|
|
|
def write(self, *args) -> bytes:
|
|
b = BytesIO()
|
|
b.write(Int(self.ID, False))
|
|
|
|
{write_types}
|
|
return b.getvalue()
|