-
-
Notifications
You must be signed in to change notification settings - Fork 210
Expand file tree
/
Copy pathcombinator.txt
More file actions
35 lines (24 loc) · 748 Bytes
/
Copy pathcombinator.txt
File metadata and controls
35 lines (24 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{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: Any) -> bytes:
b = BytesIO()
b.write(Int(self.ID, False))
{write_types}
return b.getvalue()