mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
29 lines
530 B
Text
29 lines
530 B
Text
{notice}
|
|
|
|
from io import BytesIO
|
|
|
|
from pyrogram.api.core import *
|
|
|
|
|
|
class {class_name}(Object):
|
|
"""
|
|
{docstring_args}
|
|
"""
|
|
ID = {object_id}
|
|
|
|
def __init__(self{arguments}):
|
|
{fields}
|
|
|
|
@staticmethod
|
|
def read(b: BytesIO, *args) -> "{class_name}":
|
|
{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()
|