mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 09:05:13 +00:00
31 lines
540 B
Plaintext
31 lines
540 B
Plaintext
{notice}
|
|
|
|
from io import BytesIO
|
|
|
|
from pyrogram.api.core import *
|
|
|
|
|
|
class {class_name}(TLObject):
|
|
"""{docstring_args}
|
|
"""
|
|
|
|
__slots__ = [{slots}]
|
|
|
|
ID = {object_id}
|
|
QUALNAME = "{qualname}"
|
|
|
|
def __init__(self{arguments}):
|
|
{fields}
|
|
|
|
@staticmethod
|
|
def read(b: BytesIO, *args) -> "{class_name}":
|
|
{read_types}
|
|
return {class_name}({return_arguments})
|
|
|
|
def write(self) -> bytes:
|
|
b = BytesIO()
|
|
b.write(Int(self.ID, False))
|
|
|
|
{write_types}
|
|
return b.getvalue()
|