mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-30 17:43:32 +00:00
4d933b80f9
* Avoid variable conflicts with Telegram TL schema * Fix game button with no data attached to button * Update combinator.txt * Update compiler.py * Update tl_object.py Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
36 lines
733 B
Plaintext
36 lines
733 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, Union, 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) -> bytes:
|
|
b = BytesIO()
|
|
b.write(Int(self.ID, False))
|
|
|
|
{write_types}
|
|
return b.getvalue()
|