2017-12-05 11:16:39 +00:00
|
|
|
{notice}
|
|
|
|
|
|
|
|
from io import BytesIO
|
|
|
|
|
|
|
|
from pyrogram.api.core import *
|
|
|
|
|
|
|
|
|
|
|
|
class {class_name}(Object):
|
2018-03-26 11:51:56 +00:00
|
|
|
"""{docstring_args}
|
2018-01-03 16:40:38 +00:00
|
|
|
"""
|
2017-12-05 11:16:39 +00:00
|
|
|
ID = {object_id}
|
|
|
|
|
2018-03-23 12:46:43 +00:00
|
|
|
def __init__(self{arguments}):
|
2017-12-05 11:16:39 +00:00
|
|
|
{fields}
|
|
|
|
|
|
|
|
@staticmethod
|
2017-12-06 18:31:30 +00:00
|
|
|
def read(b: BytesIO, *args) -> "{class_name}":
|
2017-12-05 11:16:39 +00:00
|
|
|
{read_flags}
|
|
|
|
{read_types}
|
|
|
|
return {class_name}({return_arguments})
|
|
|
|
|
|
|
|
def write(self) -> bytes:
|
|
|
|
b = BytesIO()
|
|
|
|
b.write(Int(self.ID, False))
|
|
|
|
|
|
|
|
{write_flags}
|
|
|
|
{write_types}
|
|
|
|
return b.getvalue()
|