@tgsnake/skema 3.1.0-browser.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/src/deps.d.ts +3 -4
  2. package/dist/src/deps.js +4 -4
  3. package/dist/src/raw/class/All.d.ts +1 -1
  4. package/dist/src/raw/class/All.js +2739 -2739
  5. package/dist/src/raw/class/Raw.d.ts +7516 -7516
  6. package/dist/src/raw/class/Raw.js +20426 -26448
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1813 -1983
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +117 -128
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +714 -849
  13. package/dist/src/raw/class/tl/bots.d.ts +231 -231
  14. package/dist/src/raw/class/tl/bots.js +504 -524
  15. package/dist/src/raw/class/tl/channels.d.ts +331 -331
  16. package/dist/src/raw/class/tl/channels.js +732 -823
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +183 -196
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +138 -159
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +492 -537
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +152 -204
  25. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  26. package/dist/src/raw/class/tl/folders.js +11 -11
  27. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  28. package/dist/src/raw/class/tl/fragment.js +25 -32
  29. package/dist/src/raw/class/tl/help.d.ts +286 -286
  30. package/dist/src/raw/class/tl/help.js +618 -686
  31. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  32. package/dist/src/raw/class/tl/langpack.js +57 -57
  33. package/dist/src/raw/class/tl/messages.d.ts +1851 -1851
  34. package/dist/src/raw/class/tl/messages.js +4854 -5924
  35. package/dist/src/raw/class/tl/payments.d.ts +641 -641
  36. package/dist/src/raw/class/tl/payments.js +1734 -2198
  37. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  38. package/dist/src/raw/class/tl/phone.js +644 -779
  39. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  40. package/dist/src/raw/class/tl/photos.js +116 -139
  41. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  42. package/dist/src/raw/class/tl/premium.js +111 -133
  43. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  44. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  45. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  46. package/dist/src/raw/class/tl/stats.js +169 -268
  47. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  48. package/dist/src/raw/class/tl/stickers.js +144 -173
  49. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  50. package/dist/src/raw/class/tl/storage.js +71 -71
  51. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  52. package/dist/src/raw/class/tl/stories.js +622 -781
  53. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  54. package/dist/src/raw/class/tl/toncenter.js +47 -52
  55. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  56. package/dist/src/raw/class/tl/updates.js +175 -246
  57. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  58. package/dist/src/raw/class/tl/upload.js +155 -178
  59. package/dist/src/raw/class/tl/users.d.ts +61 -61
  60. package/dist/src/raw/class/tl/users.js +124 -124
  61. package/dist/src/raw/class/tl/wallet.d.ts +206 -206
  62. package/dist/src/raw/class/tl/wallet.js +525 -591
  63. package/dist/src/raw/class/types.d.ts +1 -1
  64. package/dist/src/raw/class/types.js +1 -1
  65. package/package.json +4 -6
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -17,51 +17,46 @@ export class ChannelParticipants extends TLObject {
17
17
  users;
18
18
  constructor(params) {
19
19
  super();
20
- this.classType = 'types';
21
- this.className = 'channels.ChannelParticipants';
20
+ this.classType = "types";
21
+ this.className = "channels.ChannelParticipants";
22
22
  this.constructorId = 0x9ab0feaf;
23
23
  this.subclassOfId = 0xe60a6e64;
24
- this._slots = ['count', 'participants', 'chats', 'users'];
24
+ this._slots = ["count", "participants", "chats", "users"];
25
25
  this.count = params.count;
26
26
  this.participants = params.participants;
27
27
  this.chats = params.chats;
28
28
  this.users = params.users;
29
29
  }
30
30
  /**
31
- * Generate the TLObject from buffer.
32
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
33
- */
31
+ * Generate the TLObject from buffer.
32
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
33
+ */
34
34
  static async read(_data, ..._args) {
35
35
  // no flags
36
36
  let count = await Primitive.Int.read(_data);
37
37
  let participants = await TLObject.read(_data);
38
38
  let chats = await TLObject.read(_data);
39
39
  let users = await TLObject.read(_data);
40
- return new ChannelParticipants({
41
- count: count,
42
- participants: participants,
43
- chats: chats,
44
- users: users,
45
- });
40
+ return new ChannelParticipants({ "count": count, "participants": participants, "chats": chats, "users": users });
46
41
  }
47
42
  /**
48
- * Generate buffer from TLObject.
49
- */
43
+ * Generate buffer from TLObject.
44
+ */
50
45
  write() {
51
46
  const b = new BytesIO();
52
47
  b.write(Primitive.Int.write(this.constructorId, false));
53
48
  // no flags
54
49
  if (this.count !== undefined) {
55
- b.write(Primitive.Int.write(this.count));
50
+ b.write((Primitive.Int.write(this.count)));
56
51
  }
57
52
  if (this.participants) {
58
- b.write(Primitive.Vector.write(this.participants));
53
+ b.write((Primitive.Vector.write(this.participants)));
59
54
  }
60
55
  if (this.chats) {
61
- b.write(Primitive.Vector.write(this.chats));
56
+ b.write((Primitive.Vector.write(this.chats)));
62
57
  }
63
58
  if (this.users) {
64
- b.write(Primitive.Vector.write(this.users));
59
+ b.write((Primitive.Vector.write(this.users)));
65
60
  }
66
61
  return b.buffer;
67
62
  }
@@ -69,23 +64,23 @@ export class ChannelParticipants extends TLObject {
69
64
  export class ChannelParticipantsNotModified extends TLObject {
70
65
  constructor() {
71
66
  super();
72
- this.classType = 'types';
73
- this.className = 'channels.ChannelParticipantsNotModified';
67
+ this.classType = "types";
68
+ this.className = "channels.ChannelParticipantsNotModified";
74
69
  this.constructorId = 0xf0173fe9;
75
70
  this.subclassOfId = 0xe60a6e64;
76
71
  this._slots = [];
77
72
  }
78
73
  /**
79
- * Generate the TLObject from buffer.
80
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
81
- */
74
+ * Generate the TLObject from buffer.
75
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
76
+ */
82
77
  static async read(_data, ..._args) {
83
78
  // no flags
84
79
  return new ChannelParticipantsNotModified();
85
80
  }
86
81
  /**
87
- * Generate buffer from TLObject.
88
- */
82
+ * Generate buffer from TLObject.
83
+ */
89
84
  write() {
90
85
  const b = new BytesIO();
91
86
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -99,29 +94,29 @@ export class ChannelParticipant extends TLObject {
99
94
  users;
100
95
  constructor(params) {
101
96
  super();
102
- this.classType = 'types';
103
- this.className = 'channels.ChannelParticipant';
97
+ this.classType = "types";
98
+ this.className = "channels.ChannelParticipant";
104
99
  this.constructorId = 0xdfb80317;
105
100
  this.subclassOfId = 0x6658151a;
106
- this._slots = ['participant', 'chats', 'users'];
101
+ this._slots = ["participant", "chats", "users"];
107
102
  this.participant = params.participant;
108
103
  this.chats = params.chats;
109
104
  this.users = params.users;
110
105
  }
111
106
  /**
112
- * Generate the TLObject from buffer.
113
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
114
- */
107
+ * Generate the TLObject from buffer.
108
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
109
+ */
115
110
  static async read(_data, ..._args) {
116
111
  // no flags
117
112
  let participant = await TLObject.read(_data);
118
113
  let chats = await TLObject.read(_data);
119
114
  let users = await TLObject.read(_data);
120
- return new ChannelParticipant({ participant: participant, chats: chats, users: users });
115
+ return new ChannelParticipant({ "participant": participant, "chats": chats, "users": users });
121
116
  }
122
117
  /**
123
- * Generate buffer from TLObject.
124
- */
118
+ * Generate buffer from TLObject.
119
+ */
125
120
  write() {
126
121
  const b = new BytesIO();
127
122
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -130,10 +125,10 @@ export class ChannelParticipant extends TLObject {
130
125
  b.write(this.participant.write());
131
126
  }
132
127
  if (this.chats) {
133
- b.write(Primitive.Vector.write(this.chats));
128
+ b.write((Primitive.Vector.write(this.chats)));
134
129
  }
135
130
  if (this.users) {
136
- b.write(Primitive.Vector.write(this.users));
131
+ b.write((Primitive.Vector.write(this.users)));
137
132
  }
138
133
  return b.buffer;
139
134
  }
@@ -144,41 +139,41 @@ export class AdminLogResults extends TLObject {
144
139
  users;
145
140
  constructor(params) {
146
141
  super();
147
- this.classType = 'types';
148
- this.className = 'channels.AdminLogResults';
142
+ this.classType = "types";
143
+ this.className = "channels.AdminLogResults";
149
144
  this.constructorId = 0xed8af74d;
150
145
  this.subclassOfId = 0x51f076bc;
151
- this._slots = ['events', 'chats', 'users'];
146
+ this._slots = ["events", "chats", "users"];
152
147
  this.events = params.events;
153
148
  this.chats = params.chats;
154
149
  this.users = params.users;
155
150
  }
156
151
  /**
157
- * Generate the TLObject from buffer.
158
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
159
- */
152
+ * Generate the TLObject from buffer.
153
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
154
+ */
160
155
  static async read(_data, ..._args) {
161
156
  // no flags
162
157
  let events = await TLObject.read(_data);
163
158
  let chats = await TLObject.read(_data);
164
159
  let users = await TLObject.read(_data);
165
- return new AdminLogResults({ events: events, chats: chats, users: users });
160
+ return new AdminLogResults({ "events": events, "chats": chats, "users": users });
166
161
  }
167
162
  /**
168
- * Generate buffer from TLObject.
169
- */
163
+ * Generate buffer from TLObject.
164
+ */
170
165
  write() {
171
166
  const b = new BytesIO();
172
167
  b.write(Primitive.Int.write(this.constructorId, false));
173
168
  // no flags
174
169
  if (this.events) {
175
- b.write(Primitive.Vector.write(this.events));
170
+ b.write((Primitive.Vector.write(this.events)));
176
171
  }
177
172
  if (this.chats) {
178
- b.write(Primitive.Vector.write(this.chats));
173
+ b.write((Primitive.Vector.write(this.chats)));
179
174
  }
180
175
  if (this.users) {
181
- b.write(Primitive.Vector.write(this.users));
176
+ b.write((Primitive.Vector.write(this.users)));
182
177
  }
183
178
  return b.buffer;
184
179
  }
@@ -189,41 +184,41 @@ export class SendAsPeers extends TLObject {
189
184
  users;
190
185
  constructor(params) {
191
186
  super();
192
- this.classType = 'types';
193
- this.className = 'channels.SendAsPeers';
187
+ this.classType = "types";
188
+ this.className = "channels.SendAsPeers";
194
189
  this.constructorId = 0xf496b0c6;
195
190
  this.subclassOfId = 0x38cb8d21;
196
- this._slots = ['peers', 'chats', 'users'];
191
+ this._slots = ["peers", "chats", "users"];
197
192
  this.peers = params.peers;
198
193
  this.chats = params.chats;
199
194
  this.users = params.users;
200
195
  }
201
196
  /**
202
- * Generate the TLObject from buffer.
203
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
204
- */
197
+ * Generate the TLObject from buffer.
198
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
199
+ */
205
200
  static async read(_data, ..._args) {
206
201
  // no flags
207
202
  let peers = await TLObject.read(_data);
208
203
  let chats = await TLObject.read(_data);
209
204
  let users = await TLObject.read(_data);
210
- return new SendAsPeers({ peers: peers, chats: chats, users: users });
205
+ return new SendAsPeers({ "peers": peers, "chats": chats, "users": users });
211
206
  }
212
207
  /**
213
- * Generate buffer from TLObject.
214
- */
208
+ * Generate buffer from TLObject.
209
+ */
215
210
  write() {
216
211
  const b = new BytesIO();
217
212
  b.write(Primitive.Int.write(this.constructorId, false));
218
213
  // no flags
219
214
  if (this.peers) {
220
- b.write(Primitive.Vector.write(this.peers));
215
+ b.write((Primitive.Vector.write(this.peers)));
221
216
  }
222
217
  if (this.chats) {
223
- b.write(Primitive.Vector.write(this.chats));
218
+ b.write((Primitive.Vector.write(this.chats)));
224
219
  }
225
220
  if (this.users) {
226
- b.write(Primitive.Vector.write(this.users));
221
+ b.write((Primitive.Vector.write(this.users)));
227
222
  }
228
223
  return b.buffer;
229
224
  }
@@ -233,36 +228,36 @@ export class SponsoredMessageReportResultChooseOption extends TLObject {
233
228
  options;
234
229
  constructor(params) {
235
230
  super();
236
- this.classType = 'types';
237
- this.className = 'channels.SponsoredMessageReportResultChooseOption';
231
+ this.classType = "types";
232
+ this.className = "channels.SponsoredMessageReportResultChooseOption";
238
233
  this.constructorId = 0x846f9e42;
239
234
  this.subclassOfId = 0x26231822;
240
- this._slots = ['title', 'options'];
235
+ this._slots = ["title", "options"];
241
236
  this.title = params.title;
242
237
  this.options = params.options;
243
238
  }
244
239
  /**
245
- * Generate the TLObject from buffer.
246
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
247
- */
240
+ * Generate the TLObject from buffer.
241
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
242
+ */
248
243
  static async read(_data, ..._args) {
249
244
  // no flags
250
245
  let title = await Primitive.String.read(_data);
251
246
  let options = await TLObject.read(_data);
252
- return new SponsoredMessageReportResultChooseOption({ title: title, options: options });
247
+ return new SponsoredMessageReportResultChooseOption({ "title": title, "options": options });
253
248
  }
254
249
  /**
255
- * Generate buffer from TLObject.
256
- */
250
+ * Generate buffer from TLObject.
251
+ */
257
252
  write() {
258
253
  const b = new BytesIO();
259
254
  b.write(Primitive.Int.write(this.constructorId, false));
260
255
  // no flags
261
256
  if (this.title !== undefined) {
262
- b.write(Primitive.String.write(this.title));
257
+ b.write((Primitive.String.write(this.title)));
263
258
  }
264
259
  if (this.options) {
265
- b.write(Primitive.Vector.write(this.options));
260
+ b.write((Primitive.Vector.write(this.options)));
266
261
  }
267
262
  return b.buffer;
268
263
  }
@@ -270,23 +265,23 @@ export class SponsoredMessageReportResultChooseOption extends TLObject {
270
265
  export class SponsoredMessageReportResultAdsHidden extends TLObject {
271
266
  constructor() {
272
267
  super();
273
- this.classType = 'types';
274
- this.className = 'channels.SponsoredMessageReportResultAdsHidden';
268
+ this.classType = "types";
269
+ this.className = "channels.SponsoredMessageReportResultAdsHidden";
275
270
  this.constructorId = 0x3e3bcf2f;
276
271
  this.subclassOfId = 0x26231822;
277
272
  this._slots = [];
278
273
  }
279
274
  /**
280
- * Generate the TLObject from buffer.
281
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
282
- */
275
+ * Generate the TLObject from buffer.
276
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
277
+ */
283
278
  static async read(_data, ..._args) {
284
279
  // no flags
285
280
  return new SponsoredMessageReportResultAdsHidden();
286
281
  }
287
282
  /**
288
- * Generate buffer from TLObject.
289
- */
283
+ * Generate buffer from TLObject.
284
+ */
290
285
  write() {
291
286
  const b = new BytesIO();
292
287
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -297,23 +292,23 @@ export class SponsoredMessageReportResultAdsHidden extends TLObject {
297
292
  export class SponsoredMessageReportResultReported extends TLObject {
298
293
  constructor() {
299
294
  super();
300
- this.classType = 'types';
301
- this.className = 'channels.SponsoredMessageReportResultReported';
295
+ this.classType = "types";
296
+ this.className = "channels.SponsoredMessageReportResultReported";
302
297
  this.constructorId = 0xad798849;
303
298
  this.subclassOfId = 0x26231822;
304
299
  this._slots = [];
305
300
  }
306
301
  /**
307
- * Generate the TLObject from buffer.
308
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
309
- */
302
+ * Generate the TLObject from buffer.
303
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
304
+ */
310
305
  static async read(_data, ..._args) {
311
306
  // no flags
312
307
  return new SponsoredMessageReportResultReported();
313
308
  }
314
309
  /**
315
- * Generate buffer from TLObject.
316
- */
310
+ * Generate buffer from TLObject.
311
+ */
317
312
  write() {
318
313
  const b = new BytesIO();
319
314
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -327,27 +322,27 @@ export class ReadHistory extends TLObject {
327
322
  maxId;
328
323
  constructor(params) {
329
324
  super();
330
- this.classType = 'functions';
331
- this.className = 'channels.ReadHistory';
325
+ this.classType = "functions";
326
+ this.className = "channels.ReadHistory";
332
327
  this.constructorId = 0xcc104937;
333
328
  this.subclassOfId = 0xf5b399ac;
334
- this._slots = ['channel', 'maxId'];
329
+ this._slots = ["channel", "maxId"];
335
330
  this.channel = params.channel;
336
331
  this.maxId = params.maxId;
337
332
  }
338
333
  /**
339
- * Generate the TLObject from buffer.
340
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
341
- */
334
+ * Generate the TLObject from buffer.
335
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
336
+ */
342
337
  static async read(_data, ..._args) {
343
338
  // no flags
344
339
  let channel = await TLObject.read(_data);
345
340
  let maxId = await Primitive.Int.read(_data);
346
- return new ReadHistory({ channel: channel, maxId: maxId });
341
+ return new ReadHistory({ "channel": channel, "maxId": maxId });
347
342
  }
348
343
  /**
349
- * Generate buffer from TLObject.
350
- */
344
+ * Generate buffer from TLObject.
345
+ */
351
346
  write() {
352
347
  const b = new BytesIO();
353
348
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -356,7 +351,7 @@ export class ReadHistory extends TLObject {
356
351
  b.write(this.channel.write());
357
352
  }
358
353
  if (this.maxId !== undefined) {
359
- b.write(Primitive.Int.write(this.maxId));
354
+ b.write((Primitive.Int.write(this.maxId)));
360
355
  }
361
356
  return b.buffer;
362
357
  }
@@ -367,27 +362,27 @@ export class DeleteMessages extends TLObject {
367
362
  id;
368
363
  constructor(params) {
369
364
  super();
370
- this.classType = 'functions';
371
- this.className = 'channels.DeleteMessages';
365
+ this.classType = "functions";
366
+ this.className = "channels.DeleteMessages";
372
367
  this.constructorId = 0x84c1fd4e;
373
368
  this.subclassOfId = 0xced3c06e;
374
- this._slots = ['channel', 'id'];
369
+ this._slots = ["channel", "id"];
375
370
  this.channel = params.channel;
376
371
  this.id = params.id;
377
372
  }
378
373
  /**
379
- * Generate the TLObject from buffer.
380
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
381
- */
374
+ * Generate the TLObject from buffer.
375
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
376
+ */
382
377
  static async read(_data, ..._args) {
383
378
  // no flags
384
379
  let channel = await TLObject.read(_data);
385
380
  let id = await TLObject.read(_data, Primitive.Int);
386
- return new DeleteMessages({ channel: channel, id: id });
381
+ return new DeleteMessages({ "channel": channel, "id": id });
387
382
  }
388
383
  /**
389
- * Generate buffer from TLObject.
390
- */
384
+ * Generate buffer from TLObject.
385
+ */
391
386
  write() {
392
387
  const b = new BytesIO();
393
388
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -396,7 +391,7 @@ export class DeleteMessages extends TLObject {
396
391
  b.write(this.channel.write());
397
392
  }
398
393
  if (this.id) {
399
- b.write(Primitive.Vector.write(this.id, Primitive.Int));
394
+ b.write((Primitive.Vector.write(this.id, Primitive.Int)));
400
395
  }
401
396
  return b.buffer;
402
397
  }
@@ -408,29 +403,29 @@ export class ReportSpam extends TLObject {
408
403
  id;
409
404
  constructor(params) {
410
405
  super();
411
- this.classType = 'functions';
412
- this.className = 'channels.ReportSpam';
406
+ this.classType = "functions";
407
+ this.className = "channels.ReportSpam";
413
408
  this.constructorId = 0xf44a8315;
414
409
  this.subclassOfId = 0xf5b399ac;
415
- this._slots = ['channel', 'participant', 'id'];
410
+ this._slots = ["channel", "participant", "id"];
416
411
  this.channel = params.channel;
417
412
  this.participant = params.participant;
418
413
  this.id = params.id;
419
414
  }
420
415
  /**
421
- * Generate the TLObject from buffer.
422
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
423
- */
416
+ * Generate the TLObject from buffer.
417
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
418
+ */
424
419
  static async read(_data, ..._args) {
425
420
  // no flags
426
421
  let channel = await TLObject.read(_data);
427
422
  let participant = await TLObject.read(_data);
428
423
  let id = await TLObject.read(_data, Primitive.Int);
429
- return new ReportSpam({ channel: channel, participant: participant, id: id });
424
+ return new ReportSpam({ "channel": channel, "participant": participant, "id": id });
430
425
  }
431
426
  /**
432
- * Generate buffer from TLObject.
433
- */
427
+ * Generate buffer from TLObject.
428
+ */
434
429
  write() {
435
430
  const b = new BytesIO();
436
431
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -442,7 +437,7 @@ export class ReportSpam extends TLObject {
442
437
  b.write(this.participant.write());
443
438
  }
444
439
  if (this.id) {
445
- b.write(Primitive.Vector.write(this.id, Primitive.Int));
440
+ b.write((Primitive.Vector.write(this.id, Primitive.Int)));
446
441
  }
447
442
  return b.buffer;
448
443
  }
@@ -453,27 +448,27 @@ export class GetMessages extends TLObject {
453
448
  id;
454
449
  constructor(params) {
455
450
  super();
456
- this.classType = 'functions';
457
- this.className = 'channels.GetMessages';
451
+ this.classType = "functions";
452
+ this.className = "channels.GetMessages";
458
453
  this.constructorId = 0xad8c9a23;
459
454
  this.subclassOfId = 0xd4b40b5e;
460
- this._slots = ['channel', 'id'];
455
+ this._slots = ["channel", "id"];
461
456
  this.channel = params.channel;
462
457
  this.id = params.id;
463
458
  }
464
459
  /**
465
- * Generate the TLObject from buffer.
466
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
467
- */
460
+ * Generate the TLObject from buffer.
461
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
462
+ */
468
463
  static async read(_data, ..._args) {
469
464
  // no flags
470
465
  let channel = await TLObject.read(_data);
471
466
  let id = await TLObject.read(_data);
472
- return new GetMessages({ channel: channel, id: id });
467
+ return new GetMessages({ "channel": channel, "id": id });
473
468
  }
474
469
  /**
475
- * Generate buffer from TLObject.
476
- */
470
+ * Generate buffer from TLObject.
471
+ */
477
472
  write() {
478
473
  const b = new BytesIO();
479
474
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -482,7 +477,7 @@ export class GetMessages extends TLObject {
482
477
  b.write(this.channel.write());
483
478
  }
484
479
  if (this.id) {
485
- b.write(Primitive.Vector.write(this.id));
480
+ b.write((Primitive.Vector.write(this.id)));
486
481
  }
487
482
  return b.buffer;
488
483
  }
@@ -496,11 +491,11 @@ export class GetParticipants extends TLObject {
496
491
  hash;
497
492
  constructor(params) {
498
493
  super();
499
- this.classType = 'functions';
500
- this.className = 'channels.GetParticipants';
494
+ this.classType = "functions";
495
+ this.className = "channels.GetParticipants";
501
496
  this.constructorId = 0x77ced9d0;
502
497
  this.subclassOfId = 0xe60a6e64;
503
- this._slots = ['channel', 'filter', 'offset', 'limit', 'hash'];
498
+ this._slots = ["channel", "filter", "offset", "limit", "hash"];
504
499
  this.channel = params.channel;
505
500
  this.filter = params.filter;
506
501
  this.offset = params.offset;
@@ -508,9 +503,9 @@ export class GetParticipants extends TLObject {
508
503
  this.hash = params.hash;
509
504
  }
510
505
  /**
511
- * Generate the TLObject from buffer.
512
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
513
- */
506
+ * Generate the TLObject from buffer.
507
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
508
+ */
514
509
  static async read(_data, ..._args) {
515
510
  // no flags
516
511
  let channel = await TLObject.read(_data);
@@ -518,17 +513,11 @@ export class GetParticipants extends TLObject {
518
513
  let offset = await Primitive.Int.read(_data);
519
514
  let limit = await Primitive.Int.read(_data);
520
515
  let hash = await Primitive.Long.read(_data);
521
- return new GetParticipants({
522
- channel: channel,
523
- filter: filter,
524
- offset: offset,
525
- limit: limit,
526
- hash: hash,
527
- });
516
+ return new GetParticipants({ "channel": channel, "filter": filter, "offset": offset, "limit": limit, "hash": hash });
528
517
  }
529
518
  /**
530
- * Generate buffer from TLObject.
531
- */
519
+ * Generate buffer from TLObject.
520
+ */
532
521
  write() {
533
522
  const b = new BytesIO();
534
523
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -540,13 +529,13 @@ export class GetParticipants extends TLObject {
540
529
  b.write(this.filter.write());
541
530
  }
542
531
  if (this.offset !== undefined) {
543
- b.write(Primitive.Int.write(this.offset));
532
+ b.write((Primitive.Int.write(this.offset)));
544
533
  }
545
534
  if (this.limit !== undefined) {
546
- b.write(Primitive.Int.write(this.limit));
535
+ b.write((Primitive.Int.write(this.limit)));
547
536
  }
548
537
  if (this.hash !== undefined) {
549
- b.write(Primitive.Long.write(this.hash));
538
+ b.write((Primitive.Long.write(this.hash)));
550
539
  }
551
540
  return b.buffer;
552
541
  }
@@ -557,27 +546,27 @@ export class GetParticipant extends TLObject {
557
546
  participant;
558
547
  constructor(params) {
559
548
  super();
560
- this.classType = 'functions';
561
- this.className = 'channels.GetParticipant';
549
+ this.classType = "functions";
550
+ this.className = "channels.GetParticipant";
562
551
  this.constructorId = 0xa0ab6cc6;
563
552
  this.subclassOfId = 0x6658151a;
564
- this._slots = ['channel', 'participant'];
553
+ this._slots = ["channel", "participant"];
565
554
  this.channel = params.channel;
566
555
  this.participant = params.participant;
567
556
  }
568
557
  /**
569
- * Generate the TLObject from buffer.
570
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
571
- */
558
+ * Generate the TLObject from buffer.
559
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
560
+ */
572
561
  static async read(_data, ..._args) {
573
562
  // no flags
574
563
  let channel = await TLObject.read(_data);
575
564
  let participant = await TLObject.read(_data);
576
- return new GetParticipant({ channel: channel, participant: participant });
565
+ return new GetParticipant({ "channel": channel, "participant": participant });
577
566
  }
578
567
  /**
579
- * Generate buffer from TLObject.
580
- */
568
+ * Generate buffer from TLObject.
569
+ */
581
570
  write() {
582
571
  const b = new BytesIO();
583
572
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -596,31 +585,31 @@ export class GetChannels extends TLObject {
596
585
  id;
597
586
  constructor(params) {
598
587
  super();
599
- this.classType = 'functions';
600
- this.className = 'channels.GetChannels';
588
+ this.classType = "functions";
589
+ this.className = "channels.GetChannels";
601
590
  this.constructorId = 0xa7f6bbb;
602
591
  this.subclassOfId = 0x99d5cb14;
603
- this._slots = ['id'];
592
+ this._slots = ["id"];
604
593
  this.id = params.id;
605
594
  }
606
595
  /**
607
- * Generate the TLObject from buffer.
608
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
609
- */
596
+ * Generate the TLObject from buffer.
597
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
598
+ */
610
599
  static async read(_data, ..._args) {
611
600
  // no flags
612
601
  let id = await TLObject.read(_data);
613
- return new GetChannels({ id: id });
602
+ return new GetChannels({ "id": id });
614
603
  }
615
604
  /**
616
- * Generate buffer from TLObject.
617
- */
605
+ * Generate buffer from TLObject.
606
+ */
618
607
  write() {
619
608
  const b = new BytesIO();
620
609
  b.write(Primitive.Int.write(this.constructorId, false));
621
610
  // no flags
622
611
  if (this.id) {
623
- b.write(Primitive.Vector.write(this.id));
612
+ b.write((Primitive.Vector.write(this.id)));
624
613
  }
625
614
  return b.buffer;
626
615
  }
@@ -630,25 +619,25 @@ export class GetFullChannel extends TLObject {
630
619
  channel;
631
620
  constructor(params) {
632
621
  super();
633
- this.classType = 'functions';
634
- this.className = 'channels.GetFullChannel';
622
+ this.classType = "functions";
623
+ this.className = "channels.GetFullChannel";
635
624
  this.constructorId = 0x8736a09;
636
625
  this.subclassOfId = 0x225a5109;
637
- this._slots = ['channel'];
626
+ this._slots = ["channel"];
638
627
  this.channel = params.channel;
639
628
  }
640
629
  /**
641
- * Generate the TLObject from buffer.
642
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
643
- */
630
+ * Generate the TLObject from buffer.
631
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
632
+ */
644
633
  static async read(_data, ..._args) {
645
634
  // no flags
646
635
  let channel = await TLObject.read(_data);
647
- return new GetFullChannel({ channel: channel });
636
+ return new GetFullChannel({ "channel": channel });
648
637
  }
649
638
  /**
650
- * Generate buffer from TLObject.
651
- */
639
+ * Generate buffer from TLObject.
640
+ */
652
641
  write() {
653
642
  const b = new BytesIO();
654
643
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -672,21 +661,11 @@ export class CreateChannel extends TLObject {
672
661
  ttlPeriod;
673
662
  constructor(params) {
674
663
  super();
675
- this.classType = 'functions';
676
- this.className = 'channels.CreateChannel';
664
+ this.classType = "functions";
665
+ this.className = "channels.CreateChannel";
677
666
  this.constructorId = 0x91006707;
678
667
  this.subclassOfId = 0x8af52aac;
679
- this._slots = [
680
- 'broadcast',
681
- 'megagroup',
682
- 'forImport',
683
- 'forum',
684
- 'title',
685
- 'about',
686
- 'geoPoint',
687
- 'address',
688
- 'ttlPeriod',
689
- ];
668
+ this._slots = ["broadcast", "megagroup", "forImport", "forum", "title", "about", "geoPoint", "address", "ttlPeriod"];
690
669
  this.broadcast = params.broadcast;
691
670
  this.megagroup = params.megagroup;
692
671
  this.forImport = params.forImport;
@@ -698,63 +677,53 @@ export class CreateChannel extends TLObject {
698
677
  this.ttlPeriod = params.ttlPeriod;
699
678
  }
700
679
  /**
701
- * Generate the TLObject from buffer.
702
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
703
- */
680
+ * Generate the TLObject from buffer.
681
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
682
+ */
704
683
  static async read(_data, ..._args) {
705
684
  // @ts-ignore
706
685
  let flags = await Primitive.Int.read(_data);
707
- let broadcast = flags & (1 << 0) ? true : false;
708
- let megagroup = flags & (1 << 1) ? true : false;
709
- let forImport = flags & (1 << 3) ? true : false;
710
- let forum = flags & (1 << 5) ? true : false;
686
+ let broadcast = (flags & (1 << 0)) ? true : false;
687
+ let megagroup = (flags & (1 << 1)) ? true : false;
688
+ let forImport = (flags & (1 << 3)) ? true : false;
689
+ let forum = (flags & (1 << 5)) ? true : false;
711
690
  let title = await Primitive.String.read(_data);
712
691
  let about = await Primitive.String.read(_data);
713
- let geoPoint = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
714
- let address = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
715
- let ttlPeriod = flags & (1 << 4) ? await Primitive.Int.read(_data) : undefined;
716
- return new CreateChannel({
717
- broadcast: broadcast,
718
- megagroup: megagroup,
719
- forImport: forImport,
720
- forum: forum,
721
- title: title,
722
- about: about,
723
- geoPoint: geoPoint,
724
- address: address,
725
- ttlPeriod: ttlPeriod,
726
- });
692
+ let geoPoint = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
693
+ let address = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
694
+ let ttlPeriod = (flags & (1 << 4)) ? await Primitive.Int.read(_data) : undefined;
695
+ return new CreateChannel({ "broadcast": broadcast, "megagroup": megagroup, "forImport": forImport, "forum": forum, "title": title, "about": about, "geoPoint": geoPoint, "address": address, "ttlPeriod": ttlPeriod });
727
696
  }
728
697
  /**
729
- * Generate buffer from TLObject.
730
- */
698
+ * Generate buffer from TLObject.
699
+ */
731
700
  write() {
732
701
  const b = new BytesIO();
733
702
  b.write(Primitive.Int.write(this.constructorId, false));
734
703
  // @ts-ignore
735
704
  let flags = 0;
736
- flags |= this.broadcast ? 1 << 0 : 0;
737
- flags |= this.megagroup ? 1 << 1 : 0;
738
- flags |= this.forImport ? 1 << 3 : 0;
739
- flags |= this.forum ? 1 << 5 : 0;
740
- flags |= this.geoPoint !== undefined ? 1 << 2 : 0;
741
- flags |= this.address !== undefined ? 1 << 2 : 0;
742
- flags |= this.ttlPeriod !== undefined ? 1 << 4 : 0;
743
- b.write(Primitive.Int.write(flags));
705
+ flags |= this.broadcast ? (1 << 0) : 0;
706
+ flags |= this.megagroup ? (1 << 1) : 0;
707
+ flags |= this.forImport ? (1 << 3) : 0;
708
+ flags |= this.forum ? (1 << 5) : 0;
709
+ flags |= this.geoPoint !== undefined ? (1 << 2) : 0;
710
+ flags |= this.address !== undefined ? (1 << 2) : 0;
711
+ flags |= this.ttlPeriod !== undefined ? (1 << 4) : 0;
712
+ b.write((Primitive.Int.write(flags)));
744
713
  if (this.title !== undefined) {
745
- b.write(Primitive.String.write(this.title));
714
+ b.write((Primitive.String.write(this.title)));
746
715
  }
747
716
  if (this.about !== undefined) {
748
- b.write(Primitive.String.write(this.about));
717
+ b.write((Primitive.String.write(this.about)));
749
718
  }
750
719
  if (this.geoPoint !== undefined) {
751
720
  b.write(this.geoPoint.write());
752
721
  }
753
722
  if (this.address !== undefined) {
754
- b.write(Primitive.String.write(this.address));
723
+ b.write((Primitive.String.write(this.address)));
755
724
  }
756
725
  if (this.ttlPeriod !== undefined) {
757
- b.write(Primitive.Int.write(this.ttlPeriod));
726
+ b.write((Primitive.Int.write(this.ttlPeriod)));
758
727
  }
759
728
  return b.buffer;
760
729
  }
@@ -767,44 +736,39 @@ export class EditAdmin extends TLObject {
767
736
  rank;
768
737
  constructor(params) {
769
738
  super();
770
- this.classType = 'functions';
771
- this.className = 'channels.EditAdmin';
739
+ this.classType = "functions";
740
+ this.className = "channels.EditAdmin";
772
741
  this.constructorId = 0x9a98ad68;
773
742
  this.subclassOfId = 0x8af52aac;
774
- this._slots = ['channel', 'userId', 'adminRights', 'rank'];
743
+ this._slots = ["channel", "userId", "adminRights", "rank"];
775
744
  this.channel = params.channel;
776
745
  this.userId = params.userId;
777
746
  this.adminRights = params.adminRights;
778
747
  this.rank = params.rank;
779
748
  }
780
749
  /**
781
- * Generate the TLObject from buffer.
782
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
783
- */
750
+ * Generate the TLObject from buffer.
751
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
752
+ */
784
753
  static async read(_data, ..._args) {
785
754
  // @ts-ignore
786
755
  let flags = await Primitive.Int.read(_data);
787
756
  let channel = await TLObject.read(_data);
788
757
  let userId = await TLObject.read(_data);
789
758
  let adminRights = await TLObject.read(_data);
790
- let rank = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
791
- return new EditAdmin({
792
- channel: channel,
793
- userId: userId,
794
- adminRights: adminRights,
795
- rank: rank,
796
- });
759
+ let rank = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
760
+ return new EditAdmin({ "channel": channel, "userId": userId, "adminRights": adminRights, "rank": rank });
797
761
  }
798
762
  /**
799
- * Generate buffer from TLObject.
800
- */
763
+ * Generate buffer from TLObject.
764
+ */
801
765
  write() {
802
766
  const b = new BytesIO();
803
767
  b.write(Primitive.Int.write(this.constructorId, false));
804
768
  // @ts-ignore
805
769
  let flags = 0;
806
- flags |= this.rank !== undefined ? 1 << 0 : 0;
807
- b.write(Primitive.Int.write(flags));
770
+ flags |= this.rank !== undefined ? (1 << 0) : 0;
771
+ b.write((Primitive.Int.write(flags)));
808
772
  if (this.channel !== undefined) {
809
773
  b.write(this.channel.write());
810
774
  }
@@ -815,7 +779,7 @@ export class EditAdmin extends TLObject {
815
779
  b.write(this.adminRights.write());
816
780
  }
817
781
  if (this.rank !== undefined) {
818
- b.write(Primitive.String.write(this.rank));
782
+ b.write((Primitive.String.write(this.rank)));
819
783
  }
820
784
  return b.buffer;
821
785
  }
@@ -826,27 +790,27 @@ export class EditTitle extends TLObject {
826
790
  title;
827
791
  constructor(params) {
828
792
  super();
829
- this.classType = 'functions';
830
- this.className = 'channels.EditTitle';
793
+ this.classType = "functions";
794
+ this.className = "channels.EditTitle";
831
795
  this.constructorId = 0x566decd0;
832
796
  this.subclassOfId = 0x8af52aac;
833
- this._slots = ['channel', 'title'];
797
+ this._slots = ["channel", "title"];
834
798
  this.channel = params.channel;
835
799
  this.title = params.title;
836
800
  }
837
801
  /**
838
- * Generate the TLObject from buffer.
839
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
840
- */
802
+ * Generate the TLObject from buffer.
803
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
804
+ */
841
805
  static async read(_data, ..._args) {
842
806
  // no flags
843
807
  let channel = await TLObject.read(_data);
844
808
  let title = await Primitive.String.read(_data);
845
- return new EditTitle({ channel: channel, title: title });
809
+ return new EditTitle({ "channel": channel, "title": title });
846
810
  }
847
811
  /**
848
- * Generate buffer from TLObject.
849
- */
812
+ * Generate buffer from TLObject.
813
+ */
850
814
  write() {
851
815
  const b = new BytesIO();
852
816
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -855,7 +819,7 @@ export class EditTitle extends TLObject {
855
819
  b.write(this.channel.write());
856
820
  }
857
821
  if (this.title !== undefined) {
858
- b.write(Primitive.String.write(this.title));
822
+ b.write((Primitive.String.write(this.title)));
859
823
  }
860
824
  return b.buffer;
861
825
  }
@@ -866,27 +830,27 @@ export class EditPhoto extends TLObject {
866
830
  photo;
867
831
  constructor(params) {
868
832
  super();
869
- this.classType = 'functions';
870
- this.className = 'channels.EditPhoto';
833
+ this.classType = "functions";
834
+ this.className = "channels.EditPhoto";
871
835
  this.constructorId = 0xf12e57c9;
872
836
  this.subclassOfId = 0x8af52aac;
873
- this._slots = ['channel', 'photo'];
837
+ this._slots = ["channel", "photo"];
874
838
  this.channel = params.channel;
875
839
  this.photo = params.photo;
876
840
  }
877
841
  /**
878
- * Generate the TLObject from buffer.
879
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
880
- */
842
+ * Generate the TLObject from buffer.
843
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
844
+ */
881
845
  static async read(_data, ..._args) {
882
846
  // no flags
883
847
  let channel = await TLObject.read(_data);
884
848
  let photo = await TLObject.read(_data);
885
- return new EditPhoto({ channel: channel, photo: photo });
849
+ return new EditPhoto({ "channel": channel, "photo": photo });
886
850
  }
887
851
  /**
888
- * Generate buffer from TLObject.
889
- */
852
+ * Generate buffer from TLObject.
853
+ */
890
854
  write() {
891
855
  const b = new BytesIO();
892
856
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -906,27 +870,27 @@ export class CheckUsername extends TLObject {
906
870
  username;
907
871
  constructor(params) {
908
872
  super();
909
- this.classType = 'functions';
910
- this.className = 'channels.CheckUsername';
873
+ this.classType = "functions";
874
+ this.className = "channels.CheckUsername";
911
875
  this.constructorId = 0x10e6bd2c;
912
876
  this.subclassOfId = 0xf5b399ac;
913
- this._slots = ['channel', 'username'];
877
+ this._slots = ["channel", "username"];
914
878
  this.channel = params.channel;
915
879
  this.username = params.username;
916
880
  }
917
881
  /**
918
- * Generate the TLObject from buffer.
919
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
920
- */
882
+ * Generate the TLObject from buffer.
883
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
884
+ */
921
885
  static async read(_data, ..._args) {
922
886
  // no flags
923
887
  let channel = await TLObject.read(_data);
924
888
  let username = await Primitive.String.read(_data);
925
- return new CheckUsername({ channel: channel, username: username });
889
+ return new CheckUsername({ "channel": channel, "username": username });
926
890
  }
927
891
  /**
928
- * Generate buffer from TLObject.
929
- */
892
+ * Generate buffer from TLObject.
893
+ */
930
894
  write() {
931
895
  const b = new BytesIO();
932
896
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -935,7 +899,7 @@ export class CheckUsername extends TLObject {
935
899
  b.write(this.channel.write());
936
900
  }
937
901
  if (this.username !== undefined) {
938
- b.write(Primitive.String.write(this.username));
902
+ b.write((Primitive.String.write(this.username)));
939
903
  }
940
904
  return b.buffer;
941
905
  }
@@ -946,27 +910,27 @@ export class UpdateUsername extends TLObject {
946
910
  username;
947
911
  constructor(params) {
948
912
  super();
949
- this.classType = 'functions';
950
- this.className = 'channels.UpdateUsername';
913
+ this.classType = "functions";
914
+ this.className = "channels.UpdateUsername";
951
915
  this.constructorId = 0x3514b3de;
952
916
  this.subclassOfId = 0xf5b399ac;
953
- this._slots = ['channel', 'username'];
917
+ this._slots = ["channel", "username"];
954
918
  this.channel = params.channel;
955
919
  this.username = params.username;
956
920
  }
957
921
  /**
958
- * Generate the TLObject from buffer.
959
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
960
- */
922
+ * Generate the TLObject from buffer.
923
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
924
+ */
961
925
  static async read(_data, ..._args) {
962
926
  // no flags
963
927
  let channel = await TLObject.read(_data);
964
928
  let username = await Primitive.String.read(_data);
965
- return new UpdateUsername({ channel: channel, username: username });
929
+ return new UpdateUsername({ "channel": channel, "username": username });
966
930
  }
967
931
  /**
968
- * Generate buffer from TLObject.
969
- */
932
+ * Generate buffer from TLObject.
933
+ */
970
934
  write() {
971
935
  const b = new BytesIO();
972
936
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -975,7 +939,7 @@ export class UpdateUsername extends TLObject {
975
939
  b.write(this.channel.write());
976
940
  }
977
941
  if (this.username !== undefined) {
978
- b.write(Primitive.String.write(this.username));
942
+ b.write((Primitive.String.write(this.username)));
979
943
  }
980
944
  return b.buffer;
981
945
  }
@@ -985,25 +949,25 @@ export class JoinChannel extends TLObject {
985
949
  channel;
986
950
  constructor(params) {
987
951
  super();
988
- this.classType = 'functions';
989
- this.className = 'channels.JoinChannel';
952
+ this.classType = "functions";
953
+ this.className = "channels.JoinChannel";
990
954
  this.constructorId = 0x7f6a1e22;
991
955
  this.subclassOfId = 0x5d0ff992;
992
- this._slots = ['channel'];
956
+ this._slots = ["channel"];
993
957
  this.channel = params.channel;
994
958
  }
995
959
  /**
996
- * Generate the TLObject from buffer.
997
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
998
- */
960
+ * Generate the TLObject from buffer.
961
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
962
+ */
999
963
  static async read(_data, ..._args) {
1000
964
  // no flags
1001
965
  let channel = await TLObject.read(_data);
1002
- return new JoinChannel({ channel: channel });
966
+ return new JoinChannel({ "channel": channel });
1003
967
  }
1004
968
  /**
1005
- * Generate buffer from TLObject.
1006
- */
969
+ * Generate buffer from TLObject.
970
+ */
1007
971
  write() {
1008
972
  const b = new BytesIO();
1009
973
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1019,25 +983,25 @@ export class LeaveChannel extends TLObject {
1019
983
  channel;
1020
984
  constructor(params) {
1021
985
  super();
1022
- this.classType = 'functions';
1023
- this.className = 'channels.LeaveChannel';
986
+ this.classType = "functions";
987
+ this.className = "channels.LeaveChannel";
1024
988
  this.constructorId = 0xf836aa95;
1025
989
  this.subclassOfId = 0x8af52aac;
1026
- this._slots = ['channel'];
990
+ this._slots = ["channel"];
1027
991
  this.channel = params.channel;
1028
992
  }
1029
993
  /**
1030
- * Generate the TLObject from buffer.
1031
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1032
- */
994
+ * Generate the TLObject from buffer.
995
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
996
+ */
1033
997
  static async read(_data, ..._args) {
1034
998
  // no flags
1035
999
  let channel = await TLObject.read(_data);
1036
- return new LeaveChannel({ channel: channel });
1000
+ return new LeaveChannel({ "channel": channel });
1037
1001
  }
1038
1002
  /**
1039
- * Generate buffer from TLObject.
1040
- */
1003
+ * Generate buffer from TLObject.
1004
+ */
1041
1005
  write() {
1042
1006
  const b = new BytesIO();
1043
1007
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1054,27 +1018,27 @@ export class InviteToChannel extends TLObject {
1054
1018
  users;
1055
1019
  constructor(params) {
1056
1020
  super();
1057
- this.classType = 'functions';
1058
- this.className = 'channels.InviteToChannel';
1021
+ this.classType = "functions";
1022
+ this.className = "channels.InviteToChannel";
1059
1023
  this.constructorId = 0xc9e33d54;
1060
1024
  this.subclassOfId = 0x3dbe90a1;
1061
- this._slots = ['channel', 'users'];
1025
+ this._slots = ["channel", "users"];
1062
1026
  this.channel = params.channel;
1063
1027
  this.users = params.users;
1064
1028
  }
1065
1029
  /**
1066
- * Generate the TLObject from buffer.
1067
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1068
- */
1030
+ * Generate the TLObject from buffer.
1031
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1032
+ */
1069
1033
  static async read(_data, ..._args) {
1070
1034
  // no flags
1071
1035
  let channel = await TLObject.read(_data);
1072
1036
  let users = await TLObject.read(_data);
1073
- return new InviteToChannel({ channel: channel, users: users });
1037
+ return new InviteToChannel({ "channel": channel, "users": users });
1074
1038
  }
1075
1039
  /**
1076
- * Generate buffer from TLObject.
1077
- */
1040
+ * Generate buffer from TLObject.
1041
+ */
1078
1042
  write() {
1079
1043
  const b = new BytesIO();
1080
1044
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1083,7 +1047,7 @@ export class InviteToChannel extends TLObject {
1083
1047
  b.write(this.channel.write());
1084
1048
  }
1085
1049
  if (this.users) {
1086
- b.write(Primitive.Vector.write(this.users));
1050
+ b.write((Primitive.Vector.write(this.users)));
1087
1051
  }
1088
1052
  return b.buffer;
1089
1053
  }
@@ -1093,25 +1057,25 @@ export class DeleteChannel extends TLObject {
1093
1057
  channel;
1094
1058
  constructor(params) {
1095
1059
  super();
1096
- this.classType = 'functions';
1097
- this.className = 'channels.DeleteChannel';
1060
+ this.classType = "functions";
1061
+ this.className = "channels.DeleteChannel";
1098
1062
  this.constructorId = 0xc0111fe3;
1099
1063
  this.subclassOfId = 0x8af52aac;
1100
- this._slots = ['channel'];
1064
+ this._slots = ["channel"];
1101
1065
  this.channel = params.channel;
1102
1066
  }
1103
1067
  /**
1104
- * Generate the TLObject from buffer.
1105
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1106
- */
1068
+ * Generate the TLObject from buffer.
1069
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1070
+ */
1107
1071
  static async read(_data, ..._args) {
1108
1072
  // no flags
1109
1073
  let channel = await TLObject.read(_data);
1110
- return new DeleteChannel({ channel: channel });
1074
+ return new DeleteChannel({ "channel": channel });
1111
1075
  }
1112
1076
  /**
1113
- * Generate buffer from TLObject.
1114
- */
1077
+ * Generate buffer from TLObject.
1078
+ */
1115
1079
  write() {
1116
1080
  const b = new BytesIO();
1117
1081
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1130,45 +1094,45 @@ export class ExportMessageLink extends TLObject {
1130
1094
  id;
1131
1095
  constructor(params) {
1132
1096
  super();
1133
- this.classType = 'functions';
1134
- this.className = 'channels.ExportMessageLink';
1097
+ this.classType = "functions";
1098
+ this.className = "channels.ExportMessageLink";
1135
1099
  this.constructorId = 0xe63fadeb;
1136
1100
  this.subclassOfId = 0xdee644cc;
1137
- this._slots = ['grouped', 'thread', 'channel', 'id'];
1101
+ this._slots = ["grouped", "thread", "channel", "id"];
1138
1102
  this.grouped = params.grouped;
1139
1103
  this.thread = params.thread;
1140
1104
  this.channel = params.channel;
1141
1105
  this.id = params.id;
1142
1106
  }
1143
1107
  /**
1144
- * Generate the TLObject from buffer.
1145
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1146
- */
1108
+ * Generate the TLObject from buffer.
1109
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1110
+ */
1147
1111
  static async read(_data, ..._args) {
1148
1112
  // @ts-ignore
1149
1113
  let flags = await Primitive.Int.read(_data);
1150
- let grouped = flags & (1 << 0) ? true : false;
1151
- let thread = flags & (1 << 1) ? true : false;
1114
+ let grouped = (flags & (1 << 0)) ? true : false;
1115
+ let thread = (flags & (1 << 1)) ? true : false;
1152
1116
  let channel = await TLObject.read(_data);
1153
1117
  let id = await Primitive.Int.read(_data);
1154
- return new ExportMessageLink({ grouped: grouped, thread: thread, channel: channel, id: id });
1118
+ return new ExportMessageLink({ "grouped": grouped, "thread": thread, "channel": channel, "id": id });
1155
1119
  }
1156
1120
  /**
1157
- * Generate buffer from TLObject.
1158
- */
1121
+ * Generate buffer from TLObject.
1122
+ */
1159
1123
  write() {
1160
1124
  const b = new BytesIO();
1161
1125
  b.write(Primitive.Int.write(this.constructorId, false));
1162
1126
  // @ts-ignore
1163
1127
  let flags = 0;
1164
- flags |= this.grouped ? 1 << 0 : 0;
1165
- flags |= this.thread ? 1 << 1 : 0;
1166
- b.write(Primitive.Int.write(flags));
1128
+ flags |= this.grouped ? (1 << 0) : 0;
1129
+ flags |= this.thread ? (1 << 1) : 0;
1130
+ b.write((Primitive.Int.write(flags)));
1167
1131
  if (this.channel !== undefined) {
1168
1132
  b.write(this.channel.write());
1169
1133
  }
1170
1134
  if (this.id !== undefined) {
1171
- b.write(Primitive.Int.write(this.id));
1135
+ b.write((Primitive.Int.write(this.id)));
1172
1136
  }
1173
1137
  return b.buffer;
1174
1138
  }
@@ -1180,42 +1144,38 @@ export class ToggleSignatures extends TLObject {
1180
1144
  channel;
1181
1145
  constructor(params) {
1182
1146
  super();
1183
- this.classType = 'functions';
1184
- this.className = 'channels.ToggleSignatures';
1147
+ this.classType = "functions";
1148
+ this.className = "channels.ToggleSignatures";
1185
1149
  this.constructorId = 0x418d549c;
1186
1150
  this.subclassOfId = 0x8af52aac;
1187
- this._slots = ['signaturesEnabled', 'profilesEnabled', 'channel'];
1151
+ this._slots = ["signaturesEnabled", "profilesEnabled", "channel"];
1188
1152
  this.signaturesEnabled = params.signaturesEnabled;
1189
1153
  this.profilesEnabled = params.profilesEnabled;
1190
1154
  this.channel = params.channel;
1191
1155
  }
1192
1156
  /**
1193
- * Generate the TLObject from buffer.
1194
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1195
- */
1157
+ * Generate the TLObject from buffer.
1158
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1159
+ */
1196
1160
  static async read(_data, ..._args) {
1197
1161
  // @ts-ignore
1198
1162
  let flags = await Primitive.Int.read(_data);
1199
- let signaturesEnabled = flags & (1 << 0) ? true : false;
1200
- let profilesEnabled = flags & (1 << 1) ? true : false;
1163
+ let signaturesEnabled = (flags & (1 << 0)) ? true : false;
1164
+ let profilesEnabled = (flags & (1 << 1)) ? true : false;
1201
1165
  let channel = await TLObject.read(_data);
1202
- return new ToggleSignatures({
1203
- signaturesEnabled: signaturesEnabled,
1204
- profilesEnabled: profilesEnabled,
1205
- channel: channel,
1206
- });
1166
+ return new ToggleSignatures({ "signaturesEnabled": signaturesEnabled, "profilesEnabled": profilesEnabled, "channel": channel });
1207
1167
  }
1208
1168
  /**
1209
- * Generate buffer from TLObject.
1210
- */
1169
+ * Generate buffer from TLObject.
1170
+ */
1211
1171
  write() {
1212
1172
  const b = new BytesIO();
1213
1173
  b.write(Primitive.Int.write(this.constructorId, false));
1214
1174
  // @ts-ignore
1215
1175
  let flags = 0;
1216
- flags |= this.signaturesEnabled ? 1 << 0 : 0;
1217
- flags |= this.profilesEnabled ? 1 << 1 : 0;
1218
- b.write(Primitive.Int.write(flags));
1176
+ flags |= this.signaturesEnabled ? (1 << 0) : 0;
1177
+ flags |= this.profilesEnabled ? (1 << 1) : 0;
1178
+ b.write((Primitive.Int.write(flags)));
1219
1179
  if (this.channel !== undefined) {
1220
1180
  b.write(this.channel.write());
1221
1181
  }
@@ -1230,47 +1190,42 @@ export class GetAdminedPublicChannels extends TLObject {
1230
1190
  forCommunityPeer;
1231
1191
  constructor(params) {
1232
1192
  super();
1233
- this.classType = 'functions';
1234
- this.className = 'channels.GetAdminedPublicChannels';
1193
+ this.classType = "functions";
1194
+ this.className = "channels.GetAdminedPublicChannels";
1235
1195
  this.constructorId = 0xf8b036af;
1236
1196
  this.subclassOfId = 0x99d5cb14;
1237
- this._slots = ['byLocation', 'checkLimit', 'forPersonal', 'forCommunityPeer'];
1197
+ this._slots = ["byLocation", "checkLimit", "forPersonal", "forCommunityPeer"];
1238
1198
  this.byLocation = params.byLocation;
1239
1199
  this.checkLimit = params.checkLimit;
1240
1200
  this.forPersonal = params.forPersonal;
1241
1201
  this.forCommunityPeer = params.forCommunityPeer;
1242
1202
  }
1243
1203
  /**
1244
- * Generate the TLObject from buffer.
1245
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1246
- */
1204
+ * Generate the TLObject from buffer.
1205
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1206
+ */
1247
1207
  static async read(_data, ..._args) {
1248
1208
  // @ts-ignore
1249
1209
  let flags = await Primitive.Int.read(_data);
1250
- let byLocation = flags & (1 << 0) ? true : false;
1251
- let checkLimit = flags & (1 << 1) ? true : false;
1252
- let forPersonal = flags & (1 << 2) ? true : false;
1253
- let forCommunityPeer = flags & (1 << 3) ? true : false;
1254
- return new GetAdminedPublicChannels({
1255
- byLocation: byLocation,
1256
- checkLimit: checkLimit,
1257
- forPersonal: forPersonal,
1258
- forCommunityPeer: forCommunityPeer,
1259
- });
1210
+ let byLocation = (flags & (1 << 0)) ? true : false;
1211
+ let checkLimit = (flags & (1 << 1)) ? true : false;
1212
+ let forPersonal = (flags & (1 << 2)) ? true : false;
1213
+ let forCommunityPeer = (flags & (1 << 3)) ? true : false;
1214
+ return new GetAdminedPublicChannels({ "byLocation": byLocation, "checkLimit": checkLimit, "forPersonal": forPersonal, "forCommunityPeer": forCommunityPeer });
1260
1215
  }
1261
1216
  /**
1262
- * Generate buffer from TLObject.
1263
- */
1217
+ * Generate buffer from TLObject.
1218
+ */
1264
1219
  write() {
1265
1220
  const b = new BytesIO();
1266
1221
  b.write(Primitive.Int.write(this.constructorId, false));
1267
1222
  // @ts-ignore
1268
1223
  let flags = 0;
1269
- flags |= this.byLocation ? 1 << 0 : 0;
1270
- flags |= this.checkLimit ? 1 << 1 : 0;
1271
- flags |= this.forPersonal ? 1 << 2 : 0;
1272
- flags |= this.forCommunityPeer ? 1 << 3 : 0;
1273
- b.write(Primitive.Int.write(flags));
1224
+ flags |= this.byLocation ? (1 << 0) : 0;
1225
+ flags |= this.checkLimit ? (1 << 1) : 0;
1226
+ flags |= this.forPersonal ? (1 << 2) : 0;
1227
+ flags |= this.forCommunityPeer ? (1 << 3) : 0;
1228
+ b.write((Primitive.Int.write(flags)));
1274
1229
  return b.buffer;
1275
1230
  }
1276
1231
  }
@@ -1281,33 +1236,29 @@ export class EditBanned extends TLObject {
1281
1236
  bannedRights;
1282
1237
  constructor(params) {
1283
1238
  super();
1284
- this.classType = 'functions';
1285
- this.className = 'channels.EditBanned';
1239
+ this.classType = "functions";
1240
+ this.className = "channels.EditBanned";
1286
1241
  this.constructorId = 0x96e6cd81;
1287
1242
  this.subclassOfId = 0x8af52aac;
1288
- this._slots = ['channel', 'participant', 'bannedRights'];
1243
+ this._slots = ["channel", "participant", "bannedRights"];
1289
1244
  this.channel = params.channel;
1290
1245
  this.participant = params.participant;
1291
1246
  this.bannedRights = params.bannedRights;
1292
1247
  }
1293
1248
  /**
1294
- * Generate the TLObject from buffer.
1295
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1296
- */
1249
+ * Generate the TLObject from buffer.
1250
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1251
+ */
1297
1252
  static async read(_data, ..._args) {
1298
1253
  // no flags
1299
1254
  let channel = await TLObject.read(_data);
1300
1255
  let participant = await TLObject.read(_data);
1301
1256
  let bannedRights = await TLObject.read(_data);
1302
- return new EditBanned({
1303
- channel: channel,
1304
- participant: participant,
1305
- bannedRights: bannedRights,
1306
- });
1257
+ return new EditBanned({ "channel": channel, "participant": participant, "bannedRights": bannedRights });
1307
1258
  }
1308
1259
  /**
1309
- * Generate buffer from TLObject.
1310
- */
1260
+ * Generate buffer from TLObject.
1261
+ */
1311
1262
  write() {
1312
1263
  const b = new BytesIO();
1313
1264
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1335,11 +1286,11 @@ export class GetAdminLog extends TLObject {
1335
1286
  limit;
1336
1287
  constructor(params) {
1337
1288
  super();
1338
- this.classType = 'functions';
1339
- this.className = 'channels.GetAdminLog';
1289
+ this.classType = "functions";
1290
+ this.className = "channels.GetAdminLog";
1340
1291
  this.constructorId = 0x33ddf480;
1341
1292
  this.subclassOfId = 0x51f076bc;
1342
- this._slots = ['channel', 'q', 'eventsFilter', 'admins', 'maxId', 'minId', 'limit'];
1293
+ this._slots = ["channel", "q", "eventsFilter", "admins", "maxId", "minId", "limit"];
1343
1294
  this.channel = params.channel;
1344
1295
  this.q = params.q;
1345
1296
  this.eventsFilter = params.eventsFilter;
@@ -1349,60 +1300,52 @@ export class GetAdminLog extends TLObject {
1349
1300
  this.limit = params.limit;
1350
1301
  }
1351
1302
  /**
1352
- * Generate the TLObject from buffer.
1353
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1354
- */
1303
+ * Generate the TLObject from buffer.
1304
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1305
+ */
1355
1306
  static async read(_data, ..._args) {
1356
1307
  // @ts-ignore
1357
1308
  let flags = await Primitive.Int.read(_data);
1358
1309
  let channel = await TLObject.read(_data);
1359
1310
  let q = await Primitive.String.read(_data);
1360
- let eventsFilter = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
1361
- let admins = flags & (1 << 1) ? await TLObject.read(_data) : [];
1311
+ let eventsFilter = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
1312
+ let admins = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
1362
1313
  let maxId = await Primitive.Long.read(_data);
1363
1314
  let minId = await Primitive.Long.read(_data);
1364
1315
  let limit = await Primitive.Int.read(_data);
1365
- return new GetAdminLog({
1366
- channel: channel,
1367
- q: q,
1368
- eventsFilter: eventsFilter,
1369
- admins: admins,
1370
- maxId: maxId,
1371
- minId: minId,
1372
- limit: limit,
1373
- });
1316
+ return new GetAdminLog({ "channel": channel, "q": q, "eventsFilter": eventsFilter, "admins": admins, "maxId": maxId, "minId": minId, "limit": limit });
1374
1317
  }
1375
1318
  /**
1376
- * Generate buffer from TLObject.
1377
- */
1319
+ * Generate buffer from TLObject.
1320
+ */
1378
1321
  write() {
1379
1322
  const b = new BytesIO();
1380
1323
  b.write(Primitive.Int.write(this.constructorId, false));
1381
1324
  // @ts-ignore
1382
1325
  let flags = 0;
1383
- flags |= this.eventsFilter !== undefined ? 1 << 0 : 0;
1384
- flags |= this.admins ? 1 << 1 : 0;
1385
- b.write(Primitive.Int.write(flags));
1326
+ flags |= this.eventsFilter !== undefined ? (1 << 0) : 0;
1327
+ flags |= this.admins ? (1 << 1) : 0;
1328
+ b.write((Primitive.Int.write(flags)));
1386
1329
  if (this.channel !== undefined) {
1387
1330
  b.write(this.channel.write());
1388
1331
  }
1389
1332
  if (this.q !== undefined) {
1390
- b.write(Primitive.String.write(this.q));
1333
+ b.write((Primitive.String.write(this.q)));
1391
1334
  }
1392
1335
  if (this.eventsFilter !== undefined) {
1393
1336
  b.write(this.eventsFilter.write());
1394
1337
  }
1395
1338
  if (this.admins) {
1396
- b.write(Primitive.Vector.write(this.admins));
1339
+ b.write((Primitive.Vector.write(this.admins)));
1397
1340
  }
1398
1341
  if (this.maxId !== undefined) {
1399
- b.write(Primitive.Long.write(this.maxId));
1342
+ b.write((Primitive.Long.write(this.maxId)));
1400
1343
  }
1401
1344
  if (this.minId !== undefined) {
1402
- b.write(Primitive.Long.write(this.minId));
1345
+ b.write((Primitive.Long.write(this.minId)));
1403
1346
  }
1404
1347
  if (this.limit !== undefined) {
1405
- b.write(Primitive.Int.write(this.limit));
1348
+ b.write((Primitive.Int.write(this.limit)));
1406
1349
  }
1407
1350
  return b.buffer;
1408
1351
  }
@@ -1413,27 +1356,27 @@ export class SetStickers extends TLObject {
1413
1356
  stickerset;
1414
1357
  constructor(params) {
1415
1358
  super();
1416
- this.classType = 'functions';
1417
- this.className = 'channels.SetStickers';
1359
+ this.classType = "functions";
1360
+ this.className = "channels.SetStickers";
1418
1361
  this.constructorId = 0xea8ca4f9;
1419
1362
  this.subclassOfId = 0xf5b399ac;
1420
- this._slots = ['channel', 'stickerset'];
1363
+ this._slots = ["channel", "stickerset"];
1421
1364
  this.channel = params.channel;
1422
1365
  this.stickerset = params.stickerset;
1423
1366
  }
1424
1367
  /**
1425
- * Generate the TLObject from buffer.
1426
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1427
- */
1368
+ * Generate the TLObject from buffer.
1369
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1370
+ */
1428
1371
  static async read(_data, ..._args) {
1429
1372
  // no flags
1430
1373
  let channel = await TLObject.read(_data);
1431
1374
  let stickerset = await TLObject.read(_data);
1432
- return new SetStickers({ channel: channel, stickerset: stickerset });
1375
+ return new SetStickers({ "channel": channel, "stickerset": stickerset });
1433
1376
  }
1434
1377
  /**
1435
- * Generate buffer from TLObject.
1436
- */
1378
+ * Generate buffer from TLObject.
1379
+ */
1437
1380
  write() {
1438
1381
  const b = new BytesIO();
1439
1382
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1453,27 +1396,27 @@ export class ReadMessageContents extends TLObject {
1453
1396
  id;
1454
1397
  constructor(params) {
1455
1398
  super();
1456
- this.classType = 'functions';
1457
- this.className = 'channels.ReadMessageContents';
1399
+ this.classType = "functions";
1400
+ this.className = "channels.ReadMessageContents";
1458
1401
  this.constructorId = 0xeab5dc38;
1459
1402
  this.subclassOfId = 0xf5b399ac;
1460
- this._slots = ['channel', 'id'];
1403
+ this._slots = ["channel", "id"];
1461
1404
  this.channel = params.channel;
1462
1405
  this.id = params.id;
1463
1406
  }
1464
1407
  /**
1465
- * Generate the TLObject from buffer.
1466
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1467
- */
1408
+ * Generate the TLObject from buffer.
1409
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1410
+ */
1468
1411
  static async read(_data, ..._args) {
1469
1412
  // no flags
1470
1413
  let channel = await TLObject.read(_data);
1471
1414
  let id = await TLObject.read(_data, Primitive.Int);
1472
- return new ReadMessageContents({ channel: channel, id: id });
1415
+ return new ReadMessageContents({ "channel": channel, "id": id });
1473
1416
  }
1474
1417
  /**
1475
- * Generate buffer from TLObject.
1476
- */
1418
+ * Generate buffer from TLObject.
1419
+ */
1477
1420
  write() {
1478
1421
  const b = new BytesIO();
1479
1422
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1482,7 +1425,7 @@ export class ReadMessageContents extends TLObject {
1482
1425
  b.write(this.channel.write());
1483
1426
  }
1484
1427
  if (this.id) {
1485
- b.write(Primitive.Vector.write(this.id, Primitive.Int));
1428
+ b.write((Primitive.Vector.write(this.id, Primitive.Int)));
1486
1429
  }
1487
1430
  return b.buffer;
1488
1431
  }
@@ -1494,42 +1437,42 @@ export class DeleteHistory extends TLObject {
1494
1437
  maxId;
1495
1438
  constructor(params) {
1496
1439
  super();
1497
- this.classType = 'functions';
1498
- this.className = 'channels.DeleteHistory';
1440
+ this.classType = "functions";
1441
+ this.className = "channels.DeleteHistory";
1499
1442
  this.constructorId = 0x9baa9647;
1500
1443
  this.subclassOfId = 0x8af52aac;
1501
- this._slots = ['forEveryone', 'channel', 'maxId'];
1444
+ this._slots = ["forEveryone", "channel", "maxId"];
1502
1445
  this.forEveryone = params.forEveryone;
1503
1446
  this.channel = params.channel;
1504
1447
  this.maxId = params.maxId;
1505
1448
  }
1506
1449
  /**
1507
- * Generate the TLObject from buffer.
1508
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1509
- */
1450
+ * Generate the TLObject from buffer.
1451
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1452
+ */
1510
1453
  static async read(_data, ..._args) {
1511
1454
  // @ts-ignore
1512
1455
  let flags = await Primitive.Int.read(_data);
1513
- let forEveryone = flags & (1 << 0) ? true : false;
1456
+ let forEveryone = (flags & (1 << 0)) ? true : false;
1514
1457
  let channel = await TLObject.read(_data);
1515
1458
  let maxId = await Primitive.Int.read(_data);
1516
- return new DeleteHistory({ forEveryone: forEveryone, channel: channel, maxId: maxId });
1459
+ return new DeleteHistory({ "forEveryone": forEveryone, "channel": channel, "maxId": maxId });
1517
1460
  }
1518
1461
  /**
1519
- * Generate buffer from TLObject.
1520
- */
1462
+ * Generate buffer from TLObject.
1463
+ */
1521
1464
  write() {
1522
1465
  const b = new BytesIO();
1523
1466
  b.write(Primitive.Int.write(this.constructorId, false));
1524
1467
  // @ts-ignore
1525
1468
  let flags = 0;
1526
- flags |= this.forEveryone ? 1 << 0 : 0;
1527
- b.write(Primitive.Int.write(flags));
1469
+ flags |= this.forEveryone ? (1 << 0) : 0;
1470
+ b.write((Primitive.Int.write(flags)));
1528
1471
  if (this.channel !== undefined) {
1529
1472
  b.write(this.channel.write());
1530
1473
  }
1531
1474
  if (this.maxId !== undefined) {
1532
- b.write(Primitive.Int.write(this.maxId));
1475
+ b.write((Primitive.Int.write(this.maxId)));
1533
1476
  }
1534
1477
  return b.buffer;
1535
1478
  }
@@ -1540,27 +1483,27 @@ export class TogglePreHistoryHidden extends TLObject {
1540
1483
  enabled;
1541
1484
  constructor(params) {
1542
1485
  super();
1543
- this.classType = 'functions';
1544
- this.className = 'channels.TogglePreHistoryHidden';
1486
+ this.classType = "functions";
1487
+ this.className = "channels.TogglePreHistoryHidden";
1545
1488
  this.constructorId = 0xeabbb94c;
1546
1489
  this.subclassOfId = 0x8af52aac;
1547
- this._slots = ['channel', 'enabled'];
1490
+ this._slots = ["channel", "enabled"];
1548
1491
  this.channel = params.channel;
1549
1492
  this.enabled = params.enabled;
1550
1493
  }
1551
1494
  /**
1552
- * Generate the TLObject from buffer.
1553
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1554
- */
1495
+ * Generate the TLObject from buffer.
1496
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1497
+ */
1555
1498
  static async read(_data, ..._args) {
1556
1499
  // no flags
1557
1500
  let channel = await TLObject.read(_data);
1558
1501
  let enabled = await Primitive.Bool.read(_data);
1559
- return new TogglePreHistoryHidden({ channel: channel, enabled: enabled });
1502
+ return new TogglePreHistoryHidden({ "channel": channel, "enabled": enabled });
1560
1503
  }
1561
1504
  /**
1562
- * Generate buffer from TLObject.
1563
- */
1505
+ * Generate buffer from TLObject.
1506
+ */
1564
1507
  write() {
1565
1508
  const b = new BytesIO();
1566
1509
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1569,7 +1512,7 @@ export class TogglePreHistoryHidden extends TLObject {
1569
1512
  b.write(this.channel.write());
1570
1513
  }
1571
1514
  if (this.enabled !== undefined) {
1572
- b.write(Primitive.Bool.write(this.enabled));
1515
+ b.write((Primitive.Bool.write(this.enabled)));
1573
1516
  }
1574
1517
  return b.buffer;
1575
1518
  }
@@ -1579,31 +1522,31 @@ export class GetLeftChannels extends TLObject {
1579
1522
  offset;
1580
1523
  constructor(params) {
1581
1524
  super();
1582
- this.classType = 'functions';
1583
- this.className = 'channels.GetLeftChannels';
1525
+ this.classType = "functions";
1526
+ this.className = "channels.GetLeftChannels";
1584
1527
  this.constructorId = 0x8341ecc0;
1585
1528
  this.subclassOfId = 0x99d5cb14;
1586
- this._slots = ['offset'];
1529
+ this._slots = ["offset"];
1587
1530
  this.offset = params.offset;
1588
1531
  }
1589
1532
  /**
1590
- * Generate the TLObject from buffer.
1591
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1592
- */
1533
+ * Generate the TLObject from buffer.
1534
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1535
+ */
1593
1536
  static async read(_data, ..._args) {
1594
1537
  // no flags
1595
1538
  let offset = await Primitive.Int.read(_data);
1596
- return new GetLeftChannels({ offset: offset });
1539
+ return new GetLeftChannels({ "offset": offset });
1597
1540
  }
1598
1541
  /**
1599
- * Generate buffer from TLObject.
1600
- */
1542
+ * Generate buffer from TLObject.
1543
+ */
1601
1544
  write() {
1602
1545
  const b = new BytesIO();
1603
1546
  b.write(Primitive.Int.write(this.constructorId, false));
1604
1547
  // no flags
1605
1548
  if (this.offset !== undefined) {
1606
- b.write(Primitive.Int.write(this.offset));
1549
+ b.write((Primitive.Int.write(this.offset)));
1607
1550
  }
1608
1551
  return b.buffer;
1609
1552
  }
@@ -1612,23 +1555,23 @@ export class GetGroupsForDiscussion extends TLObject {
1612
1555
  __response__;
1613
1556
  constructor() {
1614
1557
  super();
1615
- this.classType = 'functions';
1616
- this.className = 'channels.GetGroupsForDiscussion';
1558
+ this.classType = "functions";
1559
+ this.className = "channels.GetGroupsForDiscussion";
1617
1560
  this.constructorId = 0xf5dad378;
1618
1561
  this.subclassOfId = 0x99d5cb14;
1619
1562
  this._slots = [];
1620
1563
  }
1621
1564
  /**
1622
- * Generate the TLObject from buffer.
1623
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1624
- */
1565
+ * Generate the TLObject from buffer.
1566
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1567
+ */
1625
1568
  static async read(_data, ..._args) {
1626
1569
  // no flags
1627
1570
  return new GetGroupsForDiscussion();
1628
1571
  }
1629
1572
  /**
1630
- * Generate buffer from TLObject.
1631
- */
1573
+ * Generate buffer from TLObject.
1574
+ */
1632
1575
  write() {
1633
1576
  const b = new BytesIO();
1634
1577
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1642,27 +1585,27 @@ export class SetDiscussionGroup extends TLObject {
1642
1585
  group;
1643
1586
  constructor(params) {
1644
1587
  super();
1645
- this.classType = 'functions';
1646
- this.className = 'channels.SetDiscussionGroup';
1588
+ this.classType = "functions";
1589
+ this.className = "channels.SetDiscussionGroup";
1647
1590
  this.constructorId = 0x40582bb2;
1648
1591
  this.subclassOfId = 0xf5b399ac;
1649
- this._slots = ['broadcast', 'group'];
1592
+ this._slots = ["broadcast", "group"];
1650
1593
  this.broadcast = params.broadcast;
1651
1594
  this.group = params.group;
1652
1595
  }
1653
1596
  /**
1654
- * Generate the TLObject from buffer.
1655
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1656
- */
1597
+ * Generate the TLObject from buffer.
1598
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1599
+ */
1657
1600
  static async read(_data, ..._args) {
1658
1601
  // no flags
1659
1602
  let broadcast = await TLObject.read(_data);
1660
1603
  let group = await TLObject.read(_data);
1661
- return new SetDiscussionGroup({ broadcast: broadcast, group: group });
1604
+ return new SetDiscussionGroup({ "broadcast": broadcast, "group": group });
1662
1605
  }
1663
1606
  /**
1664
- * Generate buffer from TLObject.
1665
- */
1607
+ * Generate buffer from TLObject.
1608
+ */
1666
1609
  write() {
1667
1610
  const b = new BytesIO();
1668
1611
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1683,29 +1626,29 @@ export class EditLocation extends TLObject {
1683
1626
  address;
1684
1627
  constructor(params) {
1685
1628
  super();
1686
- this.classType = 'functions';
1687
- this.className = 'channels.EditLocation';
1629
+ this.classType = "functions";
1630
+ this.className = "channels.EditLocation";
1688
1631
  this.constructorId = 0x58e63f6d;
1689
1632
  this.subclassOfId = 0xf5b399ac;
1690
- this._slots = ['channel', 'geoPoint', 'address'];
1633
+ this._slots = ["channel", "geoPoint", "address"];
1691
1634
  this.channel = params.channel;
1692
1635
  this.geoPoint = params.geoPoint;
1693
1636
  this.address = params.address;
1694
1637
  }
1695
1638
  /**
1696
- * Generate the TLObject from buffer.
1697
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1698
- */
1639
+ * Generate the TLObject from buffer.
1640
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1641
+ */
1699
1642
  static async read(_data, ..._args) {
1700
1643
  // no flags
1701
1644
  let channel = await TLObject.read(_data);
1702
1645
  let geoPoint = await TLObject.read(_data);
1703
1646
  let address = await Primitive.String.read(_data);
1704
- return new EditLocation({ channel: channel, geoPoint: geoPoint, address: address });
1647
+ return new EditLocation({ "channel": channel, "geoPoint": geoPoint, "address": address });
1705
1648
  }
1706
1649
  /**
1707
- * Generate buffer from TLObject.
1708
- */
1650
+ * Generate buffer from TLObject.
1651
+ */
1709
1652
  write() {
1710
1653
  const b = new BytesIO();
1711
1654
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1717,7 +1660,7 @@ export class EditLocation extends TLObject {
1717
1660
  b.write(this.geoPoint.write());
1718
1661
  }
1719
1662
  if (this.address !== undefined) {
1720
- b.write(Primitive.String.write(this.address));
1663
+ b.write((Primitive.String.write(this.address)));
1721
1664
  }
1722
1665
  return b.buffer;
1723
1666
  }
@@ -1728,27 +1671,27 @@ export class ToggleSlowMode extends TLObject {
1728
1671
  seconds;
1729
1672
  constructor(params) {
1730
1673
  super();
1731
- this.classType = 'functions';
1732
- this.className = 'channels.ToggleSlowMode';
1674
+ this.classType = "functions";
1675
+ this.className = "channels.ToggleSlowMode";
1733
1676
  this.constructorId = 0xedd49ef0;
1734
1677
  this.subclassOfId = 0x8af52aac;
1735
- this._slots = ['channel', 'seconds'];
1678
+ this._slots = ["channel", "seconds"];
1736
1679
  this.channel = params.channel;
1737
1680
  this.seconds = params.seconds;
1738
1681
  }
1739
1682
  /**
1740
- * Generate the TLObject from buffer.
1741
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1742
- */
1683
+ * Generate the TLObject from buffer.
1684
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1685
+ */
1743
1686
  static async read(_data, ..._args) {
1744
1687
  // no flags
1745
1688
  let channel = await TLObject.read(_data);
1746
1689
  let seconds = await Primitive.Int.read(_data);
1747
- return new ToggleSlowMode({ channel: channel, seconds: seconds });
1690
+ return new ToggleSlowMode({ "channel": channel, "seconds": seconds });
1748
1691
  }
1749
1692
  /**
1750
- * Generate buffer from TLObject.
1751
- */
1693
+ * Generate buffer from TLObject.
1694
+ */
1752
1695
  write() {
1753
1696
  const b = new BytesIO();
1754
1697
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1757,7 +1700,7 @@ export class ToggleSlowMode extends TLObject {
1757
1700
  b.write(this.channel.write());
1758
1701
  }
1759
1702
  if (this.seconds !== undefined) {
1760
- b.write(Primitive.Int.write(this.seconds));
1703
+ b.write((Primitive.Int.write(this.seconds)));
1761
1704
  }
1762
1705
  return b.buffer;
1763
1706
  }
@@ -1766,23 +1709,23 @@ export class GetInactiveChannels extends TLObject {
1766
1709
  __response__;
1767
1710
  constructor() {
1768
1711
  super();
1769
- this.classType = 'functions';
1770
- this.className = 'channels.GetInactiveChannels';
1712
+ this.classType = "functions";
1713
+ this.className = "channels.GetInactiveChannels";
1771
1714
  this.constructorId = 0x11e831ee;
1772
1715
  this.subclassOfId = 0x8bf3d7d4;
1773
1716
  this._slots = [];
1774
1717
  }
1775
1718
  /**
1776
- * Generate the TLObject from buffer.
1777
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1778
- */
1719
+ * Generate the TLObject from buffer.
1720
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1721
+ */
1779
1722
  static async read(_data, ..._args) {
1780
1723
  // no flags
1781
1724
  return new GetInactiveChannels();
1782
1725
  }
1783
1726
  /**
1784
- * Generate buffer from TLObject.
1785
- */
1727
+ * Generate buffer from TLObject.
1728
+ */
1786
1729
  write() {
1787
1730
  const b = new BytesIO();
1788
1731
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1795,25 +1738,25 @@ export class ConvertToGigagroup extends TLObject {
1795
1738
  channel;
1796
1739
  constructor(params) {
1797
1740
  super();
1798
- this.classType = 'functions';
1799
- this.className = 'channels.ConvertToGigagroup';
1741
+ this.classType = "functions";
1742
+ this.className = "channels.ConvertToGigagroup";
1800
1743
  this.constructorId = 0xb290c69;
1801
1744
  this.subclassOfId = 0x8af52aac;
1802
- this._slots = ['channel'];
1745
+ this._slots = ["channel"];
1803
1746
  this.channel = params.channel;
1804
1747
  }
1805
1748
  /**
1806
- * Generate the TLObject from buffer.
1807
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1808
- */
1749
+ * Generate the TLObject from buffer.
1750
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1751
+ */
1809
1752
  static async read(_data, ..._args) {
1810
1753
  // no flags
1811
1754
  let channel = await TLObject.read(_data);
1812
- return new ConvertToGigagroup({ channel: channel });
1755
+ return new ConvertToGigagroup({ "channel": channel });
1813
1756
  }
1814
1757
  /**
1815
- * Generate buffer from TLObject.
1816
- */
1758
+ * Generate buffer from TLObject.
1759
+ */
1817
1760
  write() {
1818
1761
  const b = new BytesIO();
1819
1762
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1831,42 +1774,38 @@ export class GetSendAs extends TLObject {
1831
1774
  peer;
1832
1775
  constructor(params) {
1833
1776
  super();
1834
- this.classType = 'functions';
1835
- this.className = 'channels.GetSendAs';
1777
+ this.classType = "functions";
1778
+ this.className = "channels.GetSendAs";
1836
1779
  this.constructorId = 0xe785a43f;
1837
1780
  this.subclassOfId = 0x38cb8d21;
1838
- this._slots = ['forPaidReactions', 'forLiveStories', 'peer'];
1781
+ this._slots = ["forPaidReactions", "forLiveStories", "peer"];
1839
1782
  this.forPaidReactions = params.forPaidReactions;
1840
1783
  this.forLiveStories = params.forLiveStories;
1841
1784
  this.peer = params.peer;
1842
1785
  }
1843
1786
  /**
1844
- * Generate the TLObject from buffer.
1845
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1846
- */
1787
+ * Generate the TLObject from buffer.
1788
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1789
+ */
1847
1790
  static async read(_data, ..._args) {
1848
1791
  // @ts-ignore
1849
1792
  let flags = await Primitive.Int.read(_data);
1850
- let forPaidReactions = flags & (1 << 0) ? true : false;
1851
- let forLiveStories = flags & (1 << 1) ? true : false;
1793
+ let forPaidReactions = (flags & (1 << 0)) ? true : false;
1794
+ let forLiveStories = (flags & (1 << 1)) ? true : false;
1852
1795
  let peer = await TLObject.read(_data);
1853
- return new GetSendAs({
1854
- forPaidReactions: forPaidReactions,
1855
- forLiveStories: forLiveStories,
1856
- peer: peer,
1857
- });
1796
+ return new GetSendAs({ "forPaidReactions": forPaidReactions, "forLiveStories": forLiveStories, "peer": peer });
1858
1797
  }
1859
1798
  /**
1860
- * Generate buffer from TLObject.
1861
- */
1799
+ * Generate buffer from TLObject.
1800
+ */
1862
1801
  write() {
1863
1802
  const b = new BytesIO();
1864
1803
  b.write(Primitive.Int.write(this.constructorId, false));
1865
1804
  // @ts-ignore
1866
1805
  let flags = 0;
1867
- flags |= this.forPaidReactions ? 1 << 0 : 0;
1868
- flags |= this.forLiveStories ? 1 << 1 : 0;
1869
- b.write(Primitive.Int.write(flags));
1806
+ flags |= this.forPaidReactions ? (1 << 0) : 0;
1807
+ flags |= this.forLiveStories ? (1 << 1) : 0;
1808
+ b.write((Primitive.Int.write(flags)));
1870
1809
  if (this.peer !== undefined) {
1871
1810
  b.write(this.peer.write());
1872
1811
  }
@@ -1879,27 +1818,27 @@ export class DeleteParticipantHistory extends TLObject {
1879
1818
  participant;
1880
1819
  constructor(params) {
1881
1820
  super();
1882
- this.classType = 'functions';
1883
- this.className = 'channels.DeleteParticipantHistory';
1821
+ this.classType = "functions";
1822
+ this.className = "channels.DeleteParticipantHistory";
1884
1823
  this.constructorId = 0x367544db;
1885
1824
  this.subclassOfId = 0x2c49c116;
1886
- this._slots = ['channel', 'participant'];
1825
+ this._slots = ["channel", "participant"];
1887
1826
  this.channel = params.channel;
1888
1827
  this.participant = params.participant;
1889
1828
  }
1890
1829
  /**
1891
- * Generate the TLObject from buffer.
1892
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1893
- */
1830
+ * Generate the TLObject from buffer.
1831
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1832
+ */
1894
1833
  static async read(_data, ..._args) {
1895
1834
  // no flags
1896
1835
  let channel = await TLObject.read(_data);
1897
1836
  let participant = await TLObject.read(_data);
1898
- return new DeleteParticipantHistory({ channel: channel, participant: participant });
1837
+ return new DeleteParticipantHistory({ "channel": channel, "participant": participant });
1899
1838
  }
1900
1839
  /**
1901
- * Generate buffer from TLObject.
1902
- */
1840
+ * Generate buffer from TLObject.
1841
+ */
1903
1842
  write() {
1904
1843
  const b = new BytesIO();
1905
1844
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1919,27 +1858,27 @@ export class ToggleJoinToSend extends TLObject {
1919
1858
  enabled;
1920
1859
  constructor(params) {
1921
1860
  super();
1922
- this.classType = 'functions';
1923
- this.className = 'channels.ToggleJoinToSend';
1861
+ this.classType = "functions";
1862
+ this.className = "channels.ToggleJoinToSend";
1924
1863
  this.constructorId = 0xe4cb9580;
1925
1864
  this.subclassOfId = 0x8af52aac;
1926
- this._slots = ['channel', 'enabled'];
1865
+ this._slots = ["channel", "enabled"];
1927
1866
  this.channel = params.channel;
1928
1867
  this.enabled = params.enabled;
1929
1868
  }
1930
1869
  /**
1931
- * Generate the TLObject from buffer.
1932
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1933
- */
1870
+ * Generate the TLObject from buffer.
1871
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1872
+ */
1934
1873
  static async read(_data, ..._args) {
1935
1874
  // no flags
1936
1875
  let channel = await TLObject.read(_data);
1937
1876
  let enabled = await Primitive.Bool.read(_data);
1938
- return new ToggleJoinToSend({ channel: channel, enabled: enabled });
1877
+ return new ToggleJoinToSend({ "channel": channel, "enabled": enabled });
1939
1878
  }
1940
1879
  /**
1941
- * Generate buffer from TLObject.
1942
- */
1880
+ * Generate buffer from TLObject.
1881
+ */
1943
1882
  write() {
1944
1883
  const b = new BytesIO();
1945
1884
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1948,7 +1887,7 @@ export class ToggleJoinToSend extends TLObject {
1948
1887
  b.write(this.channel.write());
1949
1888
  }
1950
1889
  if (this.enabled !== undefined) {
1951
- b.write(Primitive.Bool.write(this.enabled));
1890
+ b.write((Primitive.Bool.write(this.enabled)));
1952
1891
  }
1953
1892
  return b.buffer;
1954
1893
  }
@@ -1961,50 +1900,45 @@ export class ToggleJoinRequest extends TLObject {
1961
1900
  guardBot;
1962
1901
  constructor(params) {
1963
1902
  super();
1964
- this.classType = 'functions';
1965
- this.className = 'channels.ToggleJoinRequest';
1903
+ this.classType = "functions";
1904
+ this.className = "channels.ToggleJoinRequest";
1966
1905
  this.constructorId = 0xecc2618;
1967
1906
  this.subclassOfId = 0x8af52aac;
1968
- this._slots = ['applyToInvites', 'channel', 'enabled', 'guardBot'];
1907
+ this._slots = ["applyToInvites", "channel", "enabled", "guardBot"];
1969
1908
  this.applyToInvites = params.applyToInvites;
1970
1909
  this.channel = params.channel;
1971
1910
  this.enabled = params.enabled;
1972
1911
  this.guardBot = params.guardBot;
1973
1912
  }
1974
1913
  /**
1975
- * Generate the TLObject from buffer.
1976
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1977
- */
1914
+ * Generate the TLObject from buffer.
1915
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1916
+ */
1978
1917
  static async read(_data, ..._args) {
1979
1918
  // @ts-ignore
1980
1919
  let flags = await Primitive.Int.read(_data);
1981
- let applyToInvites = flags & (1 << 1) ? true : false;
1920
+ let applyToInvites = (flags & (1 << 1)) ? true : false;
1982
1921
  let channel = await TLObject.read(_data);
1983
1922
  let enabled = await Primitive.Bool.read(_data);
1984
- let guardBot = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
1985
- return new ToggleJoinRequest({
1986
- applyToInvites: applyToInvites,
1987
- channel: channel,
1988
- enabled: enabled,
1989
- guardBot: guardBot,
1990
- });
1923
+ let guardBot = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
1924
+ return new ToggleJoinRequest({ "applyToInvites": applyToInvites, "channel": channel, "enabled": enabled, "guardBot": guardBot });
1991
1925
  }
1992
1926
  /**
1993
- * Generate buffer from TLObject.
1994
- */
1927
+ * Generate buffer from TLObject.
1928
+ */
1995
1929
  write() {
1996
1930
  const b = new BytesIO();
1997
1931
  b.write(Primitive.Int.write(this.constructorId, false));
1998
1932
  // @ts-ignore
1999
1933
  let flags = 0;
2000
- flags |= this.applyToInvites ? 1 << 1 : 0;
2001
- flags |= this.guardBot !== undefined ? 1 << 0 : 0;
2002
- b.write(Primitive.Int.write(flags));
1934
+ flags |= this.applyToInvites ? (1 << 1) : 0;
1935
+ flags |= this.guardBot !== undefined ? (1 << 0) : 0;
1936
+ b.write((Primitive.Int.write(flags)));
2003
1937
  if (this.channel !== undefined) {
2004
1938
  b.write(this.channel.write());
2005
1939
  }
2006
1940
  if (this.enabled !== undefined) {
2007
- b.write(Primitive.Bool.write(this.enabled));
1941
+ b.write((Primitive.Bool.write(this.enabled)));
2008
1942
  }
2009
1943
  if (this.guardBot !== undefined) {
2010
1944
  b.write(this.guardBot.write());
@@ -2018,27 +1952,27 @@ export class ReorderUsernames extends TLObject {
2018
1952
  order;
2019
1953
  constructor(params) {
2020
1954
  super();
2021
- this.classType = 'functions';
2022
- this.className = 'channels.ReorderUsernames';
1955
+ this.classType = "functions";
1956
+ this.className = "channels.ReorderUsernames";
2023
1957
  this.constructorId = 0xb45ced1d;
2024
1958
  this.subclassOfId = 0xf5b399ac;
2025
- this._slots = ['channel', 'order'];
1959
+ this._slots = ["channel", "order"];
2026
1960
  this.channel = params.channel;
2027
1961
  this.order = params.order;
2028
1962
  }
2029
1963
  /**
2030
- * Generate the TLObject from buffer.
2031
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2032
- */
1964
+ * Generate the TLObject from buffer.
1965
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1966
+ */
2033
1967
  static async read(_data, ..._args) {
2034
1968
  // no flags
2035
1969
  let channel = await TLObject.read(_data);
2036
1970
  let order = await TLObject.read(_data, Primitive.String);
2037
- return new ReorderUsernames({ channel: channel, order: order });
1971
+ return new ReorderUsernames({ "channel": channel, "order": order });
2038
1972
  }
2039
1973
  /**
2040
- * Generate buffer from TLObject.
2041
- */
1974
+ * Generate buffer from TLObject.
1975
+ */
2042
1976
  write() {
2043
1977
  const b = new BytesIO();
2044
1978
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2047,7 +1981,7 @@ export class ReorderUsernames extends TLObject {
2047
1981
  b.write(this.channel.write());
2048
1982
  }
2049
1983
  if (this.order) {
2050
- b.write(Primitive.Vector.write(this.order, Primitive.String));
1984
+ b.write((Primitive.Vector.write(this.order, Primitive.String)));
2051
1985
  }
2052
1986
  return b.buffer;
2053
1987
  }
@@ -2059,29 +1993,29 @@ export class ToggleUsername extends TLObject {
2059
1993
  active;
2060
1994
  constructor(params) {
2061
1995
  super();
2062
- this.classType = 'functions';
2063
- this.className = 'channels.ToggleUsername';
1996
+ this.classType = "functions";
1997
+ this.className = "channels.ToggleUsername";
2064
1998
  this.constructorId = 0x50f24105;
2065
1999
  this.subclassOfId = 0xf5b399ac;
2066
- this._slots = ['channel', 'username', 'active'];
2000
+ this._slots = ["channel", "username", "active"];
2067
2001
  this.channel = params.channel;
2068
2002
  this.username = params.username;
2069
2003
  this.active = params.active;
2070
2004
  }
2071
2005
  /**
2072
- * Generate the TLObject from buffer.
2073
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2074
- */
2006
+ * Generate the TLObject from buffer.
2007
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2008
+ */
2075
2009
  static async read(_data, ..._args) {
2076
2010
  // no flags
2077
2011
  let channel = await TLObject.read(_data);
2078
2012
  let username = await Primitive.String.read(_data);
2079
2013
  let active = await Primitive.Bool.read(_data);
2080
- return new ToggleUsername({ channel: channel, username: username, active: active });
2014
+ return new ToggleUsername({ "channel": channel, "username": username, "active": active });
2081
2015
  }
2082
2016
  /**
2083
- * Generate buffer from TLObject.
2084
- */
2017
+ * Generate buffer from TLObject.
2018
+ */
2085
2019
  write() {
2086
2020
  const b = new BytesIO();
2087
2021
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2090,10 +2024,10 @@ export class ToggleUsername extends TLObject {
2090
2024
  b.write(this.channel.write());
2091
2025
  }
2092
2026
  if (this.username !== undefined) {
2093
- b.write(Primitive.String.write(this.username));
2027
+ b.write((Primitive.String.write(this.username)));
2094
2028
  }
2095
2029
  if (this.active !== undefined) {
2096
- b.write(Primitive.Bool.write(this.active));
2030
+ b.write((Primitive.Bool.write(this.active)));
2097
2031
  }
2098
2032
  return b.buffer;
2099
2033
  }
@@ -2103,25 +2037,25 @@ export class DeactivateAllUsernames extends TLObject {
2103
2037
  channel;
2104
2038
  constructor(params) {
2105
2039
  super();
2106
- this.classType = 'functions';
2107
- this.className = 'channels.DeactivateAllUsernames';
2040
+ this.classType = "functions";
2041
+ this.className = "channels.DeactivateAllUsernames";
2108
2042
  this.constructorId = 0xa245dd3;
2109
2043
  this.subclassOfId = 0xf5b399ac;
2110
- this._slots = ['channel'];
2044
+ this._slots = ["channel"];
2111
2045
  this.channel = params.channel;
2112
2046
  }
2113
2047
  /**
2114
- * Generate the TLObject from buffer.
2115
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2116
- */
2048
+ * Generate the TLObject from buffer.
2049
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2050
+ */
2117
2051
  static async read(_data, ..._args) {
2118
2052
  // no flags
2119
2053
  let channel = await TLObject.read(_data);
2120
- return new DeactivateAllUsernames({ channel: channel });
2054
+ return new DeactivateAllUsernames({ "channel": channel });
2121
2055
  }
2122
2056
  /**
2123
- * Generate buffer from TLObject.
2124
- */
2057
+ * Generate buffer from TLObject.
2058
+ */
2125
2059
  write() {
2126
2060
  const b = new BytesIO();
2127
2061
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2140,31 +2074,31 @@ export class ToggleForum extends TLObject {
2140
2074
  sidebar;
2141
2075
  constructor(params) {
2142
2076
  super();
2143
- this.classType = 'functions';
2144
- this.className = 'channels.ToggleForum';
2077
+ this.classType = "functions";
2078
+ this.className = "channels.ToggleForum";
2145
2079
  this.constructorId = 0xa2952b54;
2146
2080
  this.subclassOfId = 0x8af52aac;
2147
- this._slots = ['channel', 'enabled', 'tabs', 'sidebar'];
2081
+ this._slots = ["channel", "enabled", "tabs", "sidebar"];
2148
2082
  this.channel = params.channel;
2149
2083
  this.enabled = params.enabled;
2150
2084
  this.tabs = params.tabs;
2151
2085
  this.sidebar = params.sidebar;
2152
2086
  }
2153
2087
  /**
2154
- * Generate the TLObject from buffer.
2155
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2156
- */
2088
+ * Generate the TLObject from buffer.
2089
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2090
+ */
2157
2091
  static async read(_data, ..._args) {
2158
2092
  // no flags
2159
2093
  let channel = await TLObject.read(_data);
2160
2094
  let enabled = await Primitive.Bool.read(_data);
2161
2095
  let tabs = await Primitive.Bool.read(_data);
2162
2096
  let sidebar = await Primitive.Bool.read(_data);
2163
- return new ToggleForum({ channel: channel, enabled: enabled, tabs: tabs, sidebar: sidebar });
2097
+ return new ToggleForum({ "channel": channel, "enabled": enabled, "tabs": tabs, "sidebar": sidebar });
2164
2098
  }
2165
2099
  /**
2166
- * Generate buffer from TLObject.
2167
- */
2100
+ * Generate buffer from TLObject.
2101
+ */
2168
2102
  write() {
2169
2103
  const b = new BytesIO();
2170
2104
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2173,13 +2107,13 @@ export class ToggleForum extends TLObject {
2173
2107
  b.write(this.channel.write());
2174
2108
  }
2175
2109
  if (this.enabled !== undefined) {
2176
- b.write(Primitive.Bool.write(this.enabled));
2110
+ b.write((Primitive.Bool.write(this.enabled)));
2177
2111
  }
2178
2112
  if (this.tabs !== undefined) {
2179
- b.write(Primitive.Bool.write(this.tabs));
2113
+ b.write((Primitive.Bool.write(this.tabs)));
2180
2114
  }
2181
2115
  if (this.sidebar !== undefined) {
2182
- b.write(Primitive.Bool.write(this.sidebar));
2116
+ b.write((Primitive.Bool.write(this.sidebar)));
2183
2117
  }
2184
2118
  return b.buffer;
2185
2119
  }
@@ -2190,27 +2124,27 @@ export class ToggleAntiSpam extends TLObject {
2190
2124
  enabled;
2191
2125
  constructor(params) {
2192
2126
  super();
2193
- this.classType = 'functions';
2194
- this.className = 'channels.ToggleAntiSpam';
2127
+ this.classType = "functions";
2128
+ this.className = "channels.ToggleAntiSpam";
2195
2129
  this.constructorId = 0x68f3e4eb;
2196
2130
  this.subclassOfId = 0x8af52aac;
2197
- this._slots = ['channel', 'enabled'];
2131
+ this._slots = ["channel", "enabled"];
2198
2132
  this.channel = params.channel;
2199
2133
  this.enabled = params.enabled;
2200
2134
  }
2201
2135
  /**
2202
- * Generate the TLObject from buffer.
2203
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2204
- */
2136
+ * Generate the TLObject from buffer.
2137
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2138
+ */
2205
2139
  static async read(_data, ..._args) {
2206
2140
  // no flags
2207
2141
  let channel = await TLObject.read(_data);
2208
2142
  let enabled = await Primitive.Bool.read(_data);
2209
- return new ToggleAntiSpam({ channel: channel, enabled: enabled });
2143
+ return new ToggleAntiSpam({ "channel": channel, "enabled": enabled });
2210
2144
  }
2211
2145
  /**
2212
- * Generate buffer from TLObject.
2213
- */
2146
+ * Generate buffer from TLObject.
2147
+ */
2214
2148
  write() {
2215
2149
  const b = new BytesIO();
2216
2150
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2219,7 +2153,7 @@ export class ToggleAntiSpam extends TLObject {
2219
2153
  b.write(this.channel.write());
2220
2154
  }
2221
2155
  if (this.enabled !== undefined) {
2222
- b.write(Primitive.Bool.write(this.enabled));
2156
+ b.write((Primitive.Bool.write(this.enabled)));
2223
2157
  }
2224
2158
  return b.buffer;
2225
2159
  }
@@ -2230,27 +2164,27 @@ export class ReportAntiSpamFalsePositive extends TLObject {
2230
2164
  msgId;
2231
2165
  constructor(params) {
2232
2166
  super();
2233
- this.classType = 'functions';
2234
- this.className = 'channels.ReportAntiSpamFalsePositive';
2167
+ this.classType = "functions";
2168
+ this.className = "channels.ReportAntiSpamFalsePositive";
2235
2169
  this.constructorId = 0xa850a693;
2236
2170
  this.subclassOfId = 0xf5b399ac;
2237
- this._slots = ['channel', 'msgId'];
2171
+ this._slots = ["channel", "msgId"];
2238
2172
  this.channel = params.channel;
2239
2173
  this.msgId = params.msgId;
2240
2174
  }
2241
2175
  /**
2242
- * Generate the TLObject from buffer.
2243
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2244
- */
2176
+ * Generate the TLObject from buffer.
2177
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2178
+ */
2245
2179
  static async read(_data, ..._args) {
2246
2180
  // no flags
2247
2181
  let channel = await TLObject.read(_data);
2248
2182
  let msgId = await Primitive.Int.read(_data);
2249
- return new ReportAntiSpamFalsePositive({ channel: channel, msgId: msgId });
2183
+ return new ReportAntiSpamFalsePositive({ "channel": channel, "msgId": msgId });
2250
2184
  }
2251
2185
  /**
2252
- * Generate buffer from TLObject.
2253
- */
2186
+ * Generate buffer from TLObject.
2187
+ */
2254
2188
  write() {
2255
2189
  const b = new BytesIO();
2256
2190
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2259,7 +2193,7 @@ export class ReportAntiSpamFalsePositive extends TLObject {
2259
2193
  b.write(this.channel.write());
2260
2194
  }
2261
2195
  if (this.msgId !== undefined) {
2262
- b.write(Primitive.Int.write(this.msgId));
2196
+ b.write((Primitive.Int.write(this.msgId)));
2263
2197
  }
2264
2198
  return b.buffer;
2265
2199
  }
@@ -2270,27 +2204,27 @@ export class ToggleParticipantsHidden extends TLObject {
2270
2204
  enabled;
2271
2205
  constructor(params) {
2272
2206
  super();
2273
- this.classType = 'functions';
2274
- this.className = 'channels.ToggleParticipantsHidden';
2207
+ this.classType = "functions";
2208
+ this.className = "channels.ToggleParticipantsHidden";
2275
2209
  this.constructorId = 0x6a6e7854;
2276
2210
  this.subclassOfId = 0x8af52aac;
2277
- this._slots = ['channel', 'enabled'];
2211
+ this._slots = ["channel", "enabled"];
2278
2212
  this.channel = params.channel;
2279
2213
  this.enabled = params.enabled;
2280
2214
  }
2281
2215
  /**
2282
- * Generate the TLObject from buffer.
2283
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2284
- */
2216
+ * Generate the TLObject from buffer.
2217
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2218
+ */
2285
2219
  static async read(_data, ..._args) {
2286
2220
  // no flags
2287
2221
  let channel = await TLObject.read(_data);
2288
2222
  let enabled = await Primitive.Bool.read(_data);
2289
- return new ToggleParticipantsHidden({ channel: channel, enabled: enabled });
2223
+ return new ToggleParticipantsHidden({ "channel": channel, "enabled": enabled });
2290
2224
  }
2291
2225
  /**
2292
- * Generate buffer from TLObject.
2293
- */
2226
+ * Generate buffer from TLObject.
2227
+ */
2294
2228
  write() {
2295
2229
  const b = new BytesIO();
2296
2230
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2299,7 +2233,7 @@ export class ToggleParticipantsHidden extends TLObject {
2299
2233
  b.write(this.channel.write());
2300
2234
  }
2301
2235
  if (this.enabled !== undefined) {
2302
- b.write(Primitive.Bool.write(this.enabled));
2236
+ b.write((Primitive.Bool.write(this.enabled)));
2303
2237
  }
2304
2238
  return b.buffer;
2305
2239
  }
@@ -2312,54 +2246,49 @@ export class UpdateColor extends TLObject {
2312
2246
  backgroundEmojiId;
2313
2247
  constructor(params) {
2314
2248
  super();
2315
- this.classType = 'functions';
2316
- this.className = 'channels.UpdateColor';
2249
+ this.classType = "functions";
2250
+ this.className = "channels.UpdateColor";
2317
2251
  this.constructorId = 0xd8aa3671;
2318
2252
  this.subclassOfId = 0x8af52aac;
2319
- this._slots = ['forProfile', 'channel', 'color', 'backgroundEmojiId'];
2253
+ this._slots = ["forProfile", "channel", "color", "backgroundEmojiId"];
2320
2254
  this.forProfile = params.forProfile;
2321
2255
  this.channel = params.channel;
2322
2256
  this.color = params.color;
2323
2257
  this.backgroundEmojiId = params.backgroundEmojiId;
2324
2258
  }
2325
2259
  /**
2326
- * Generate the TLObject from buffer.
2327
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2328
- */
2260
+ * Generate the TLObject from buffer.
2261
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2262
+ */
2329
2263
  static async read(_data, ..._args) {
2330
2264
  // @ts-ignore
2331
2265
  let flags = await Primitive.Int.read(_data);
2332
- let forProfile = flags & (1 << 1) ? true : false;
2266
+ let forProfile = (flags & (1 << 1)) ? true : false;
2333
2267
  let channel = await TLObject.read(_data);
2334
- let color = flags & (1 << 2) ? await Primitive.Int.read(_data) : undefined;
2335
- let backgroundEmojiId = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
2336
- return new UpdateColor({
2337
- forProfile: forProfile,
2338
- channel: channel,
2339
- color: color,
2340
- backgroundEmojiId: backgroundEmojiId,
2341
- });
2268
+ let color = (flags & (1 << 2)) ? await Primitive.Int.read(_data) : undefined;
2269
+ let backgroundEmojiId = (flags & (1 << 0)) ? await Primitive.Long.read(_data) : undefined;
2270
+ return new UpdateColor({ "forProfile": forProfile, "channel": channel, "color": color, "backgroundEmojiId": backgroundEmojiId });
2342
2271
  }
2343
2272
  /**
2344
- * Generate buffer from TLObject.
2345
- */
2273
+ * Generate buffer from TLObject.
2274
+ */
2346
2275
  write() {
2347
2276
  const b = new BytesIO();
2348
2277
  b.write(Primitive.Int.write(this.constructorId, false));
2349
2278
  // @ts-ignore
2350
2279
  let flags = 0;
2351
- flags |= this.forProfile ? 1 << 1 : 0;
2352
- flags |= this.color !== undefined ? 1 << 2 : 0;
2353
- flags |= this.backgroundEmojiId !== undefined ? 1 << 0 : 0;
2354
- b.write(Primitive.Int.write(flags));
2280
+ flags |= this.forProfile ? (1 << 1) : 0;
2281
+ flags |= this.color !== undefined ? (1 << 2) : 0;
2282
+ flags |= this.backgroundEmojiId !== undefined ? (1 << 0) : 0;
2283
+ b.write((Primitive.Int.write(flags)));
2355
2284
  if (this.channel !== undefined) {
2356
2285
  b.write(this.channel.write());
2357
2286
  }
2358
2287
  if (this.color !== undefined) {
2359
- b.write(Primitive.Int.write(this.color));
2288
+ b.write((Primitive.Int.write(this.color)));
2360
2289
  }
2361
2290
  if (this.backgroundEmojiId !== undefined) {
2362
- b.write(Primitive.Long.write(this.backgroundEmojiId));
2291
+ b.write((Primitive.Long.write(this.backgroundEmojiId)));
2363
2292
  }
2364
2293
  return b.buffer;
2365
2294
  }
@@ -2370,27 +2299,27 @@ export class ToggleViewForumAsMessages extends TLObject {
2370
2299
  enabled;
2371
2300
  constructor(params) {
2372
2301
  super();
2373
- this.classType = 'functions';
2374
- this.className = 'channels.ToggleViewForumAsMessages';
2302
+ this.classType = "functions";
2303
+ this.className = "channels.ToggleViewForumAsMessages";
2375
2304
  this.constructorId = 0x9738bb15;
2376
2305
  this.subclassOfId = 0x8af52aac;
2377
- this._slots = ['channel', 'enabled'];
2306
+ this._slots = ["channel", "enabled"];
2378
2307
  this.channel = params.channel;
2379
2308
  this.enabled = params.enabled;
2380
2309
  }
2381
2310
  /**
2382
- * Generate the TLObject from buffer.
2383
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2384
- */
2311
+ * Generate the TLObject from buffer.
2312
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2313
+ */
2385
2314
  static async read(_data, ..._args) {
2386
2315
  // no flags
2387
2316
  let channel = await TLObject.read(_data);
2388
2317
  let enabled = await Primitive.Bool.read(_data);
2389
- return new ToggleViewForumAsMessages({ channel: channel, enabled: enabled });
2318
+ return new ToggleViewForumAsMessages({ "channel": channel, "enabled": enabled });
2390
2319
  }
2391
2320
  /**
2392
- * Generate buffer from TLObject.
2393
- */
2321
+ * Generate buffer from TLObject.
2322
+ */
2394
2323
  write() {
2395
2324
  const b = new BytesIO();
2396
2325
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2399,7 +2328,7 @@ export class ToggleViewForumAsMessages extends TLObject {
2399
2328
  b.write(this.channel.write());
2400
2329
  }
2401
2330
  if (this.enabled !== undefined) {
2402
- b.write(Primitive.Bool.write(this.enabled));
2331
+ b.write((Primitive.Bool.write(this.enabled)));
2403
2332
  }
2404
2333
  return b.buffer;
2405
2334
  }
@@ -2409,33 +2338,33 @@ export class GetChannelRecommendations extends TLObject {
2409
2338
  channel;
2410
2339
  constructor(params) {
2411
2340
  super();
2412
- this.classType = 'functions';
2413
- this.className = 'channels.GetChannelRecommendations';
2341
+ this.classType = "functions";
2342
+ this.className = "channels.GetChannelRecommendations";
2414
2343
  this.constructorId = 0x25a71742;
2415
2344
  this.subclassOfId = 0x99d5cb14;
2416
- this._slots = ['channel'];
2345
+ this._slots = ["channel"];
2417
2346
  this.channel = params.channel;
2418
2347
  }
2419
2348
  /**
2420
- * Generate the TLObject from buffer.
2421
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2422
- */
2349
+ * Generate the TLObject from buffer.
2350
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2351
+ */
2423
2352
  static async read(_data, ..._args) {
2424
2353
  // @ts-ignore
2425
2354
  let flags = await Primitive.Int.read(_data);
2426
- let channel = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
2427
- return new GetChannelRecommendations({ channel: channel });
2355
+ let channel = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
2356
+ return new GetChannelRecommendations({ "channel": channel });
2428
2357
  }
2429
2358
  /**
2430
- * Generate buffer from TLObject.
2431
- */
2359
+ * Generate buffer from TLObject.
2360
+ */
2432
2361
  write() {
2433
2362
  const b = new BytesIO();
2434
2363
  b.write(Primitive.Int.write(this.constructorId, false));
2435
2364
  // @ts-ignore
2436
2365
  let flags = 0;
2437
- flags |= this.channel !== undefined ? 1 << 0 : 0;
2438
- b.write(Primitive.Int.write(flags));
2366
+ flags |= this.channel !== undefined ? (1 << 0) : 0;
2367
+ b.write((Primitive.Int.write(flags)));
2439
2368
  if (this.channel !== undefined) {
2440
2369
  b.write(this.channel.write());
2441
2370
  }
@@ -2448,27 +2377,27 @@ export class UpdateEmojiStatus extends TLObject {
2448
2377
  emojiStatus;
2449
2378
  constructor(params) {
2450
2379
  super();
2451
- this.classType = 'functions';
2452
- this.className = 'channels.UpdateEmojiStatus';
2380
+ this.classType = "functions";
2381
+ this.className = "channels.UpdateEmojiStatus";
2453
2382
  this.constructorId = 0xf0d3e6a8;
2454
2383
  this.subclassOfId = 0x8af52aac;
2455
- this._slots = ['channel', 'emojiStatus'];
2384
+ this._slots = ["channel", "emojiStatus"];
2456
2385
  this.channel = params.channel;
2457
2386
  this.emojiStatus = params.emojiStatus;
2458
2387
  }
2459
2388
  /**
2460
- * Generate the TLObject from buffer.
2461
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2462
- */
2389
+ * Generate the TLObject from buffer.
2390
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2391
+ */
2463
2392
  static async read(_data, ..._args) {
2464
2393
  // no flags
2465
2394
  let channel = await TLObject.read(_data);
2466
2395
  let emojiStatus = await TLObject.read(_data);
2467
- return new UpdateEmojiStatus({ channel: channel, emojiStatus: emojiStatus });
2396
+ return new UpdateEmojiStatus({ "channel": channel, "emojiStatus": emojiStatus });
2468
2397
  }
2469
2398
  /**
2470
- * Generate buffer from TLObject.
2471
- */
2399
+ * Generate buffer from TLObject.
2400
+ */
2472
2401
  write() {
2473
2402
  const b = new BytesIO();
2474
2403
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2488,27 +2417,27 @@ export class SetBoostsToUnblockRestrictions extends TLObject {
2488
2417
  boosts;
2489
2418
  constructor(params) {
2490
2419
  super();
2491
- this.classType = 'functions';
2492
- this.className = 'channels.SetBoostsToUnblockRestrictions';
2420
+ this.classType = "functions";
2421
+ this.className = "channels.SetBoostsToUnblockRestrictions";
2493
2422
  this.constructorId = 0xad399cee;
2494
2423
  this.subclassOfId = 0x8af52aac;
2495
- this._slots = ['channel', 'boosts'];
2424
+ this._slots = ["channel", "boosts"];
2496
2425
  this.channel = params.channel;
2497
2426
  this.boosts = params.boosts;
2498
2427
  }
2499
2428
  /**
2500
- * Generate the TLObject from buffer.
2501
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2502
- */
2429
+ * Generate the TLObject from buffer.
2430
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2431
+ */
2503
2432
  static async read(_data, ..._args) {
2504
2433
  // no flags
2505
2434
  let channel = await TLObject.read(_data);
2506
2435
  let boosts = await Primitive.Int.read(_data);
2507
- return new SetBoostsToUnblockRestrictions({ channel: channel, boosts: boosts });
2436
+ return new SetBoostsToUnblockRestrictions({ "channel": channel, "boosts": boosts });
2508
2437
  }
2509
2438
  /**
2510
- * Generate buffer from TLObject.
2511
- */
2439
+ * Generate buffer from TLObject.
2440
+ */
2512
2441
  write() {
2513
2442
  const b = new BytesIO();
2514
2443
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2517,7 +2446,7 @@ export class SetBoostsToUnblockRestrictions extends TLObject {
2517
2446
  b.write(this.channel.write());
2518
2447
  }
2519
2448
  if (this.boosts !== undefined) {
2520
- b.write(Primitive.Int.write(this.boosts));
2449
+ b.write((Primitive.Int.write(this.boosts)));
2521
2450
  }
2522
2451
  return b.buffer;
2523
2452
  }
@@ -2528,27 +2457,27 @@ export class SetEmojiStickers extends TLObject {
2528
2457
  stickerset;
2529
2458
  constructor(params) {
2530
2459
  super();
2531
- this.classType = 'functions';
2532
- this.className = 'channels.SetEmojiStickers';
2460
+ this.classType = "functions";
2461
+ this.className = "channels.SetEmojiStickers";
2533
2462
  this.constructorId = 0x3cd930b7;
2534
2463
  this.subclassOfId = 0xf5b399ac;
2535
- this._slots = ['channel', 'stickerset'];
2464
+ this._slots = ["channel", "stickerset"];
2536
2465
  this.channel = params.channel;
2537
2466
  this.stickerset = params.stickerset;
2538
2467
  }
2539
2468
  /**
2540
- * Generate the TLObject from buffer.
2541
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2542
- */
2469
+ * Generate the TLObject from buffer.
2470
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2471
+ */
2543
2472
  static async read(_data, ..._args) {
2544
2473
  // no flags
2545
2474
  let channel = await TLObject.read(_data);
2546
2475
  let stickerset = await TLObject.read(_data);
2547
- return new SetEmojiStickers({ channel: channel, stickerset: stickerset });
2476
+ return new SetEmojiStickers({ "channel": channel, "stickerset": stickerset });
2548
2477
  }
2549
2478
  /**
2550
- * Generate buffer from TLObject.
2551
- */
2479
+ * Generate buffer from TLObject.
2480
+ */
2552
2481
  write() {
2553
2482
  const b = new BytesIO();
2554
2483
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2568,27 +2497,27 @@ export class RestrictSponsoredMessages extends TLObject {
2568
2497
  restricted;
2569
2498
  constructor(params) {
2570
2499
  super();
2571
- this.classType = 'functions';
2572
- this.className = 'channels.RestrictSponsoredMessages';
2500
+ this.classType = "functions";
2501
+ this.className = "channels.RestrictSponsoredMessages";
2573
2502
  this.constructorId = 0x9ae91519;
2574
2503
  this.subclassOfId = 0x8af52aac;
2575
- this._slots = ['channel', 'restricted'];
2504
+ this._slots = ["channel", "restricted"];
2576
2505
  this.channel = params.channel;
2577
2506
  this.restricted = params.restricted;
2578
2507
  }
2579
2508
  /**
2580
- * Generate the TLObject from buffer.
2581
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2582
- */
2509
+ * Generate the TLObject from buffer.
2510
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2511
+ */
2583
2512
  static async read(_data, ..._args) {
2584
2513
  // no flags
2585
2514
  let channel = await TLObject.read(_data);
2586
2515
  let restricted = await Primitive.Bool.read(_data);
2587
- return new RestrictSponsoredMessages({ channel: channel, restricted: restricted });
2516
+ return new RestrictSponsoredMessages({ "channel": channel, "restricted": restricted });
2588
2517
  }
2589
2518
  /**
2590
- * Generate buffer from TLObject.
2591
- */
2519
+ * Generate buffer from TLObject.
2520
+ */
2592
2521
  write() {
2593
2522
  const b = new BytesIO();
2594
2523
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2597,7 +2526,7 @@ export class RestrictSponsoredMessages extends TLObject {
2597
2526
  b.write(this.channel.write());
2598
2527
  }
2599
2528
  if (this.restricted !== undefined) {
2600
- b.write(Primitive.Bool.write(this.restricted));
2529
+ b.write((Primitive.Bool.write(this.restricted)));
2601
2530
  }
2602
2531
  return b.buffer;
2603
2532
  }
@@ -2613,19 +2542,11 @@ export class SearchPosts extends TLObject {
2613
2542
  allowPaidStars;
2614
2543
  constructor(params) {
2615
2544
  super();
2616
- this.classType = 'functions';
2617
- this.className = 'channels.SearchPosts';
2545
+ this.classType = "functions";
2546
+ this.className = "channels.SearchPosts";
2618
2547
  this.constructorId = 0xf2c4f24d;
2619
2548
  this.subclassOfId = 0xd4b40b5e;
2620
- this._slots = [
2621
- 'hashtag',
2622
- 'query',
2623
- 'offsetRate',
2624
- 'offsetPeer',
2625
- 'offsetId',
2626
- 'limit',
2627
- 'allowPaidStars',
2628
- ];
2549
+ this._slots = ["hashtag", "query", "offsetRate", "offsetPeer", "offsetId", "limit", "allowPaidStars"];
2629
2550
  this.hashtag = params.hashtag;
2630
2551
  this.query = params.query;
2631
2552
  this.offsetRate = params.offsetRate;
@@ -2635,61 +2556,53 @@ export class SearchPosts extends TLObject {
2635
2556
  this.allowPaidStars = params.allowPaidStars;
2636
2557
  }
2637
2558
  /**
2638
- * Generate the TLObject from buffer.
2639
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2640
- */
2559
+ * Generate the TLObject from buffer.
2560
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2561
+ */
2641
2562
  static async read(_data, ..._args) {
2642
2563
  // @ts-ignore
2643
2564
  let flags = await Primitive.Int.read(_data);
2644
- let hashtag = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
2645
- let query = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
2565
+ let hashtag = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
2566
+ let query = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
2646
2567
  let offsetRate = await Primitive.Int.read(_data);
2647
2568
  let offsetPeer = await TLObject.read(_data);
2648
2569
  let offsetId = await Primitive.Int.read(_data);
2649
2570
  let limit = await Primitive.Int.read(_data);
2650
- let allowPaidStars = flags & (1 << 2) ? await Primitive.Long.read(_data) : undefined;
2651
- return new SearchPosts({
2652
- hashtag: hashtag,
2653
- query: query,
2654
- offsetRate: offsetRate,
2655
- offsetPeer: offsetPeer,
2656
- offsetId: offsetId,
2657
- limit: limit,
2658
- allowPaidStars: allowPaidStars,
2659
- });
2571
+ let allowPaidStars = (flags & (1 << 2)) ? await Primitive.Long.read(_data) : undefined;
2572
+ return new SearchPosts({ "hashtag": hashtag, "query": query, "offsetRate": offsetRate, "offsetPeer": offsetPeer, "offsetId": offsetId, "limit": limit, "allowPaidStars": allowPaidStars });
2660
2573
  }
2661
2574
  /**
2662
- * Generate buffer from TLObject.
2663
- */
2575
+ * Generate buffer from TLObject.
2576
+ */
2664
2577
  write() {
2665
2578
  const b = new BytesIO();
2666
2579
  b.write(Primitive.Int.write(this.constructorId, false));
2667
2580
  // @ts-ignore
2668
2581
  let flags = 0;
2669
- flags |= this.hashtag !== undefined ? 1 << 0 : 0;
2670
- flags |= this.query !== undefined ? 1 << 1 : 0;
2671
- flags |= this.allowPaidStars !== undefined ? 1 << 2 : 0;
2672
- b.write(Primitive.Int.write(flags));
2582
+ flags |= this.hashtag !== undefined ? (1 << 0) : 0;
2583
+ flags |= this.query !== undefined ? (1 << 1) : 0;
2584
+ flags |= this.allowPaidStars !== undefined ? (1 << 2) : 0;
2585
+ b.write((Primitive.Int.write(flags)));
2673
2586
  if (this.hashtag !== undefined) {
2674
- b.write(Primitive.String.write(this.hashtag));
2587
+ b.write((Primitive.String.write(this.hashtag)));
2675
2588
  }
2676
2589
  if (this.query !== undefined) {
2677
- b.write(Primitive.String.write(this.query));
2590
+ b.write((Primitive.String.write(this.query)));
2678
2591
  }
2679
2592
  if (this.offsetRate !== undefined) {
2680
- b.write(Primitive.Int.write(this.offsetRate));
2593
+ b.write((Primitive.Int.write(this.offsetRate)));
2681
2594
  }
2682
2595
  if (this.offsetPeer !== undefined) {
2683
2596
  b.write(this.offsetPeer.write());
2684
2597
  }
2685
2598
  if (this.offsetId !== undefined) {
2686
- b.write(Primitive.Int.write(this.offsetId));
2599
+ b.write((Primitive.Int.write(this.offsetId)));
2687
2600
  }
2688
2601
  if (this.limit !== undefined) {
2689
- b.write(Primitive.Int.write(this.limit));
2602
+ b.write((Primitive.Int.write(this.limit)));
2690
2603
  }
2691
2604
  if (this.allowPaidStars !== undefined) {
2692
- b.write(Primitive.Long.write(this.allowPaidStars));
2605
+ b.write((Primitive.Long.write(this.allowPaidStars)));
2693
2606
  }
2694
2607
  return b.buffer;
2695
2608
  }
@@ -2701,46 +2614,42 @@ export class UpdatePaidMessagesPrice extends TLObject {
2701
2614
  sendPaidMessagesStars;
2702
2615
  constructor(params) {
2703
2616
  super();
2704
- this.classType = 'functions';
2705
- this.className = 'channels.UpdatePaidMessagesPrice';
2617
+ this.classType = "functions";
2618
+ this.className = "channels.UpdatePaidMessagesPrice";
2706
2619
  this.constructorId = 0x4b12327b;
2707
2620
  this.subclassOfId = 0x8af52aac;
2708
- this._slots = ['broadcastMessagesAllowed', 'channel', 'sendPaidMessagesStars'];
2621
+ this._slots = ["broadcastMessagesAllowed", "channel", "sendPaidMessagesStars"];
2709
2622
  this.broadcastMessagesAllowed = params.broadcastMessagesAllowed;
2710
2623
  this.channel = params.channel;
2711
2624
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
2712
2625
  }
2713
2626
  /**
2714
- * Generate the TLObject from buffer.
2715
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2716
- */
2627
+ * Generate the TLObject from buffer.
2628
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2629
+ */
2717
2630
  static async read(_data, ..._args) {
2718
2631
  // @ts-ignore
2719
2632
  let flags = await Primitive.Int.read(_data);
2720
- let broadcastMessagesAllowed = flags & (1 << 0) ? true : false;
2633
+ let broadcastMessagesAllowed = (flags & (1 << 0)) ? true : false;
2721
2634
  let channel = await TLObject.read(_data);
2722
2635
  let sendPaidMessagesStars = await Primitive.Long.read(_data);
2723
- return new UpdatePaidMessagesPrice({
2724
- broadcastMessagesAllowed: broadcastMessagesAllowed,
2725
- channel: channel,
2726
- sendPaidMessagesStars: sendPaidMessagesStars,
2727
- });
2636
+ return new UpdatePaidMessagesPrice({ "broadcastMessagesAllowed": broadcastMessagesAllowed, "channel": channel, "sendPaidMessagesStars": sendPaidMessagesStars });
2728
2637
  }
2729
2638
  /**
2730
- * Generate buffer from TLObject.
2731
- */
2639
+ * Generate buffer from TLObject.
2640
+ */
2732
2641
  write() {
2733
2642
  const b = new BytesIO();
2734
2643
  b.write(Primitive.Int.write(this.constructorId, false));
2735
2644
  // @ts-ignore
2736
2645
  let flags = 0;
2737
- flags |= this.broadcastMessagesAllowed ? 1 << 0 : 0;
2738
- b.write(Primitive.Int.write(flags));
2646
+ flags |= this.broadcastMessagesAllowed ? (1 << 0) : 0;
2647
+ b.write((Primitive.Int.write(flags)));
2739
2648
  if (this.channel !== undefined) {
2740
2649
  b.write(this.channel.write());
2741
2650
  }
2742
2651
  if (this.sendPaidMessagesStars !== undefined) {
2743
- b.write(Primitive.Long.write(this.sendPaidMessagesStars));
2652
+ b.write((Primitive.Long.write(this.sendPaidMessagesStars)));
2744
2653
  }
2745
2654
  return b.buffer;
2746
2655
  }
@@ -2751,27 +2660,27 @@ export class ToggleAutotranslation extends TLObject {
2751
2660
  enabled;
2752
2661
  constructor(params) {
2753
2662
  super();
2754
- this.classType = 'functions';
2755
- this.className = 'channels.ToggleAutotranslation';
2663
+ this.classType = "functions";
2664
+ this.className = "channels.ToggleAutotranslation";
2756
2665
  this.constructorId = 0x167fc0a1;
2757
2666
  this.subclassOfId = 0x8af52aac;
2758
- this._slots = ['channel', 'enabled'];
2667
+ this._slots = ["channel", "enabled"];
2759
2668
  this.channel = params.channel;
2760
2669
  this.enabled = params.enabled;
2761
2670
  }
2762
2671
  /**
2763
- * Generate the TLObject from buffer.
2764
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2765
- */
2672
+ * Generate the TLObject from buffer.
2673
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2674
+ */
2766
2675
  static async read(_data, ..._args) {
2767
2676
  // no flags
2768
2677
  let channel = await TLObject.read(_data);
2769
2678
  let enabled = await Primitive.Bool.read(_data);
2770
- return new ToggleAutotranslation({ channel: channel, enabled: enabled });
2679
+ return new ToggleAutotranslation({ "channel": channel, "enabled": enabled });
2771
2680
  }
2772
2681
  /**
2773
- * Generate buffer from TLObject.
2774
- */
2682
+ * Generate buffer from TLObject.
2683
+ */
2775
2684
  write() {
2776
2685
  const b = new BytesIO();
2777
2686
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2780,7 +2689,7 @@ export class ToggleAutotranslation extends TLObject {
2780
2689
  b.write(this.channel.write());
2781
2690
  }
2782
2691
  if (this.enabled !== undefined) {
2783
- b.write(Primitive.Bool.write(this.enabled));
2692
+ b.write((Primitive.Bool.write(this.enabled)));
2784
2693
  }
2785
2694
  return b.buffer;
2786
2695
  }
@@ -2791,27 +2700,27 @@ export class GetMessageAuthor extends TLObject {
2791
2700
  id;
2792
2701
  constructor(params) {
2793
2702
  super();
2794
- this.classType = 'functions';
2795
- this.className = 'channels.GetMessageAuthor';
2703
+ this.classType = "functions";
2704
+ this.className = "channels.GetMessageAuthor";
2796
2705
  this.constructorId = 0xece2a0e6;
2797
2706
  this.subclassOfId = 0x2da17977;
2798
- this._slots = ['channel', 'id'];
2707
+ this._slots = ["channel", "id"];
2799
2708
  this.channel = params.channel;
2800
2709
  this.id = params.id;
2801
2710
  }
2802
2711
  /**
2803
- * Generate the TLObject from buffer.
2804
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2805
- */
2712
+ * Generate the TLObject from buffer.
2713
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2714
+ */
2806
2715
  static async read(_data, ..._args) {
2807
2716
  // no flags
2808
2717
  let channel = await TLObject.read(_data);
2809
2718
  let id = await Primitive.Int.read(_data);
2810
- return new GetMessageAuthor({ channel: channel, id: id });
2719
+ return new GetMessageAuthor({ "channel": channel, "id": id });
2811
2720
  }
2812
2721
  /**
2813
- * Generate buffer from TLObject.
2814
- */
2722
+ * Generate buffer from TLObject.
2723
+ */
2815
2724
  write() {
2816
2725
  const b = new BytesIO();
2817
2726
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2820,7 +2729,7 @@ export class GetMessageAuthor extends TLObject {
2820
2729
  b.write(this.channel.write());
2821
2730
  }
2822
2731
  if (this.id !== undefined) {
2823
- b.write(Primitive.Int.write(this.id));
2732
+ b.write((Primitive.Int.write(this.id)));
2824
2733
  }
2825
2734
  return b.buffer;
2826
2735
  }
@@ -2830,35 +2739,35 @@ export class CheckSearchPostsFlood extends TLObject {
2830
2739
  query;
2831
2740
  constructor(params) {
2832
2741
  super();
2833
- this.classType = 'functions';
2834
- this.className = 'channels.CheckSearchPostsFlood';
2742
+ this.classType = "functions";
2743
+ this.className = "channels.CheckSearchPostsFlood";
2835
2744
  this.constructorId = 0x22567115;
2836
2745
  this.subclassOfId = 0xc2c0ccc1;
2837
- this._slots = ['query'];
2746
+ this._slots = ["query"];
2838
2747
  this.query = params.query;
2839
2748
  }
2840
2749
  /**
2841
- * Generate the TLObject from buffer.
2842
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2843
- */
2750
+ * Generate the TLObject from buffer.
2751
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2752
+ */
2844
2753
  static async read(_data, ..._args) {
2845
2754
  // @ts-ignore
2846
2755
  let flags = await Primitive.Int.read(_data);
2847
- let query = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
2848
- return new CheckSearchPostsFlood({ query: query });
2756
+ let query = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
2757
+ return new CheckSearchPostsFlood({ "query": query });
2849
2758
  }
2850
2759
  /**
2851
- * Generate buffer from TLObject.
2852
- */
2760
+ * Generate buffer from TLObject.
2761
+ */
2853
2762
  write() {
2854
2763
  const b = new BytesIO();
2855
2764
  b.write(Primitive.Int.write(this.constructorId, false));
2856
2765
  // @ts-ignore
2857
2766
  let flags = 0;
2858
- flags |= this.query !== undefined ? 1 << 0 : 0;
2859
- b.write(Primitive.Int.write(flags));
2767
+ flags |= this.query !== undefined ? (1 << 0) : 0;
2768
+ b.write((Primitive.Int.write(flags)));
2860
2769
  if (this.query !== undefined) {
2861
- b.write(Primitive.String.write(this.query));
2770
+ b.write((Primitive.String.write(this.query)));
2862
2771
  }
2863
2772
  return b.buffer;
2864
2773
  }
@@ -2869,27 +2778,27 @@ export class SetMainProfileTab extends TLObject {
2869
2778
  tab;
2870
2779
  constructor(params) {
2871
2780
  super();
2872
- this.classType = 'functions';
2873
- this.className = 'channels.SetMainProfileTab';
2781
+ this.classType = "functions";
2782
+ this.className = "channels.SetMainProfileTab";
2874
2783
  this.constructorId = 0x3583fcb1;
2875
2784
  this.subclassOfId = 0xf5b399ac;
2876
- this._slots = ['channel', 'tab'];
2785
+ this._slots = ["channel", "tab"];
2877
2786
  this.channel = params.channel;
2878
2787
  this.tab = params.tab;
2879
2788
  }
2880
2789
  /**
2881
- * Generate the TLObject from buffer.
2882
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2883
- */
2790
+ * Generate the TLObject from buffer.
2791
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2792
+ */
2884
2793
  static async read(_data, ..._args) {
2885
2794
  // no flags
2886
2795
  let channel = await TLObject.read(_data);
2887
2796
  let tab = await TLObject.read(_data);
2888
- return new SetMainProfileTab({ channel: channel, tab: tab });
2797
+ return new SetMainProfileTab({ "channel": channel, "tab": tab });
2889
2798
  }
2890
2799
  /**
2891
- * Generate buffer from TLObject.
2892
- */
2800
+ * Generate buffer from TLObject.
2801
+ */
2893
2802
  write() {
2894
2803
  const b = new BytesIO();
2895
2804
  b.write(Primitive.Int.write(this.constructorId, false));