File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
pyrogram/api/core/primitives Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ def finish(self):
125125
126126 f .write ("\n 0xbc799737: \" core.BoolFalse\" ," )
127127 f .write ("\n 0x997275b5: \" core.BoolTrue\" ," )
128+ f .write ("\n 0x56730bcc: \" core.Null\" ," )
128129 f .write ("\n 0x1cb5c415: \" core.Vector\" ," )
129130 f .write ("\n 0x73f1f8dc: \" core.MsgContainer\" ," )
130131 f .write ("\n 0xae500895: \" core.FutureSalts\" ," )
Original file line number Diff line number Diff line change 77---types ---
88
99// boolFalse#bc799737 = Bool; // Parsed manually
10- // boolTrue#997275b5 = Bool; // parsed manually
10+ // boolTrue#997275b5 = Bool; // Parsed manually
1111
1212// true#3fedd339 = True; // Not used
1313
1414// vector#1cb5c415 {t:Type} # [ t ] = Vector t; // Parsed manually
1515
1616// error#c4b9f9bb code:int text:string = Error; // Not used
1717
18- // null#56730bcc = Null; // Not used
18+ // null#56730bcc = Null; // Parsed manually
1919
2020inputPeerEmpty#7f3b18ea = InputPeer ;
2121inputPeerSelf#7da07ec9 = InputPeer ;
Original file line number Diff line number Diff line change 2020from .bytes import Bytes
2121from .double import Double
2222from .int import Int , Long , Int128 , Int256
23+ from .null import Null
2324from .string import String
2425from .vector import Vector
Original file line number Diff line number Diff line change 1+ # Pyrogram - Telegram MTProto API Client Library for Python
2+ # Copyright (C) 2017 Dan Tès <https://github.com/delivrance>
3+ #
4+ # This file is part of Pyrogram.
5+ #
6+ # Pyrogram is free software: you can redistribute it and/or modify
7+ # it under the terms of the GNU Lesser General Public License as published
8+ # by the Free Software Foundation, either version 3 of the License, or
9+ # (at your option) any later version.
10+ #
11+ # Pyrogram is distributed in the hope that it will be useful,
12+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ # GNU Lesser General Public License for more details.
15+ #
16+ # You should have received a copy of the GNU Lesser General Public License
17+ # along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
18+
19+ from io import BytesIO
20+
21+ from ..object import Object
22+
23+
24+ class Null (Object ):
25+ ID = 0x56730bcc
26+
27+ @staticmethod
28+ def read (b : BytesIO , * args ) -> None :
29+ return None
30+
31+ def __new__ (cls ) -> bytes :
32+ return int .to_bytes (cls .ID , 4 , "little" )
You can’t perform that action at this time.
0 commit comments