@tgsnake/skema 3.2.1-browser.0 → 3.2.1

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 (67) 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 +2783 -2783
  5. package/dist/src/raw/class/Raw.d.ts +7601 -7601
  6. package/dist/src/raw/class/Raw.js +20676 -26781
  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 +256 -256
  14. package/dist/src/raw/class/tl/bots.js +607 -661
  15. package/dist/src/raw/class/tl/channels.d.ts +336 -336
  16. package/dist/src/raw/class/tl/channels.js +745 -836
  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/feed.d.ts +71 -71
  26. package/dist/src/raw/class/tl/feed.js +179 -214
  27. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  28. package/dist/src/raw/class/tl/folders.js +11 -11
  29. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  30. package/dist/src/raw/class/tl/fragment.js +25 -32
  31. package/dist/src/raw/class/tl/help.d.ts +286 -286
  32. package/dist/src/raw/class/tl/help.js +618 -686
  33. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  34. package/dist/src/raw/class/tl/langpack.js +57 -57
  35. package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
  36. package/dist/src/raw/class/tl/messages.js +4886 -5965
  37. package/dist/src/raw/class/tl/payments.d.ts +646 -646
  38. package/dist/src/raw/class/tl/payments.js +1766 -2254
  39. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  40. package/dist/src/raw/class/tl/phone.js +644 -779
  41. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  42. package/dist/src/raw/class/tl/photos.js +116 -139
  43. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  44. package/dist/src/raw/class/tl/premium.js +111 -133
  45. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  46. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  47. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  48. package/dist/src/raw/class/tl/stats.js +169 -268
  49. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  50. package/dist/src/raw/class/tl/stickers.js +144 -173
  51. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  52. package/dist/src/raw/class/tl/storage.js +71 -71
  53. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  54. package/dist/src/raw/class/tl/stories.js +622 -781
  55. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  56. package/dist/src/raw/class/tl/toncenter.js +47 -52
  57. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  58. package/dist/src/raw/class/tl/updates.js +175 -246
  59. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  60. package/dist/src/raw/class/tl/upload.js +155 -178
  61. package/dist/src/raw/class/tl/users.d.ts +61 -61
  62. package/dist/src/raw/class/tl/users.js +124 -124
  63. package/dist/src/raw/class/tl/wallet.d.ts +221 -221
  64. package/dist/src/raw/class/tl/wallet.js +558 -624
  65. package/dist/src/raw/class/types.d.ts +1 -1
  66. package/dist/src/raw/class/types.js +1 -1
  67. 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
  }
@@ -986,35 +950,35 @@ export class JoinChannel extends TLObject {
986
950
  channel;
987
951
  constructor(params) {
988
952
  super();
989
- this.classType = 'functions';
990
- this.className = 'channels.JoinChannel';
953
+ this.classType = "functions";
954
+ this.className = "channels.JoinChannel";
991
955
  this.constructorId = 0x416cb50c;
992
956
  this.subclassOfId = 0x5d0ff992;
993
- this._slots = ['forNews', 'channel'];
957
+ this._slots = ["forNews", "channel"];
994
958
  this.forNews = params.forNews;
995
959
  this.channel = params.channel;
996
960
  }
997
961
  /**
998
- * Generate the TLObject from buffer.
999
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1000
- */
962
+ * Generate the TLObject from buffer.
963
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
964
+ */
1001
965
  static async read(_data, ..._args) {
1002
966
  // @ts-ignore
1003
967
  let flags = await Primitive.Int.read(_data);
1004
- let forNews = flags & (1 << 0) ? true : false;
968
+ let forNews = (flags & (1 << 0)) ? true : false;
1005
969
  let channel = await TLObject.read(_data);
1006
- return new JoinChannel({ forNews: forNews, channel: channel });
970
+ return new JoinChannel({ "forNews": forNews, "channel": channel });
1007
971
  }
1008
972
  /**
1009
- * Generate buffer from TLObject.
1010
- */
973
+ * Generate buffer from TLObject.
974
+ */
1011
975
  write() {
1012
976
  const b = new BytesIO();
1013
977
  b.write(Primitive.Int.write(this.constructorId, false));
1014
978
  // @ts-ignore
1015
979
  let flags = 0;
1016
- flags |= this.forNews ? 1 << 0 : 0;
1017
- b.write(Primitive.Int.write(flags));
980
+ flags |= this.forNews ? (1 << 0) : 0;
981
+ b.write((Primitive.Int.write(flags)));
1018
982
  if (this.channel !== undefined) {
1019
983
  b.write(this.channel.write());
1020
984
  }
@@ -1026,25 +990,25 @@ export class LeaveChannel extends TLObject {
1026
990
  channel;
1027
991
  constructor(params) {
1028
992
  super();
1029
- this.classType = 'functions';
1030
- this.className = 'channels.LeaveChannel';
993
+ this.classType = "functions";
994
+ this.className = "channels.LeaveChannel";
1031
995
  this.constructorId = 0xf836aa95;
1032
996
  this.subclassOfId = 0x8af52aac;
1033
- this._slots = ['channel'];
997
+ this._slots = ["channel"];
1034
998
  this.channel = params.channel;
1035
999
  }
1036
1000
  /**
1037
- * Generate the TLObject from buffer.
1038
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1039
- */
1001
+ * Generate the TLObject from buffer.
1002
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1003
+ */
1040
1004
  static async read(_data, ..._args) {
1041
1005
  // no flags
1042
1006
  let channel = await TLObject.read(_data);
1043
- return new LeaveChannel({ channel: channel });
1007
+ return new LeaveChannel({ "channel": channel });
1044
1008
  }
1045
1009
  /**
1046
- * Generate buffer from TLObject.
1047
- */
1010
+ * Generate buffer from TLObject.
1011
+ */
1048
1012
  write() {
1049
1013
  const b = new BytesIO();
1050
1014
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1061,27 +1025,27 @@ export class InviteToChannel extends TLObject {
1061
1025
  users;
1062
1026
  constructor(params) {
1063
1027
  super();
1064
- this.classType = 'functions';
1065
- this.className = 'channels.InviteToChannel';
1028
+ this.classType = "functions";
1029
+ this.className = "channels.InviteToChannel";
1066
1030
  this.constructorId = 0xc9e33d54;
1067
1031
  this.subclassOfId = 0x3dbe90a1;
1068
- this._slots = ['channel', 'users'];
1032
+ this._slots = ["channel", "users"];
1069
1033
  this.channel = params.channel;
1070
1034
  this.users = params.users;
1071
1035
  }
1072
1036
  /**
1073
- * Generate the TLObject from buffer.
1074
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1075
- */
1037
+ * Generate the TLObject from buffer.
1038
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1039
+ */
1076
1040
  static async read(_data, ..._args) {
1077
1041
  // no flags
1078
1042
  let channel = await TLObject.read(_data);
1079
1043
  let users = await TLObject.read(_data);
1080
- return new InviteToChannel({ channel: channel, users: users });
1044
+ return new InviteToChannel({ "channel": channel, "users": users });
1081
1045
  }
1082
1046
  /**
1083
- * Generate buffer from TLObject.
1084
- */
1047
+ * Generate buffer from TLObject.
1048
+ */
1085
1049
  write() {
1086
1050
  const b = new BytesIO();
1087
1051
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1090,7 +1054,7 @@ export class InviteToChannel extends TLObject {
1090
1054
  b.write(this.channel.write());
1091
1055
  }
1092
1056
  if (this.users) {
1093
- b.write(Primitive.Vector.write(this.users));
1057
+ b.write((Primitive.Vector.write(this.users)));
1094
1058
  }
1095
1059
  return b.buffer;
1096
1060
  }
@@ -1100,25 +1064,25 @@ export class DeleteChannel extends TLObject {
1100
1064
  channel;
1101
1065
  constructor(params) {
1102
1066
  super();
1103
- this.classType = 'functions';
1104
- this.className = 'channels.DeleteChannel';
1067
+ this.classType = "functions";
1068
+ this.className = "channels.DeleteChannel";
1105
1069
  this.constructorId = 0xc0111fe3;
1106
1070
  this.subclassOfId = 0x8af52aac;
1107
- this._slots = ['channel'];
1071
+ this._slots = ["channel"];
1108
1072
  this.channel = params.channel;
1109
1073
  }
1110
1074
  /**
1111
- * Generate the TLObject from buffer.
1112
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1113
- */
1075
+ * Generate the TLObject from buffer.
1076
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1077
+ */
1114
1078
  static async read(_data, ..._args) {
1115
1079
  // no flags
1116
1080
  let channel = await TLObject.read(_data);
1117
- return new DeleteChannel({ channel: channel });
1081
+ return new DeleteChannel({ "channel": channel });
1118
1082
  }
1119
1083
  /**
1120
- * Generate buffer from TLObject.
1121
- */
1084
+ * Generate buffer from TLObject.
1085
+ */
1122
1086
  write() {
1123
1087
  const b = new BytesIO();
1124
1088
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1137,45 +1101,45 @@ export class ExportMessageLink extends TLObject {
1137
1101
  id;
1138
1102
  constructor(params) {
1139
1103
  super();
1140
- this.classType = 'functions';
1141
- this.className = 'channels.ExportMessageLink';
1104
+ this.classType = "functions";
1105
+ this.className = "channels.ExportMessageLink";
1142
1106
  this.constructorId = 0xe63fadeb;
1143
1107
  this.subclassOfId = 0xdee644cc;
1144
- this._slots = ['grouped', 'thread', 'channel', 'id'];
1108
+ this._slots = ["grouped", "thread", "channel", "id"];
1145
1109
  this.grouped = params.grouped;
1146
1110
  this.thread = params.thread;
1147
1111
  this.channel = params.channel;
1148
1112
  this.id = params.id;
1149
1113
  }
1150
1114
  /**
1151
- * Generate the TLObject from buffer.
1152
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1153
- */
1115
+ * Generate the TLObject from buffer.
1116
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1117
+ */
1154
1118
  static async read(_data, ..._args) {
1155
1119
  // @ts-ignore
1156
1120
  let flags = await Primitive.Int.read(_data);
1157
- let grouped = flags & (1 << 0) ? true : false;
1158
- let thread = flags & (1 << 1) ? true : false;
1121
+ let grouped = (flags & (1 << 0)) ? true : false;
1122
+ let thread = (flags & (1 << 1)) ? true : false;
1159
1123
  let channel = await TLObject.read(_data);
1160
1124
  let id = await Primitive.Int.read(_data);
1161
- return new ExportMessageLink({ grouped: grouped, thread: thread, channel: channel, id: id });
1125
+ return new ExportMessageLink({ "grouped": grouped, "thread": thread, "channel": channel, "id": id });
1162
1126
  }
1163
1127
  /**
1164
- * Generate buffer from TLObject.
1165
- */
1128
+ * Generate buffer from TLObject.
1129
+ */
1166
1130
  write() {
1167
1131
  const b = new BytesIO();
1168
1132
  b.write(Primitive.Int.write(this.constructorId, false));
1169
1133
  // @ts-ignore
1170
1134
  let flags = 0;
1171
- flags |= this.grouped ? 1 << 0 : 0;
1172
- flags |= this.thread ? 1 << 1 : 0;
1173
- b.write(Primitive.Int.write(flags));
1135
+ flags |= this.grouped ? (1 << 0) : 0;
1136
+ flags |= this.thread ? (1 << 1) : 0;
1137
+ b.write((Primitive.Int.write(flags)));
1174
1138
  if (this.channel !== undefined) {
1175
1139
  b.write(this.channel.write());
1176
1140
  }
1177
1141
  if (this.id !== undefined) {
1178
- b.write(Primitive.Int.write(this.id));
1142
+ b.write((Primitive.Int.write(this.id)));
1179
1143
  }
1180
1144
  return b.buffer;
1181
1145
  }
@@ -1187,42 +1151,38 @@ export class ToggleSignatures extends TLObject {
1187
1151
  channel;
1188
1152
  constructor(params) {
1189
1153
  super();
1190
- this.classType = 'functions';
1191
- this.className = 'channels.ToggleSignatures';
1154
+ this.classType = "functions";
1155
+ this.className = "channels.ToggleSignatures";
1192
1156
  this.constructorId = 0x418d549c;
1193
1157
  this.subclassOfId = 0x8af52aac;
1194
- this._slots = ['signaturesEnabled', 'profilesEnabled', 'channel'];
1158
+ this._slots = ["signaturesEnabled", "profilesEnabled", "channel"];
1195
1159
  this.signaturesEnabled = params.signaturesEnabled;
1196
1160
  this.profilesEnabled = params.profilesEnabled;
1197
1161
  this.channel = params.channel;
1198
1162
  }
1199
1163
  /**
1200
- * Generate the TLObject from buffer.
1201
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1202
- */
1164
+ * Generate the TLObject from buffer.
1165
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1166
+ */
1203
1167
  static async read(_data, ..._args) {
1204
1168
  // @ts-ignore
1205
1169
  let flags = await Primitive.Int.read(_data);
1206
- let signaturesEnabled = flags & (1 << 0) ? true : false;
1207
- let profilesEnabled = flags & (1 << 1) ? true : false;
1170
+ let signaturesEnabled = (flags & (1 << 0)) ? true : false;
1171
+ let profilesEnabled = (flags & (1 << 1)) ? true : false;
1208
1172
  let channel = await TLObject.read(_data);
1209
- return new ToggleSignatures({
1210
- signaturesEnabled: signaturesEnabled,
1211
- profilesEnabled: profilesEnabled,
1212
- channel: channel,
1213
- });
1173
+ return new ToggleSignatures({ "signaturesEnabled": signaturesEnabled, "profilesEnabled": profilesEnabled, "channel": channel });
1214
1174
  }
1215
1175
  /**
1216
- * Generate buffer from TLObject.
1217
- */
1176
+ * Generate buffer from TLObject.
1177
+ */
1218
1178
  write() {
1219
1179
  const b = new BytesIO();
1220
1180
  b.write(Primitive.Int.write(this.constructorId, false));
1221
1181
  // @ts-ignore
1222
1182
  let flags = 0;
1223
- flags |= this.signaturesEnabled ? 1 << 0 : 0;
1224
- flags |= this.profilesEnabled ? 1 << 1 : 0;
1225
- b.write(Primitive.Int.write(flags));
1183
+ flags |= this.signaturesEnabled ? (1 << 0) : 0;
1184
+ flags |= this.profilesEnabled ? (1 << 1) : 0;
1185
+ b.write((Primitive.Int.write(flags)));
1226
1186
  if (this.channel !== undefined) {
1227
1187
  b.write(this.channel.write());
1228
1188
  }
@@ -1237,47 +1197,42 @@ export class GetAdminedPublicChannels extends TLObject {
1237
1197
  forCommunityPeer;
1238
1198
  constructor(params) {
1239
1199
  super();
1240
- this.classType = 'functions';
1241
- this.className = 'channels.GetAdminedPublicChannels';
1200
+ this.classType = "functions";
1201
+ this.className = "channels.GetAdminedPublicChannels";
1242
1202
  this.constructorId = 0xf8b036af;
1243
1203
  this.subclassOfId = 0x99d5cb14;
1244
- this._slots = ['byLocation', 'checkLimit', 'forPersonal', 'forCommunityPeer'];
1204
+ this._slots = ["byLocation", "checkLimit", "forPersonal", "forCommunityPeer"];
1245
1205
  this.byLocation = params.byLocation;
1246
1206
  this.checkLimit = params.checkLimit;
1247
1207
  this.forPersonal = params.forPersonal;
1248
1208
  this.forCommunityPeer = params.forCommunityPeer;
1249
1209
  }
1250
1210
  /**
1251
- * Generate the TLObject from buffer.
1252
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1253
- */
1211
+ * Generate the TLObject from buffer.
1212
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1213
+ */
1254
1214
  static async read(_data, ..._args) {
1255
1215
  // @ts-ignore
1256
1216
  let flags = await Primitive.Int.read(_data);
1257
- let byLocation = flags & (1 << 0) ? true : false;
1258
- let checkLimit = flags & (1 << 1) ? true : false;
1259
- let forPersonal = flags & (1 << 2) ? true : false;
1260
- let forCommunityPeer = flags & (1 << 3) ? true : false;
1261
- return new GetAdminedPublicChannels({
1262
- byLocation: byLocation,
1263
- checkLimit: checkLimit,
1264
- forPersonal: forPersonal,
1265
- forCommunityPeer: forCommunityPeer,
1266
- });
1217
+ let byLocation = (flags & (1 << 0)) ? true : false;
1218
+ let checkLimit = (flags & (1 << 1)) ? true : false;
1219
+ let forPersonal = (flags & (1 << 2)) ? true : false;
1220
+ let forCommunityPeer = (flags & (1 << 3)) ? true : false;
1221
+ return new GetAdminedPublicChannels({ "byLocation": byLocation, "checkLimit": checkLimit, "forPersonal": forPersonal, "forCommunityPeer": forCommunityPeer });
1267
1222
  }
1268
1223
  /**
1269
- * Generate buffer from TLObject.
1270
- */
1224
+ * Generate buffer from TLObject.
1225
+ */
1271
1226
  write() {
1272
1227
  const b = new BytesIO();
1273
1228
  b.write(Primitive.Int.write(this.constructorId, false));
1274
1229
  // @ts-ignore
1275
1230
  let flags = 0;
1276
- flags |= this.byLocation ? 1 << 0 : 0;
1277
- flags |= this.checkLimit ? 1 << 1 : 0;
1278
- flags |= this.forPersonal ? 1 << 2 : 0;
1279
- flags |= this.forCommunityPeer ? 1 << 3 : 0;
1280
- b.write(Primitive.Int.write(flags));
1231
+ flags |= this.byLocation ? (1 << 0) : 0;
1232
+ flags |= this.checkLimit ? (1 << 1) : 0;
1233
+ flags |= this.forPersonal ? (1 << 2) : 0;
1234
+ flags |= this.forCommunityPeer ? (1 << 3) : 0;
1235
+ b.write((Primitive.Int.write(flags)));
1281
1236
  return b.buffer;
1282
1237
  }
1283
1238
  }
@@ -1288,33 +1243,29 @@ export class EditBanned extends TLObject {
1288
1243
  bannedRights;
1289
1244
  constructor(params) {
1290
1245
  super();
1291
- this.classType = 'functions';
1292
- this.className = 'channels.EditBanned';
1246
+ this.classType = "functions";
1247
+ this.className = "channels.EditBanned";
1293
1248
  this.constructorId = 0x96e6cd81;
1294
1249
  this.subclassOfId = 0x8af52aac;
1295
- this._slots = ['channel', 'participant', 'bannedRights'];
1250
+ this._slots = ["channel", "participant", "bannedRights"];
1296
1251
  this.channel = params.channel;
1297
1252
  this.participant = params.participant;
1298
1253
  this.bannedRights = params.bannedRights;
1299
1254
  }
1300
1255
  /**
1301
- * Generate the TLObject from buffer.
1302
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1303
- */
1256
+ * Generate the TLObject from buffer.
1257
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1258
+ */
1304
1259
  static async read(_data, ..._args) {
1305
1260
  // no flags
1306
1261
  let channel = await TLObject.read(_data);
1307
1262
  let participant = await TLObject.read(_data);
1308
1263
  let bannedRights = await TLObject.read(_data);
1309
- return new EditBanned({
1310
- channel: channel,
1311
- participant: participant,
1312
- bannedRights: bannedRights,
1313
- });
1264
+ return new EditBanned({ "channel": channel, "participant": participant, "bannedRights": bannedRights });
1314
1265
  }
1315
1266
  /**
1316
- * Generate buffer from TLObject.
1317
- */
1267
+ * Generate buffer from TLObject.
1268
+ */
1318
1269
  write() {
1319
1270
  const b = new BytesIO();
1320
1271
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1342,11 +1293,11 @@ export class GetAdminLog extends TLObject {
1342
1293
  limit;
1343
1294
  constructor(params) {
1344
1295
  super();
1345
- this.classType = 'functions';
1346
- this.className = 'channels.GetAdminLog';
1296
+ this.classType = "functions";
1297
+ this.className = "channels.GetAdminLog";
1347
1298
  this.constructorId = 0x33ddf480;
1348
1299
  this.subclassOfId = 0x51f076bc;
1349
- this._slots = ['channel', 'q', 'eventsFilter', 'admins', 'maxId', 'minId', 'limit'];
1300
+ this._slots = ["channel", "q", "eventsFilter", "admins", "maxId", "minId", "limit"];
1350
1301
  this.channel = params.channel;
1351
1302
  this.q = params.q;
1352
1303
  this.eventsFilter = params.eventsFilter;
@@ -1356,60 +1307,52 @@ export class GetAdminLog extends TLObject {
1356
1307
  this.limit = params.limit;
1357
1308
  }
1358
1309
  /**
1359
- * Generate the TLObject from buffer.
1360
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1361
- */
1310
+ * Generate the TLObject from buffer.
1311
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1312
+ */
1362
1313
  static async read(_data, ..._args) {
1363
1314
  // @ts-ignore
1364
1315
  let flags = await Primitive.Int.read(_data);
1365
1316
  let channel = await TLObject.read(_data);
1366
1317
  let q = await Primitive.String.read(_data);
1367
- let eventsFilter = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
1368
- let admins = flags & (1 << 1) ? await TLObject.read(_data) : [];
1318
+ let eventsFilter = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
1319
+ let admins = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
1369
1320
  let maxId = await Primitive.Long.read(_data);
1370
1321
  let minId = await Primitive.Long.read(_data);
1371
1322
  let limit = await Primitive.Int.read(_data);
1372
- return new GetAdminLog({
1373
- channel: channel,
1374
- q: q,
1375
- eventsFilter: eventsFilter,
1376
- admins: admins,
1377
- maxId: maxId,
1378
- minId: minId,
1379
- limit: limit,
1380
- });
1323
+ return new GetAdminLog({ "channel": channel, "q": q, "eventsFilter": eventsFilter, "admins": admins, "maxId": maxId, "minId": minId, "limit": limit });
1381
1324
  }
1382
1325
  /**
1383
- * Generate buffer from TLObject.
1384
- */
1326
+ * Generate buffer from TLObject.
1327
+ */
1385
1328
  write() {
1386
1329
  const b = new BytesIO();
1387
1330
  b.write(Primitive.Int.write(this.constructorId, false));
1388
1331
  // @ts-ignore
1389
1332
  let flags = 0;
1390
- flags |= this.eventsFilter !== undefined ? 1 << 0 : 0;
1391
- flags |= this.admins ? 1 << 1 : 0;
1392
- b.write(Primitive.Int.write(flags));
1333
+ flags |= this.eventsFilter !== undefined ? (1 << 0) : 0;
1334
+ flags |= this.admins ? (1 << 1) : 0;
1335
+ b.write((Primitive.Int.write(flags)));
1393
1336
  if (this.channel !== undefined) {
1394
1337
  b.write(this.channel.write());
1395
1338
  }
1396
1339
  if (this.q !== undefined) {
1397
- b.write(Primitive.String.write(this.q));
1340
+ b.write((Primitive.String.write(this.q)));
1398
1341
  }
1399
1342
  if (this.eventsFilter !== undefined) {
1400
1343
  b.write(this.eventsFilter.write());
1401
1344
  }
1402
1345
  if (this.admins) {
1403
- b.write(Primitive.Vector.write(this.admins));
1346
+ b.write((Primitive.Vector.write(this.admins)));
1404
1347
  }
1405
1348
  if (this.maxId !== undefined) {
1406
- b.write(Primitive.Long.write(this.maxId));
1349
+ b.write((Primitive.Long.write(this.maxId)));
1407
1350
  }
1408
1351
  if (this.minId !== undefined) {
1409
- b.write(Primitive.Long.write(this.minId));
1352
+ b.write((Primitive.Long.write(this.minId)));
1410
1353
  }
1411
1354
  if (this.limit !== undefined) {
1412
- b.write(Primitive.Int.write(this.limit));
1355
+ b.write((Primitive.Int.write(this.limit)));
1413
1356
  }
1414
1357
  return b.buffer;
1415
1358
  }
@@ -1420,27 +1363,27 @@ export class SetStickers extends TLObject {
1420
1363
  stickerset;
1421
1364
  constructor(params) {
1422
1365
  super();
1423
- this.classType = 'functions';
1424
- this.className = 'channels.SetStickers';
1366
+ this.classType = "functions";
1367
+ this.className = "channels.SetStickers";
1425
1368
  this.constructorId = 0xea8ca4f9;
1426
1369
  this.subclassOfId = 0xf5b399ac;
1427
- this._slots = ['channel', 'stickerset'];
1370
+ this._slots = ["channel", "stickerset"];
1428
1371
  this.channel = params.channel;
1429
1372
  this.stickerset = params.stickerset;
1430
1373
  }
1431
1374
  /**
1432
- * Generate the TLObject from buffer.
1433
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1434
- */
1375
+ * Generate the TLObject from buffer.
1376
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1377
+ */
1435
1378
  static async read(_data, ..._args) {
1436
1379
  // no flags
1437
1380
  let channel = await TLObject.read(_data);
1438
1381
  let stickerset = await TLObject.read(_data);
1439
- return new SetStickers({ channel: channel, stickerset: stickerset });
1382
+ return new SetStickers({ "channel": channel, "stickerset": stickerset });
1440
1383
  }
1441
1384
  /**
1442
- * Generate buffer from TLObject.
1443
- */
1385
+ * Generate buffer from TLObject.
1386
+ */
1444
1387
  write() {
1445
1388
  const b = new BytesIO();
1446
1389
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1460,27 +1403,27 @@ export class ReadMessageContents extends TLObject {
1460
1403
  id;
1461
1404
  constructor(params) {
1462
1405
  super();
1463
- this.classType = 'functions';
1464
- this.className = 'channels.ReadMessageContents';
1406
+ this.classType = "functions";
1407
+ this.className = "channels.ReadMessageContents";
1465
1408
  this.constructorId = 0xeab5dc38;
1466
1409
  this.subclassOfId = 0xf5b399ac;
1467
- this._slots = ['channel', 'id'];
1410
+ this._slots = ["channel", "id"];
1468
1411
  this.channel = params.channel;
1469
1412
  this.id = params.id;
1470
1413
  }
1471
1414
  /**
1472
- * Generate the TLObject from buffer.
1473
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1474
- */
1415
+ * Generate the TLObject from buffer.
1416
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1417
+ */
1475
1418
  static async read(_data, ..._args) {
1476
1419
  // no flags
1477
1420
  let channel = await TLObject.read(_data);
1478
1421
  let id = await TLObject.read(_data, Primitive.Int);
1479
- return new ReadMessageContents({ channel: channel, id: id });
1422
+ return new ReadMessageContents({ "channel": channel, "id": id });
1480
1423
  }
1481
1424
  /**
1482
- * Generate buffer from TLObject.
1483
- */
1425
+ * Generate buffer from TLObject.
1426
+ */
1484
1427
  write() {
1485
1428
  const b = new BytesIO();
1486
1429
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1489,7 +1432,7 @@ export class ReadMessageContents extends TLObject {
1489
1432
  b.write(this.channel.write());
1490
1433
  }
1491
1434
  if (this.id) {
1492
- b.write(Primitive.Vector.write(this.id, Primitive.Int));
1435
+ b.write((Primitive.Vector.write(this.id, Primitive.Int)));
1493
1436
  }
1494
1437
  return b.buffer;
1495
1438
  }
@@ -1501,42 +1444,42 @@ export class DeleteHistory extends TLObject {
1501
1444
  maxId;
1502
1445
  constructor(params) {
1503
1446
  super();
1504
- this.classType = 'functions';
1505
- this.className = 'channels.DeleteHistory';
1447
+ this.classType = "functions";
1448
+ this.className = "channels.DeleteHistory";
1506
1449
  this.constructorId = 0x9baa9647;
1507
1450
  this.subclassOfId = 0x8af52aac;
1508
- this._slots = ['forEveryone', 'channel', 'maxId'];
1451
+ this._slots = ["forEveryone", "channel", "maxId"];
1509
1452
  this.forEveryone = params.forEveryone;
1510
1453
  this.channel = params.channel;
1511
1454
  this.maxId = params.maxId;
1512
1455
  }
1513
1456
  /**
1514
- * Generate the TLObject from buffer.
1515
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1516
- */
1457
+ * Generate the TLObject from buffer.
1458
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1459
+ */
1517
1460
  static async read(_data, ..._args) {
1518
1461
  // @ts-ignore
1519
1462
  let flags = await Primitive.Int.read(_data);
1520
- let forEveryone = flags & (1 << 0) ? true : false;
1463
+ let forEveryone = (flags & (1 << 0)) ? true : false;
1521
1464
  let channel = await TLObject.read(_data);
1522
1465
  let maxId = await Primitive.Int.read(_data);
1523
- return new DeleteHistory({ forEveryone: forEveryone, channel: channel, maxId: maxId });
1466
+ return new DeleteHistory({ "forEveryone": forEveryone, "channel": channel, "maxId": maxId });
1524
1467
  }
1525
1468
  /**
1526
- * Generate buffer from TLObject.
1527
- */
1469
+ * Generate buffer from TLObject.
1470
+ */
1528
1471
  write() {
1529
1472
  const b = new BytesIO();
1530
1473
  b.write(Primitive.Int.write(this.constructorId, false));
1531
1474
  // @ts-ignore
1532
1475
  let flags = 0;
1533
- flags |= this.forEveryone ? 1 << 0 : 0;
1534
- b.write(Primitive.Int.write(flags));
1476
+ flags |= this.forEveryone ? (1 << 0) : 0;
1477
+ b.write((Primitive.Int.write(flags)));
1535
1478
  if (this.channel !== undefined) {
1536
1479
  b.write(this.channel.write());
1537
1480
  }
1538
1481
  if (this.maxId !== undefined) {
1539
- b.write(Primitive.Int.write(this.maxId));
1482
+ b.write((Primitive.Int.write(this.maxId)));
1540
1483
  }
1541
1484
  return b.buffer;
1542
1485
  }
@@ -1547,27 +1490,27 @@ export class TogglePreHistoryHidden extends TLObject {
1547
1490
  enabled;
1548
1491
  constructor(params) {
1549
1492
  super();
1550
- this.classType = 'functions';
1551
- this.className = 'channels.TogglePreHistoryHidden';
1493
+ this.classType = "functions";
1494
+ this.className = "channels.TogglePreHistoryHidden";
1552
1495
  this.constructorId = 0xeabbb94c;
1553
1496
  this.subclassOfId = 0x8af52aac;
1554
- this._slots = ['channel', 'enabled'];
1497
+ this._slots = ["channel", "enabled"];
1555
1498
  this.channel = params.channel;
1556
1499
  this.enabled = params.enabled;
1557
1500
  }
1558
1501
  /**
1559
- * Generate the TLObject from buffer.
1560
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1561
- */
1502
+ * Generate the TLObject from buffer.
1503
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1504
+ */
1562
1505
  static async read(_data, ..._args) {
1563
1506
  // no flags
1564
1507
  let channel = await TLObject.read(_data);
1565
1508
  let enabled = await Primitive.Bool.read(_data);
1566
- return new TogglePreHistoryHidden({ channel: channel, enabled: enabled });
1509
+ return new TogglePreHistoryHidden({ "channel": channel, "enabled": enabled });
1567
1510
  }
1568
1511
  /**
1569
- * Generate buffer from TLObject.
1570
- */
1512
+ * Generate buffer from TLObject.
1513
+ */
1571
1514
  write() {
1572
1515
  const b = new BytesIO();
1573
1516
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1576,7 +1519,7 @@ export class TogglePreHistoryHidden extends TLObject {
1576
1519
  b.write(this.channel.write());
1577
1520
  }
1578
1521
  if (this.enabled !== undefined) {
1579
- b.write(Primitive.Bool.write(this.enabled));
1522
+ b.write((Primitive.Bool.write(this.enabled)));
1580
1523
  }
1581
1524
  return b.buffer;
1582
1525
  }
@@ -1586,31 +1529,31 @@ export class GetLeftChannels extends TLObject {
1586
1529
  offset;
1587
1530
  constructor(params) {
1588
1531
  super();
1589
- this.classType = 'functions';
1590
- this.className = 'channels.GetLeftChannels';
1532
+ this.classType = "functions";
1533
+ this.className = "channels.GetLeftChannels";
1591
1534
  this.constructorId = 0x8341ecc0;
1592
1535
  this.subclassOfId = 0x99d5cb14;
1593
- this._slots = ['offset'];
1536
+ this._slots = ["offset"];
1594
1537
  this.offset = params.offset;
1595
1538
  }
1596
1539
  /**
1597
- * Generate the TLObject from buffer.
1598
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1599
- */
1540
+ * Generate the TLObject from buffer.
1541
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1542
+ */
1600
1543
  static async read(_data, ..._args) {
1601
1544
  // no flags
1602
1545
  let offset = await Primitive.Int.read(_data);
1603
- return new GetLeftChannels({ offset: offset });
1546
+ return new GetLeftChannels({ "offset": offset });
1604
1547
  }
1605
1548
  /**
1606
- * Generate buffer from TLObject.
1607
- */
1549
+ * Generate buffer from TLObject.
1550
+ */
1608
1551
  write() {
1609
1552
  const b = new BytesIO();
1610
1553
  b.write(Primitive.Int.write(this.constructorId, false));
1611
1554
  // no flags
1612
1555
  if (this.offset !== undefined) {
1613
- b.write(Primitive.Int.write(this.offset));
1556
+ b.write((Primitive.Int.write(this.offset)));
1614
1557
  }
1615
1558
  return b.buffer;
1616
1559
  }
@@ -1619,23 +1562,23 @@ export class GetGroupsForDiscussion extends TLObject {
1619
1562
  __response__;
1620
1563
  constructor() {
1621
1564
  super();
1622
- this.classType = 'functions';
1623
- this.className = 'channels.GetGroupsForDiscussion';
1565
+ this.classType = "functions";
1566
+ this.className = "channels.GetGroupsForDiscussion";
1624
1567
  this.constructorId = 0xf5dad378;
1625
1568
  this.subclassOfId = 0x99d5cb14;
1626
1569
  this._slots = [];
1627
1570
  }
1628
1571
  /**
1629
- * Generate the TLObject from buffer.
1630
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1631
- */
1572
+ * Generate the TLObject from buffer.
1573
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1574
+ */
1632
1575
  static async read(_data, ..._args) {
1633
1576
  // no flags
1634
1577
  return new GetGroupsForDiscussion();
1635
1578
  }
1636
1579
  /**
1637
- * Generate buffer from TLObject.
1638
- */
1580
+ * Generate buffer from TLObject.
1581
+ */
1639
1582
  write() {
1640
1583
  const b = new BytesIO();
1641
1584
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1649,27 +1592,27 @@ export class SetDiscussionGroup extends TLObject {
1649
1592
  group;
1650
1593
  constructor(params) {
1651
1594
  super();
1652
- this.classType = 'functions';
1653
- this.className = 'channels.SetDiscussionGroup';
1595
+ this.classType = "functions";
1596
+ this.className = "channels.SetDiscussionGroup";
1654
1597
  this.constructorId = 0x40582bb2;
1655
1598
  this.subclassOfId = 0xf5b399ac;
1656
- this._slots = ['broadcast', 'group'];
1599
+ this._slots = ["broadcast", "group"];
1657
1600
  this.broadcast = params.broadcast;
1658
1601
  this.group = params.group;
1659
1602
  }
1660
1603
  /**
1661
- * Generate the TLObject from buffer.
1662
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1663
- */
1604
+ * Generate the TLObject from buffer.
1605
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1606
+ */
1664
1607
  static async read(_data, ..._args) {
1665
1608
  // no flags
1666
1609
  let broadcast = await TLObject.read(_data);
1667
1610
  let group = await TLObject.read(_data);
1668
- return new SetDiscussionGroup({ broadcast: broadcast, group: group });
1611
+ return new SetDiscussionGroup({ "broadcast": broadcast, "group": group });
1669
1612
  }
1670
1613
  /**
1671
- * Generate buffer from TLObject.
1672
- */
1614
+ * Generate buffer from TLObject.
1615
+ */
1673
1616
  write() {
1674
1617
  const b = new BytesIO();
1675
1618
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1690,29 +1633,29 @@ export class EditLocation extends TLObject {
1690
1633
  address;
1691
1634
  constructor(params) {
1692
1635
  super();
1693
- this.classType = 'functions';
1694
- this.className = 'channels.EditLocation';
1636
+ this.classType = "functions";
1637
+ this.className = "channels.EditLocation";
1695
1638
  this.constructorId = 0x58e63f6d;
1696
1639
  this.subclassOfId = 0xf5b399ac;
1697
- this._slots = ['channel', 'geoPoint', 'address'];
1640
+ this._slots = ["channel", "geoPoint", "address"];
1698
1641
  this.channel = params.channel;
1699
1642
  this.geoPoint = params.geoPoint;
1700
1643
  this.address = params.address;
1701
1644
  }
1702
1645
  /**
1703
- * Generate the TLObject from buffer.
1704
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1705
- */
1646
+ * Generate the TLObject from buffer.
1647
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1648
+ */
1706
1649
  static async read(_data, ..._args) {
1707
1650
  // no flags
1708
1651
  let channel = await TLObject.read(_data);
1709
1652
  let geoPoint = await TLObject.read(_data);
1710
1653
  let address = await Primitive.String.read(_data);
1711
- return new EditLocation({ channel: channel, geoPoint: geoPoint, address: address });
1654
+ return new EditLocation({ "channel": channel, "geoPoint": geoPoint, "address": address });
1712
1655
  }
1713
1656
  /**
1714
- * Generate buffer from TLObject.
1715
- */
1657
+ * Generate buffer from TLObject.
1658
+ */
1716
1659
  write() {
1717
1660
  const b = new BytesIO();
1718
1661
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1724,7 +1667,7 @@ export class EditLocation extends TLObject {
1724
1667
  b.write(this.geoPoint.write());
1725
1668
  }
1726
1669
  if (this.address !== undefined) {
1727
- b.write(Primitive.String.write(this.address));
1670
+ b.write((Primitive.String.write(this.address)));
1728
1671
  }
1729
1672
  return b.buffer;
1730
1673
  }
@@ -1735,27 +1678,27 @@ export class ToggleSlowMode extends TLObject {
1735
1678
  seconds;
1736
1679
  constructor(params) {
1737
1680
  super();
1738
- this.classType = 'functions';
1739
- this.className = 'channels.ToggleSlowMode';
1681
+ this.classType = "functions";
1682
+ this.className = "channels.ToggleSlowMode";
1740
1683
  this.constructorId = 0xedd49ef0;
1741
1684
  this.subclassOfId = 0x8af52aac;
1742
- this._slots = ['channel', 'seconds'];
1685
+ this._slots = ["channel", "seconds"];
1743
1686
  this.channel = params.channel;
1744
1687
  this.seconds = params.seconds;
1745
1688
  }
1746
1689
  /**
1747
- * Generate the TLObject from buffer.
1748
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1749
- */
1690
+ * Generate the TLObject from buffer.
1691
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1692
+ */
1750
1693
  static async read(_data, ..._args) {
1751
1694
  // no flags
1752
1695
  let channel = await TLObject.read(_data);
1753
1696
  let seconds = await Primitive.Int.read(_data);
1754
- return new ToggleSlowMode({ channel: channel, seconds: seconds });
1697
+ return new ToggleSlowMode({ "channel": channel, "seconds": seconds });
1755
1698
  }
1756
1699
  /**
1757
- * Generate buffer from TLObject.
1758
- */
1700
+ * Generate buffer from TLObject.
1701
+ */
1759
1702
  write() {
1760
1703
  const b = new BytesIO();
1761
1704
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1764,7 +1707,7 @@ export class ToggleSlowMode extends TLObject {
1764
1707
  b.write(this.channel.write());
1765
1708
  }
1766
1709
  if (this.seconds !== undefined) {
1767
- b.write(Primitive.Int.write(this.seconds));
1710
+ b.write((Primitive.Int.write(this.seconds)));
1768
1711
  }
1769
1712
  return b.buffer;
1770
1713
  }
@@ -1773,23 +1716,23 @@ export class GetInactiveChannels extends TLObject {
1773
1716
  __response__;
1774
1717
  constructor() {
1775
1718
  super();
1776
- this.classType = 'functions';
1777
- this.className = 'channels.GetInactiveChannels';
1719
+ this.classType = "functions";
1720
+ this.className = "channels.GetInactiveChannels";
1778
1721
  this.constructorId = 0x11e831ee;
1779
1722
  this.subclassOfId = 0x8bf3d7d4;
1780
1723
  this._slots = [];
1781
1724
  }
1782
1725
  /**
1783
- * Generate the TLObject from buffer.
1784
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1785
- */
1726
+ * Generate the TLObject from buffer.
1727
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1728
+ */
1786
1729
  static async read(_data, ..._args) {
1787
1730
  // no flags
1788
1731
  return new GetInactiveChannels();
1789
1732
  }
1790
1733
  /**
1791
- * Generate buffer from TLObject.
1792
- */
1734
+ * Generate buffer from TLObject.
1735
+ */
1793
1736
  write() {
1794
1737
  const b = new BytesIO();
1795
1738
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1802,25 +1745,25 @@ export class ConvertToGigagroup extends TLObject {
1802
1745
  channel;
1803
1746
  constructor(params) {
1804
1747
  super();
1805
- this.classType = 'functions';
1806
- this.className = 'channels.ConvertToGigagroup';
1748
+ this.classType = "functions";
1749
+ this.className = "channels.ConvertToGigagroup";
1807
1750
  this.constructorId = 0xb290c69;
1808
1751
  this.subclassOfId = 0x8af52aac;
1809
- this._slots = ['channel'];
1752
+ this._slots = ["channel"];
1810
1753
  this.channel = params.channel;
1811
1754
  }
1812
1755
  /**
1813
- * Generate the TLObject from buffer.
1814
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1815
- */
1756
+ * Generate the TLObject from buffer.
1757
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1758
+ */
1816
1759
  static async read(_data, ..._args) {
1817
1760
  // no flags
1818
1761
  let channel = await TLObject.read(_data);
1819
- return new ConvertToGigagroup({ channel: channel });
1762
+ return new ConvertToGigagroup({ "channel": channel });
1820
1763
  }
1821
1764
  /**
1822
- * Generate buffer from TLObject.
1823
- */
1765
+ * Generate buffer from TLObject.
1766
+ */
1824
1767
  write() {
1825
1768
  const b = new BytesIO();
1826
1769
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1838,42 +1781,38 @@ export class GetSendAs extends TLObject {
1838
1781
  peer;
1839
1782
  constructor(params) {
1840
1783
  super();
1841
- this.classType = 'functions';
1842
- this.className = 'channels.GetSendAs';
1784
+ this.classType = "functions";
1785
+ this.className = "channels.GetSendAs";
1843
1786
  this.constructorId = 0xe785a43f;
1844
1787
  this.subclassOfId = 0x38cb8d21;
1845
- this._slots = ['forPaidReactions', 'forLiveStories', 'peer'];
1788
+ this._slots = ["forPaidReactions", "forLiveStories", "peer"];
1846
1789
  this.forPaidReactions = params.forPaidReactions;
1847
1790
  this.forLiveStories = params.forLiveStories;
1848
1791
  this.peer = params.peer;
1849
1792
  }
1850
1793
  /**
1851
- * Generate the TLObject from buffer.
1852
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1853
- */
1794
+ * Generate the TLObject from buffer.
1795
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1796
+ */
1854
1797
  static async read(_data, ..._args) {
1855
1798
  // @ts-ignore
1856
1799
  let flags = await Primitive.Int.read(_data);
1857
- let forPaidReactions = flags & (1 << 0) ? true : false;
1858
- let forLiveStories = flags & (1 << 1) ? true : false;
1800
+ let forPaidReactions = (flags & (1 << 0)) ? true : false;
1801
+ let forLiveStories = (flags & (1 << 1)) ? true : false;
1859
1802
  let peer = await TLObject.read(_data);
1860
- return new GetSendAs({
1861
- forPaidReactions: forPaidReactions,
1862
- forLiveStories: forLiveStories,
1863
- peer: peer,
1864
- });
1803
+ return new GetSendAs({ "forPaidReactions": forPaidReactions, "forLiveStories": forLiveStories, "peer": peer });
1865
1804
  }
1866
1805
  /**
1867
- * Generate buffer from TLObject.
1868
- */
1806
+ * Generate buffer from TLObject.
1807
+ */
1869
1808
  write() {
1870
1809
  const b = new BytesIO();
1871
1810
  b.write(Primitive.Int.write(this.constructorId, false));
1872
1811
  // @ts-ignore
1873
1812
  let flags = 0;
1874
- flags |= this.forPaidReactions ? 1 << 0 : 0;
1875
- flags |= this.forLiveStories ? 1 << 1 : 0;
1876
- b.write(Primitive.Int.write(flags));
1813
+ flags |= this.forPaidReactions ? (1 << 0) : 0;
1814
+ flags |= this.forLiveStories ? (1 << 1) : 0;
1815
+ b.write((Primitive.Int.write(flags)));
1877
1816
  if (this.peer !== undefined) {
1878
1817
  b.write(this.peer.write());
1879
1818
  }
@@ -1886,27 +1825,27 @@ export class DeleteParticipantHistory extends TLObject {
1886
1825
  participant;
1887
1826
  constructor(params) {
1888
1827
  super();
1889
- this.classType = 'functions';
1890
- this.className = 'channels.DeleteParticipantHistory';
1828
+ this.classType = "functions";
1829
+ this.className = "channels.DeleteParticipantHistory";
1891
1830
  this.constructorId = 0x367544db;
1892
1831
  this.subclassOfId = 0x2c49c116;
1893
- this._slots = ['channel', 'participant'];
1832
+ this._slots = ["channel", "participant"];
1894
1833
  this.channel = params.channel;
1895
1834
  this.participant = params.participant;
1896
1835
  }
1897
1836
  /**
1898
- * Generate the TLObject from buffer.
1899
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1900
- */
1837
+ * Generate the TLObject from buffer.
1838
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1839
+ */
1901
1840
  static async read(_data, ..._args) {
1902
1841
  // no flags
1903
1842
  let channel = await TLObject.read(_data);
1904
1843
  let participant = await TLObject.read(_data);
1905
- return new DeleteParticipantHistory({ channel: channel, participant: participant });
1844
+ return new DeleteParticipantHistory({ "channel": channel, "participant": participant });
1906
1845
  }
1907
1846
  /**
1908
- * Generate buffer from TLObject.
1909
- */
1847
+ * Generate buffer from TLObject.
1848
+ */
1910
1849
  write() {
1911
1850
  const b = new BytesIO();
1912
1851
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1926,27 +1865,27 @@ export class ToggleJoinToSend extends TLObject {
1926
1865
  enabled;
1927
1866
  constructor(params) {
1928
1867
  super();
1929
- this.classType = 'functions';
1930
- this.className = 'channels.ToggleJoinToSend';
1868
+ this.classType = "functions";
1869
+ this.className = "channels.ToggleJoinToSend";
1931
1870
  this.constructorId = 0xe4cb9580;
1932
1871
  this.subclassOfId = 0x8af52aac;
1933
- this._slots = ['channel', 'enabled'];
1872
+ this._slots = ["channel", "enabled"];
1934
1873
  this.channel = params.channel;
1935
1874
  this.enabled = params.enabled;
1936
1875
  }
1937
1876
  /**
1938
- * Generate the TLObject from buffer.
1939
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1940
- */
1877
+ * Generate the TLObject from buffer.
1878
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1879
+ */
1941
1880
  static async read(_data, ..._args) {
1942
1881
  // no flags
1943
1882
  let channel = await TLObject.read(_data);
1944
1883
  let enabled = await Primitive.Bool.read(_data);
1945
- return new ToggleJoinToSend({ channel: channel, enabled: enabled });
1884
+ return new ToggleJoinToSend({ "channel": channel, "enabled": enabled });
1946
1885
  }
1947
1886
  /**
1948
- * Generate buffer from TLObject.
1949
- */
1887
+ * Generate buffer from TLObject.
1888
+ */
1950
1889
  write() {
1951
1890
  const b = new BytesIO();
1952
1891
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1955,7 +1894,7 @@ export class ToggleJoinToSend extends TLObject {
1955
1894
  b.write(this.channel.write());
1956
1895
  }
1957
1896
  if (this.enabled !== undefined) {
1958
- b.write(Primitive.Bool.write(this.enabled));
1897
+ b.write((Primitive.Bool.write(this.enabled)));
1959
1898
  }
1960
1899
  return b.buffer;
1961
1900
  }
@@ -1968,50 +1907,45 @@ export class ToggleJoinRequest extends TLObject {
1968
1907
  guardBot;
1969
1908
  constructor(params) {
1970
1909
  super();
1971
- this.classType = 'functions';
1972
- this.className = 'channels.ToggleJoinRequest';
1910
+ this.classType = "functions";
1911
+ this.className = "channels.ToggleJoinRequest";
1973
1912
  this.constructorId = 0xecc2618;
1974
1913
  this.subclassOfId = 0x8af52aac;
1975
- this._slots = ['applyToInvites', 'channel', 'enabled', 'guardBot'];
1914
+ this._slots = ["applyToInvites", "channel", "enabled", "guardBot"];
1976
1915
  this.applyToInvites = params.applyToInvites;
1977
1916
  this.channel = params.channel;
1978
1917
  this.enabled = params.enabled;
1979
1918
  this.guardBot = params.guardBot;
1980
1919
  }
1981
1920
  /**
1982
- * Generate the TLObject from buffer.
1983
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1984
- */
1921
+ * Generate the TLObject from buffer.
1922
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1923
+ */
1985
1924
  static async read(_data, ..._args) {
1986
1925
  // @ts-ignore
1987
1926
  let flags = await Primitive.Int.read(_data);
1988
- let applyToInvites = flags & (1 << 1) ? true : false;
1927
+ let applyToInvites = (flags & (1 << 1)) ? true : false;
1989
1928
  let channel = await TLObject.read(_data);
1990
1929
  let enabled = await Primitive.Bool.read(_data);
1991
- let guardBot = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
1992
- return new ToggleJoinRequest({
1993
- applyToInvites: applyToInvites,
1994
- channel: channel,
1995
- enabled: enabled,
1996
- guardBot: guardBot,
1997
- });
1930
+ let guardBot = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
1931
+ return new ToggleJoinRequest({ "applyToInvites": applyToInvites, "channel": channel, "enabled": enabled, "guardBot": guardBot });
1998
1932
  }
1999
1933
  /**
2000
- * Generate buffer from TLObject.
2001
- */
1934
+ * Generate buffer from TLObject.
1935
+ */
2002
1936
  write() {
2003
1937
  const b = new BytesIO();
2004
1938
  b.write(Primitive.Int.write(this.constructorId, false));
2005
1939
  // @ts-ignore
2006
1940
  let flags = 0;
2007
- flags |= this.applyToInvites ? 1 << 1 : 0;
2008
- flags |= this.guardBot !== undefined ? 1 << 0 : 0;
2009
- b.write(Primitive.Int.write(flags));
1941
+ flags |= this.applyToInvites ? (1 << 1) : 0;
1942
+ flags |= this.guardBot !== undefined ? (1 << 0) : 0;
1943
+ b.write((Primitive.Int.write(flags)));
2010
1944
  if (this.channel !== undefined) {
2011
1945
  b.write(this.channel.write());
2012
1946
  }
2013
1947
  if (this.enabled !== undefined) {
2014
- b.write(Primitive.Bool.write(this.enabled));
1948
+ b.write((Primitive.Bool.write(this.enabled)));
2015
1949
  }
2016
1950
  if (this.guardBot !== undefined) {
2017
1951
  b.write(this.guardBot.write());
@@ -2025,27 +1959,27 @@ export class ReorderUsernames extends TLObject {
2025
1959
  order;
2026
1960
  constructor(params) {
2027
1961
  super();
2028
- this.classType = 'functions';
2029
- this.className = 'channels.ReorderUsernames';
1962
+ this.classType = "functions";
1963
+ this.className = "channels.ReorderUsernames";
2030
1964
  this.constructorId = 0xb45ced1d;
2031
1965
  this.subclassOfId = 0xf5b399ac;
2032
- this._slots = ['channel', 'order'];
1966
+ this._slots = ["channel", "order"];
2033
1967
  this.channel = params.channel;
2034
1968
  this.order = params.order;
2035
1969
  }
2036
1970
  /**
2037
- * Generate the TLObject from buffer.
2038
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2039
- */
1971
+ * Generate the TLObject from buffer.
1972
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1973
+ */
2040
1974
  static async read(_data, ..._args) {
2041
1975
  // no flags
2042
1976
  let channel = await TLObject.read(_data);
2043
1977
  let order = await TLObject.read(_data, Primitive.String);
2044
- return new ReorderUsernames({ channel: channel, order: order });
1978
+ return new ReorderUsernames({ "channel": channel, "order": order });
2045
1979
  }
2046
1980
  /**
2047
- * Generate buffer from TLObject.
2048
- */
1981
+ * Generate buffer from TLObject.
1982
+ */
2049
1983
  write() {
2050
1984
  const b = new BytesIO();
2051
1985
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2054,7 +1988,7 @@ export class ReorderUsernames extends TLObject {
2054
1988
  b.write(this.channel.write());
2055
1989
  }
2056
1990
  if (this.order) {
2057
- b.write(Primitive.Vector.write(this.order, Primitive.String));
1991
+ b.write((Primitive.Vector.write(this.order, Primitive.String)));
2058
1992
  }
2059
1993
  return b.buffer;
2060
1994
  }
@@ -2066,29 +2000,29 @@ export class ToggleUsername extends TLObject {
2066
2000
  active;
2067
2001
  constructor(params) {
2068
2002
  super();
2069
- this.classType = 'functions';
2070
- this.className = 'channels.ToggleUsername';
2003
+ this.classType = "functions";
2004
+ this.className = "channels.ToggleUsername";
2071
2005
  this.constructorId = 0x50f24105;
2072
2006
  this.subclassOfId = 0xf5b399ac;
2073
- this._slots = ['channel', 'username', 'active'];
2007
+ this._slots = ["channel", "username", "active"];
2074
2008
  this.channel = params.channel;
2075
2009
  this.username = params.username;
2076
2010
  this.active = params.active;
2077
2011
  }
2078
2012
  /**
2079
- * Generate the TLObject from buffer.
2080
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2081
- */
2013
+ * Generate the TLObject from buffer.
2014
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2015
+ */
2082
2016
  static async read(_data, ..._args) {
2083
2017
  // no flags
2084
2018
  let channel = await TLObject.read(_data);
2085
2019
  let username = await Primitive.String.read(_data);
2086
2020
  let active = await Primitive.Bool.read(_data);
2087
- return new ToggleUsername({ channel: channel, username: username, active: active });
2021
+ return new ToggleUsername({ "channel": channel, "username": username, "active": active });
2088
2022
  }
2089
2023
  /**
2090
- * Generate buffer from TLObject.
2091
- */
2024
+ * Generate buffer from TLObject.
2025
+ */
2092
2026
  write() {
2093
2027
  const b = new BytesIO();
2094
2028
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2097,10 +2031,10 @@ export class ToggleUsername extends TLObject {
2097
2031
  b.write(this.channel.write());
2098
2032
  }
2099
2033
  if (this.username !== undefined) {
2100
- b.write(Primitive.String.write(this.username));
2034
+ b.write((Primitive.String.write(this.username)));
2101
2035
  }
2102
2036
  if (this.active !== undefined) {
2103
- b.write(Primitive.Bool.write(this.active));
2037
+ b.write((Primitive.Bool.write(this.active)));
2104
2038
  }
2105
2039
  return b.buffer;
2106
2040
  }
@@ -2110,25 +2044,25 @@ export class DeactivateAllUsernames extends TLObject {
2110
2044
  channel;
2111
2045
  constructor(params) {
2112
2046
  super();
2113
- this.classType = 'functions';
2114
- this.className = 'channels.DeactivateAllUsernames';
2047
+ this.classType = "functions";
2048
+ this.className = "channels.DeactivateAllUsernames";
2115
2049
  this.constructorId = 0xa245dd3;
2116
2050
  this.subclassOfId = 0xf5b399ac;
2117
- this._slots = ['channel'];
2051
+ this._slots = ["channel"];
2118
2052
  this.channel = params.channel;
2119
2053
  }
2120
2054
  /**
2121
- * Generate the TLObject from buffer.
2122
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2123
- */
2055
+ * Generate the TLObject from buffer.
2056
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2057
+ */
2124
2058
  static async read(_data, ..._args) {
2125
2059
  // no flags
2126
2060
  let channel = await TLObject.read(_data);
2127
- return new DeactivateAllUsernames({ channel: channel });
2061
+ return new DeactivateAllUsernames({ "channel": channel });
2128
2062
  }
2129
2063
  /**
2130
- * Generate buffer from TLObject.
2131
- */
2064
+ * Generate buffer from TLObject.
2065
+ */
2132
2066
  write() {
2133
2067
  const b = new BytesIO();
2134
2068
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2147,31 +2081,31 @@ export class ToggleForum extends TLObject {
2147
2081
  sidebar;
2148
2082
  constructor(params) {
2149
2083
  super();
2150
- this.classType = 'functions';
2151
- this.className = 'channels.ToggleForum';
2084
+ this.classType = "functions";
2085
+ this.className = "channels.ToggleForum";
2152
2086
  this.constructorId = 0xa2952b54;
2153
2087
  this.subclassOfId = 0x8af52aac;
2154
- this._slots = ['channel', 'enabled', 'tabs', 'sidebar'];
2088
+ this._slots = ["channel", "enabled", "tabs", "sidebar"];
2155
2089
  this.channel = params.channel;
2156
2090
  this.enabled = params.enabled;
2157
2091
  this.tabs = params.tabs;
2158
2092
  this.sidebar = params.sidebar;
2159
2093
  }
2160
2094
  /**
2161
- * Generate the TLObject from buffer.
2162
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2163
- */
2095
+ * Generate the TLObject from buffer.
2096
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2097
+ */
2164
2098
  static async read(_data, ..._args) {
2165
2099
  // no flags
2166
2100
  let channel = await TLObject.read(_data);
2167
2101
  let enabled = await Primitive.Bool.read(_data);
2168
2102
  let tabs = await Primitive.Bool.read(_data);
2169
2103
  let sidebar = await Primitive.Bool.read(_data);
2170
- return new ToggleForum({ channel: channel, enabled: enabled, tabs: tabs, sidebar: sidebar });
2104
+ return new ToggleForum({ "channel": channel, "enabled": enabled, "tabs": tabs, "sidebar": sidebar });
2171
2105
  }
2172
2106
  /**
2173
- * Generate buffer from TLObject.
2174
- */
2107
+ * Generate buffer from TLObject.
2108
+ */
2175
2109
  write() {
2176
2110
  const b = new BytesIO();
2177
2111
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2180,13 +2114,13 @@ export class ToggleForum extends TLObject {
2180
2114
  b.write(this.channel.write());
2181
2115
  }
2182
2116
  if (this.enabled !== undefined) {
2183
- b.write(Primitive.Bool.write(this.enabled));
2117
+ b.write((Primitive.Bool.write(this.enabled)));
2184
2118
  }
2185
2119
  if (this.tabs !== undefined) {
2186
- b.write(Primitive.Bool.write(this.tabs));
2120
+ b.write((Primitive.Bool.write(this.tabs)));
2187
2121
  }
2188
2122
  if (this.sidebar !== undefined) {
2189
- b.write(Primitive.Bool.write(this.sidebar));
2123
+ b.write((Primitive.Bool.write(this.sidebar)));
2190
2124
  }
2191
2125
  return b.buffer;
2192
2126
  }
@@ -2197,27 +2131,27 @@ export class ToggleAntiSpam extends TLObject {
2197
2131
  enabled;
2198
2132
  constructor(params) {
2199
2133
  super();
2200
- this.classType = 'functions';
2201
- this.className = 'channels.ToggleAntiSpam';
2134
+ this.classType = "functions";
2135
+ this.className = "channels.ToggleAntiSpam";
2202
2136
  this.constructorId = 0x68f3e4eb;
2203
2137
  this.subclassOfId = 0x8af52aac;
2204
- this._slots = ['channel', 'enabled'];
2138
+ this._slots = ["channel", "enabled"];
2205
2139
  this.channel = params.channel;
2206
2140
  this.enabled = params.enabled;
2207
2141
  }
2208
2142
  /**
2209
- * Generate the TLObject from buffer.
2210
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2211
- */
2143
+ * Generate the TLObject from buffer.
2144
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2145
+ */
2212
2146
  static async read(_data, ..._args) {
2213
2147
  // no flags
2214
2148
  let channel = await TLObject.read(_data);
2215
2149
  let enabled = await Primitive.Bool.read(_data);
2216
- return new ToggleAntiSpam({ channel: channel, enabled: enabled });
2150
+ return new ToggleAntiSpam({ "channel": channel, "enabled": enabled });
2217
2151
  }
2218
2152
  /**
2219
- * Generate buffer from TLObject.
2220
- */
2153
+ * Generate buffer from TLObject.
2154
+ */
2221
2155
  write() {
2222
2156
  const b = new BytesIO();
2223
2157
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2226,7 +2160,7 @@ export class ToggleAntiSpam extends TLObject {
2226
2160
  b.write(this.channel.write());
2227
2161
  }
2228
2162
  if (this.enabled !== undefined) {
2229
- b.write(Primitive.Bool.write(this.enabled));
2163
+ b.write((Primitive.Bool.write(this.enabled)));
2230
2164
  }
2231
2165
  return b.buffer;
2232
2166
  }
@@ -2237,27 +2171,27 @@ export class ReportAntiSpamFalsePositive extends TLObject {
2237
2171
  msgId;
2238
2172
  constructor(params) {
2239
2173
  super();
2240
- this.classType = 'functions';
2241
- this.className = 'channels.ReportAntiSpamFalsePositive';
2174
+ this.classType = "functions";
2175
+ this.className = "channels.ReportAntiSpamFalsePositive";
2242
2176
  this.constructorId = 0xa850a693;
2243
2177
  this.subclassOfId = 0xf5b399ac;
2244
- this._slots = ['channel', 'msgId'];
2178
+ this._slots = ["channel", "msgId"];
2245
2179
  this.channel = params.channel;
2246
2180
  this.msgId = params.msgId;
2247
2181
  }
2248
2182
  /**
2249
- * Generate the TLObject from buffer.
2250
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2251
- */
2183
+ * Generate the TLObject from buffer.
2184
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2185
+ */
2252
2186
  static async read(_data, ..._args) {
2253
2187
  // no flags
2254
2188
  let channel = await TLObject.read(_data);
2255
2189
  let msgId = await Primitive.Int.read(_data);
2256
- return new ReportAntiSpamFalsePositive({ channel: channel, msgId: msgId });
2190
+ return new ReportAntiSpamFalsePositive({ "channel": channel, "msgId": msgId });
2257
2191
  }
2258
2192
  /**
2259
- * Generate buffer from TLObject.
2260
- */
2193
+ * Generate buffer from TLObject.
2194
+ */
2261
2195
  write() {
2262
2196
  const b = new BytesIO();
2263
2197
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2266,7 +2200,7 @@ export class ReportAntiSpamFalsePositive extends TLObject {
2266
2200
  b.write(this.channel.write());
2267
2201
  }
2268
2202
  if (this.msgId !== undefined) {
2269
- b.write(Primitive.Int.write(this.msgId));
2203
+ b.write((Primitive.Int.write(this.msgId)));
2270
2204
  }
2271
2205
  return b.buffer;
2272
2206
  }
@@ -2277,27 +2211,27 @@ export class ToggleParticipantsHidden extends TLObject {
2277
2211
  enabled;
2278
2212
  constructor(params) {
2279
2213
  super();
2280
- this.classType = 'functions';
2281
- this.className = 'channels.ToggleParticipantsHidden';
2214
+ this.classType = "functions";
2215
+ this.className = "channels.ToggleParticipantsHidden";
2282
2216
  this.constructorId = 0x6a6e7854;
2283
2217
  this.subclassOfId = 0x8af52aac;
2284
- this._slots = ['channel', 'enabled'];
2218
+ this._slots = ["channel", "enabled"];
2285
2219
  this.channel = params.channel;
2286
2220
  this.enabled = params.enabled;
2287
2221
  }
2288
2222
  /**
2289
- * Generate the TLObject from buffer.
2290
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2291
- */
2223
+ * Generate the TLObject from buffer.
2224
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2225
+ */
2292
2226
  static async read(_data, ..._args) {
2293
2227
  // no flags
2294
2228
  let channel = await TLObject.read(_data);
2295
2229
  let enabled = await Primitive.Bool.read(_data);
2296
- return new ToggleParticipantsHidden({ channel: channel, enabled: enabled });
2230
+ return new ToggleParticipantsHidden({ "channel": channel, "enabled": enabled });
2297
2231
  }
2298
2232
  /**
2299
- * Generate buffer from TLObject.
2300
- */
2233
+ * Generate buffer from TLObject.
2234
+ */
2301
2235
  write() {
2302
2236
  const b = new BytesIO();
2303
2237
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2306,7 +2240,7 @@ export class ToggleParticipantsHidden extends TLObject {
2306
2240
  b.write(this.channel.write());
2307
2241
  }
2308
2242
  if (this.enabled !== undefined) {
2309
- b.write(Primitive.Bool.write(this.enabled));
2243
+ b.write((Primitive.Bool.write(this.enabled)));
2310
2244
  }
2311
2245
  return b.buffer;
2312
2246
  }
@@ -2319,54 +2253,49 @@ export class UpdateColor extends TLObject {
2319
2253
  backgroundEmojiId;
2320
2254
  constructor(params) {
2321
2255
  super();
2322
- this.classType = 'functions';
2323
- this.className = 'channels.UpdateColor';
2256
+ this.classType = "functions";
2257
+ this.className = "channels.UpdateColor";
2324
2258
  this.constructorId = 0xd8aa3671;
2325
2259
  this.subclassOfId = 0x8af52aac;
2326
- this._slots = ['forProfile', 'channel', 'color', 'backgroundEmojiId'];
2260
+ this._slots = ["forProfile", "channel", "color", "backgroundEmojiId"];
2327
2261
  this.forProfile = params.forProfile;
2328
2262
  this.channel = params.channel;
2329
2263
  this.color = params.color;
2330
2264
  this.backgroundEmojiId = params.backgroundEmojiId;
2331
2265
  }
2332
2266
  /**
2333
- * Generate the TLObject from buffer.
2334
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2335
- */
2267
+ * Generate the TLObject from buffer.
2268
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2269
+ */
2336
2270
  static async read(_data, ..._args) {
2337
2271
  // @ts-ignore
2338
2272
  let flags = await Primitive.Int.read(_data);
2339
- let forProfile = flags & (1 << 1) ? true : false;
2273
+ let forProfile = (flags & (1 << 1)) ? true : false;
2340
2274
  let channel = await TLObject.read(_data);
2341
- let color = flags & (1 << 2) ? await Primitive.Int.read(_data) : undefined;
2342
- let backgroundEmojiId = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
2343
- return new UpdateColor({
2344
- forProfile: forProfile,
2345
- channel: channel,
2346
- color: color,
2347
- backgroundEmojiId: backgroundEmojiId,
2348
- });
2275
+ let color = (flags & (1 << 2)) ? await Primitive.Int.read(_data) : undefined;
2276
+ let backgroundEmojiId = (flags & (1 << 0)) ? await Primitive.Long.read(_data) : undefined;
2277
+ return new UpdateColor({ "forProfile": forProfile, "channel": channel, "color": color, "backgroundEmojiId": backgroundEmojiId });
2349
2278
  }
2350
2279
  /**
2351
- * Generate buffer from TLObject.
2352
- */
2280
+ * Generate buffer from TLObject.
2281
+ */
2353
2282
  write() {
2354
2283
  const b = new BytesIO();
2355
2284
  b.write(Primitive.Int.write(this.constructorId, false));
2356
2285
  // @ts-ignore
2357
2286
  let flags = 0;
2358
- flags |= this.forProfile ? 1 << 1 : 0;
2359
- flags |= this.color !== undefined ? 1 << 2 : 0;
2360
- flags |= this.backgroundEmojiId !== undefined ? 1 << 0 : 0;
2361
- b.write(Primitive.Int.write(flags));
2287
+ flags |= this.forProfile ? (1 << 1) : 0;
2288
+ flags |= this.color !== undefined ? (1 << 2) : 0;
2289
+ flags |= this.backgroundEmojiId !== undefined ? (1 << 0) : 0;
2290
+ b.write((Primitive.Int.write(flags)));
2362
2291
  if (this.channel !== undefined) {
2363
2292
  b.write(this.channel.write());
2364
2293
  }
2365
2294
  if (this.color !== undefined) {
2366
- b.write(Primitive.Int.write(this.color));
2295
+ b.write((Primitive.Int.write(this.color)));
2367
2296
  }
2368
2297
  if (this.backgroundEmojiId !== undefined) {
2369
- b.write(Primitive.Long.write(this.backgroundEmojiId));
2298
+ b.write((Primitive.Long.write(this.backgroundEmojiId)));
2370
2299
  }
2371
2300
  return b.buffer;
2372
2301
  }
@@ -2377,27 +2306,27 @@ export class ToggleViewForumAsMessages extends TLObject {
2377
2306
  enabled;
2378
2307
  constructor(params) {
2379
2308
  super();
2380
- this.classType = 'functions';
2381
- this.className = 'channels.ToggleViewForumAsMessages';
2309
+ this.classType = "functions";
2310
+ this.className = "channels.ToggleViewForumAsMessages";
2382
2311
  this.constructorId = 0x9738bb15;
2383
2312
  this.subclassOfId = 0x8af52aac;
2384
- this._slots = ['channel', 'enabled'];
2313
+ this._slots = ["channel", "enabled"];
2385
2314
  this.channel = params.channel;
2386
2315
  this.enabled = params.enabled;
2387
2316
  }
2388
2317
  /**
2389
- * Generate the TLObject from buffer.
2390
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2391
- */
2318
+ * Generate the TLObject from buffer.
2319
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2320
+ */
2392
2321
  static async read(_data, ..._args) {
2393
2322
  // no flags
2394
2323
  let channel = await TLObject.read(_data);
2395
2324
  let enabled = await Primitive.Bool.read(_data);
2396
- return new ToggleViewForumAsMessages({ channel: channel, enabled: enabled });
2325
+ return new ToggleViewForumAsMessages({ "channel": channel, "enabled": enabled });
2397
2326
  }
2398
2327
  /**
2399
- * Generate buffer from TLObject.
2400
- */
2328
+ * Generate buffer from TLObject.
2329
+ */
2401
2330
  write() {
2402
2331
  const b = new BytesIO();
2403
2332
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2406,7 +2335,7 @@ export class ToggleViewForumAsMessages extends TLObject {
2406
2335
  b.write(this.channel.write());
2407
2336
  }
2408
2337
  if (this.enabled !== undefined) {
2409
- b.write(Primitive.Bool.write(this.enabled));
2338
+ b.write((Primitive.Bool.write(this.enabled)));
2410
2339
  }
2411
2340
  return b.buffer;
2412
2341
  }
@@ -2416,33 +2345,33 @@ export class GetChannelRecommendations extends TLObject {
2416
2345
  channel;
2417
2346
  constructor(params) {
2418
2347
  super();
2419
- this.classType = 'functions';
2420
- this.className = 'channels.GetChannelRecommendations';
2348
+ this.classType = "functions";
2349
+ this.className = "channels.GetChannelRecommendations";
2421
2350
  this.constructorId = 0x25a71742;
2422
2351
  this.subclassOfId = 0x99d5cb14;
2423
- this._slots = ['channel'];
2352
+ this._slots = ["channel"];
2424
2353
  this.channel = params.channel;
2425
2354
  }
2426
2355
  /**
2427
- * Generate the TLObject from buffer.
2428
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2429
- */
2356
+ * Generate the TLObject from buffer.
2357
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2358
+ */
2430
2359
  static async read(_data, ..._args) {
2431
2360
  // @ts-ignore
2432
2361
  let flags = await Primitive.Int.read(_data);
2433
- let channel = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
2434
- return new GetChannelRecommendations({ channel: channel });
2362
+ let channel = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
2363
+ return new GetChannelRecommendations({ "channel": channel });
2435
2364
  }
2436
2365
  /**
2437
- * Generate buffer from TLObject.
2438
- */
2366
+ * Generate buffer from TLObject.
2367
+ */
2439
2368
  write() {
2440
2369
  const b = new BytesIO();
2441
2370
  b.write(Primitive.Int.write(this.constructorId, false));
2442
2371
  // @ts-ignore
2443
2372
  let flags = 0;
2444
- flags |= this.channel !== undefined ? 1 << 0 : 0;
2445
- b.write(Primitive.Int.write(flags));
2373
+ flags |= this.channel !== undefined ? (1 << 0) : 0;
2374
+ b.write((Primitive.Int.write(flags)));
2446
2375
  if (this.channel !== undefined) {
2447
2376
  b.write(this.channel.write());
2448
2377
  }
@@ -2455,27 +2384,27 @@ export class UpdateEmojiStatus extends TLObject {
2455
2384
  emojiStatus;
2456
2385
  constructor(params) {
2457
2386
  super();
2458
- this.classType = 'functions';
2459
- this.className = 'channels.UpdateEmojiStatus';
2387
+ this.classType = "functions";
2388
+ this.className = "channels.UpdateEmojiStatus";
2460
2389
  this.constructorId = 0xf0d3e6a8;
2461
2390
  this.subclassOfId = 0x8af52aac;
2462
- this._slots = ['channel', 'emojiStatus'];
2391
+ this._slots = ["channel", "emojiStatus"];
2463
2392
  this.channel = params.channel;
2464
2393
  this.emojiStatus = params.emojiStatus;
2465
2394
  }
2466
2395
  /**
2467
- * Generate the TLObject from buffer.
2468
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2469
- */
2396
+ * Generate the TLObject from buffer.
2397
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2398
+ */
2470
2399
  static async read(_data, ..._args) {
2471
2400
  // no flags
2472
2401
  let channel = await TLObject.read(_data);
2473
2402
  let emojiStatus = await TLObject.read(_data);
2474
- return new UpdateEmojiStatus({ channel: channel, emojiStatus: emojiStatus });
2403
+ return new UpdateEmojiStatus({ "channel": channel, "emojiStatus": emojiStatus });
2475
2404
  }
2476
2405
  /**
2477
- * Generate buffer from TLObject.
2478
- */
2406
+ * Generate buffer from TLObject.
2407
+ */
2479
2408
  write() {
2480
2409
  const b = new BytesIO();
2481
2410
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2495,27 +2424,27 @@ export class SetBoostsToUnblockRestrictions extends TLObject {
2495
2424
  boosts;
2496
2425
  constructor(params) {
2497
2426
  super();
2498
- this.classType = 'functions';
2499
- this.className = 'channels.SetBoostsToUnblockRestrictions';
2427
+ this.classType = "functions";
2428
+ this.className = "channels.SetBoostsToUnblockRestrictions";
2500
2429
  this.constructorId = 0xad399cee;
2501
2430
  this.subclassOfId = 0x8af52aac;
2502
- this._slots = ['channel', 'boosts'];
2431
+ this._slots = ["channel", "boosts"];
2503
2432
  this.channel = params.channel;
2504
2433
  this.boosts = params.boosts;
2505
2434
  }
2506
2435
  /**
2507
- * Generate the TLObject from buffer.
2508
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2509
- */
2436
+ * Generate the TLObject from buffer.
2437
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2438
+ */
2510
2439
  static async read(_data, ..._args) {
2511
2440
  // no flags
2512
2441
  let channel = await TLObject.read(_data);
2513
2442
  let boosts = await Primitive.Int.read(_data);
2514
- return new SetBoostsToUnblockRestrictions({ channel: channel, boosts: boosts });
2443
+ return new SetBoostsToUnblockRestrictions({ "channel": channel, "boosts": boosts });
2515
2444
  }
2516
2445
  /**
2517
- * Generate buffer from TLObject.
2518
- */
2446
+ * Generate buffer from TLObject.
2447
+ */
2519
2448
  write() {
2520
2449
  const b = new BytesIO();
2521
2450
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2524,7 +2453,7 @@ export class SetBoostsToUnblockRestrictions extends TLObject {
2524
2453
  b.write(this.channel.write());
2525
2454
  }
2526
2455
  if (this.boosts !== undefined) {
2527
- b.write(Primitive.Int.write(this.boosts));
2456
+ b.write((Primitive.Int.write(this.boosts)));
2528
2457
  }
2529
2458
  return b.buffer;
2530
2459
  }
@@ -2535,27 +2464,27 @@ export class SetEmojiStickers extends TLObject {
2535
2464
  stickerset;
2536
2465
  constructor(params) {
2537
2466
  super();
2538
- this.classType = 'functions';
2539
- this.className = 'channels.SetEmojiStickers';
2467
+ this.classType = "functions";
2468
+ this.className = "channels.SetEmojiStickers";
2540
2469
  this.constructorId = 0x3cd930b7;
2541
2470
  this.subclassOfId = 0xf5b399ac;
2542
- this._slots = ['channel', 'stickerset'];
2471
+ this._slots = ["channel", "stickerset"];
2543
2472
  this.channel = params.channel;
2544
2473
  this.stickerset = params.stickerset;
2545
2474
  }
2546
2475
  /**
2547
- * Generate the TLObject from buffer.
2548
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2549
- */
2476
+ * Generate the TLObject from buffer.
2477
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2478
+ */
2550
2479
  static async read(_data, ..._args) {
2551
2480
  // no flags
2552
2481
  let channel = await TLObject.read(_data);
2553
2482
  let stickerset = await TLObject.read(_data);
2554
- return new SetEmojiStickers({ channel: channel, stickerset: stickerset });
2483
+ return new SetEmojiStickers({ "channel": channel, "stickerset": stickerset });
2555
2484
  }
2556
2485
  /**
2557
- * Generate buffer from TLObject.
2558
- */
2486
+ * Generate buffer from TLObject.
2487
+ */
2559
2488
  write() {
2560
2489
  const b = new BytesIO();
2561
2490
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2575,27 +2504,27 @@ export class RestrictSponsoredMessages extends TLObject {
2575
2504
  restricted;
2576
2505
  constructor(params) {
2577
2506
  super();
2578
- this.classType = 'functions';
2579
- this.className = 'channels.RestrictSponsoredMessages';
2507
+ this.classType = "functions";
2508
+ this.className = "channels.RestrictSponsoredMessages";
2580
2509
  this.constructorId = 0x9ae91519;
2581
2510
  this.subclassOfId = 0x8af52aac;
2582
- this._slots = ['channel', 'restricted'];
2511
+ this._slots = ["channel", "restricted"];
2583
2512
  this.channel = params.channel;
2584
2513
  this.restricted = params.restricted;
2585
2514
  }
2586
2515
  /**
2587
- * Generate the TLObject from buffer.
2588
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2589
- */
2516
+ * Generate the TLObject from buffer.
2517
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2518
+ */
2590
2519
  static async read(_data, ..._args) {
2591
2520
  // no flags
2592
2521
  let channel = await TLObject.read(_data);
2593
2522
  let restricted = await Primitive.Bool.read(_data);
2594
- return new RestrictSponsoredMessages({ channel: channel, restricted: restricted });
2523
+ return new RestrictSponsoredMessages({ "channel": channel, "restricted": restricted });
2595
2524
  }
2596
2525
  /**
2597
- * Generate buffer from TLObject.
2598
- */
2526
+ * Generate buffer from TLObject.
2527
+ */
2599
2528
  write() {
2600
2529
  const b = new BytesIO();
2601
2530
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2604,7 +2533,7 @@ export class RestrictSponsoredMessages extends TLObject {
2604
2533
  b.write(this.channel.write());
2605
2534
  }
2606
2535
  if (this.restricted !== undefined) {
2607
- b.write(Primitive.Bool.write(this.restricted));
2536
+ b.write((Primitive.Bool.write(this.restricted)));
2608
2537
  }
2609
2538
  return b.buffer;
2610
2539
  }
@@ -2620,19 +2549,11 @@ export class SearchPosts extends TLObject {
2620
2549
  allowPaidStars;
2621
2550
  constructor(params) {
2622
2551
  super();
2623
- this.classType = 'functions';
2624
- this.className = 'channels.SearchPosts';
2552
+ this.classType = "functions";
2553
+ this.className = "channels.SearchPosts";
2625
2554
  this.constructorId = 0xf2c4f24d;
2626
2555
  this.subclassOfId = 0xd4b40b5e;
2627
- this._slots = [
2628
- 'hashtag',
2629
- 'query',
2630
- 'offsetRate',
2631
- 'offsetPeer',
2632
- 'offsetId',
2633
- 'limit',
2634
- 'allowPaidStars',
2635
- ];
2556
+ this._slots = ["hashtag", "query", "offsetRate", "offsetPeer", "offsetId", "limit", "allowPaidStars"];
2636
2557
  this.hashtag = params.hashtag;
2637
2558
  this.query = params.query;
2638
2559
  this.offsetRate = params.offsetRate;
@@ -2642,61 +2563,53 @@ export class SearchPosts extends TLObject {
2642
2563
  this.allowPaidStars = params.allowPaidStars;
2643
2564
  }
2644
2565
  /**
2645
- * Generate the TLObject from buffer.
2646
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2647
- */
2566
+ * Generate the TLObject from buffer.
2567
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2568
+ */
2648
2569
  static async read(_data, ..._args) {
2649
2570
  // @ts-ignore
2650
2571
  let flags = await Primitive.Int.read(_data);
2651
- let hashtag = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
2652
- let query = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
2572
+ let hashtag = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
2573
+ let query = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
2653
2574
  let offsetRate = await Primitive.Int.read(_data);
2654
2575
  let offsetPeer = await TLObject.read(_data);
2655
2576
  let offsetId = await Primitive.Int.read(_data);
2656
2577
  let limit = await Primitive.Int.read(_data);
2657
- let allowPaidStars = flags & (1 << 2) ? await Primitive.Long.read(_data) : undefined;
2658
- return new SearchPosts({
2659
- hashtag: hashtag,
2660
- query: query,
2661
- offsetRate: offsetRate,
2662
- offsetPeer: offsetPeer,
2663
- offsetId: offsetId,
2664
- limit: limit,
2665
- allowPaidStars: allowPaidStars,
2666
- });
2578
+ let allowPaidStars = (flags & (1 << 2)) ? await Primitive.Long.read(_data) : undefined;
2579
+ return new SearchPosts({ "hashtag": hashtag, "query": query, "offsetRate": offsetRate, "offsetPeer": offsetPeer, "offsetId": offsetId, "limit": limit, "allowPaidStars": allowPaidStars });
2667
2580
  }
2668
2581
  /**
2669
- * Generate buffer from TLObject.
2670
- */
2582
+ * Generate buffer from TLObject.
2583
+ */
2671
2584
  write() {
2672
2585
  const b = new BytesIO();
2673
2586
  b.write(Primitive.Int.write(this.constructorId, false));
2674
2587
  // @ts-ignore
2675
2588
  let flags = 0;
2676
- flags |= this.hashtag !== undefined ? 1 << 0 : 0;
2677
- flags |= this.query !== undefined ? 1 << 1 : 0;
2678
- flags |= this.allowPaidStars !== undefined ? 1 << 2 : 0;
2679
- b.write(Primitive.Int.write(flags));
2589
+ flags |= this.hashtag !== undefined ? (1 << 0) : 0;
2590
+ flags |= this.query !== undefined ? (1 << 1) : 0;
2591
+ flags |= this.allowPaidStars !== undefined ? (1 << 2) : 0;
2592
+ b.write((Primitive.Int.write(flags)));
2680
2593
  if (this.hashtag !== undefined) {
2681
- b.write(Primitive.String.write(this.hashtag));
2594
+ b.write((Primitive.String.write(this.hashtag)));
2682
2595
  }
2683
2596
  if (this.query !== undefined) {
2684
- b.write(Primitive.String.write(this.query));
2597
+ b.write((Primitive.String.write(this.query)));
2685
2598
  }
2686
2599
  if (this.offsetRate !== undefined) {
2687
- b.write(Primitive.Int.write(this.offsetRate));
2600
+ b.write((Primitive.Int.write(this.offsetRate)));
2688
2601
  }
2689
2602
  if (this.offsetPeer !== undefined) {
2690
2603
  b.write(this.offsetPeer.write());
2691
2604
  }
2692
2605
  if (this.offsetId !== undefined) {
2693
- b.write(Primitive.Int.write(this.offsetId));
2606
+ b.write((Primitive.Int.write(this.offsetId)));
2694
2607
  }
2695
2608
  if (this.limit !== undefined) {
2696
- b.write(Primitive.Int.write(this.limit));
2609
+ b.write((Primitive.Int.write(this.limit)));
2697
2610
  }
2698
2611
  if (this.allowPaidStars !== undefined) {
2699
- b.write(Primitive.Long.write(this.allowPaidStars));
2612
+ b.write((Primitive.Long.write(this.allowPaidStars)));
2700
2613
  }
2701
2614
  return b.buffer;
2702
2615
  }
@@ -2708,46 +2621,42 @@ export class UpdatePaidMessagesPrice extends TLObject {
2708
2621
  sendPaidMessagesStars;
2709
2622
  constructor(params) {
2710
2623
  super();
2711
- this.classType = 'functions';
2712
- this.className = 'channels.UpdatePaidMessagesPrice';
2624
+ this.classType = "functions";
2625
+ this.className = "channels.UpdatePaidMessagesPrice";
2713
2626
  this.constructorId = 0x4b12327b;
2714
2627
  this.subclassOfId = 0x8af52aac;
2715
- this._slots = ['broadcastMessagesAllowed', 'channel', 'sendPaidMessagesStars'];
2628
+ this._slots = ["broadcastMessagesAllowed", "channel", "sendPaidMessagesStars"];
2716
2629
  this.broadcastMessagesAllowed = params.broadcastMessagesAllowed;
2717
2630
  this.channel = params.channel;
2718
2631
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
2719
2632
  }
2720
2633
  /**
2721
- * Generate the TLObject from buffer.
2722
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2723
- */
2634
+ * Generate the TLObject from buffer.
2635
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2636
+ */
2724
2637
  static async read(_data, ..._args) {
2725
2638
  // @ts-ignore
2726
2639
  let flags = await Primitive.Int.read(_data);
2727
- let broadcastMessagesAllowed = flags & (1 << 0) ? true : false;
2640
+ let broadcastMessagesAllowed = (flags & (1 << 0)) ? true : false;
2728
2641
  let channel = await TLObject.read(_data);
2729
2642
  let sendPaidMessagesStars = await Primitive.Long.read(_data);
2730
- return new UpdatePaidMessagesPrice({
2731
- broadcastMessagesAllowed: broadcastMessagesAllowed,
2732
- channel: channel,
2733
- sendPaidMessagesStars: sendPaidMessagesStars,
2734
- });
2643
+ return new UpdatePaidMessagesPrice({ "broadcastMessagesAllowed": broadcastMessagesAllowed, "channel": channel, "sendPaidMessagesStars": sendPaidMessagesStars });
2735
2644
  }
2736
2645
  /**
2737
- * Generate buffer from TLObject.
2738
- */
2646
+ * Generate buffer from TLObject.
2647
+ */
2739
2648
  write() {
2740
2649
  const b = new BytesIO();
2741
2650
  b.write(Primitive.Int.write(this.constructorId, false));
2742
2651
  // @ts-ignore
2743
2652
  let flags = 0;
2744
- flags |= this.broadcastMessagesAllowed ? 1 << 0 : 0;
2745
- b.write(Primitive.Int.write(flags));
2653
+ flags |= this.broadcastMessagesAllowed ? (1 << 0) : 0;
2654
+ b.write((Primitive.Int.write(flags)));
2746
2655
  if (this.channel !== undefined) {
2747
2656
  b.write(this.channel.write());
2748
2657
  }
2749
2658
  if (this.sendPaidMessagesStars !== undefined) {
2750
- b.write(Primitive.Long.write(this.sendPaidMessagesStars));
2659
+ b.write((Primitive.Long.write(this.sendPaidMessagesStars)));
2751
2660
  }
2752
2661
  return b.buffer;
2753
2662
  }
@@ -2758,27 +2667,27 @@ export class ToggleAutotranslation extends TLObject {
2758
2667
  enabled;
2759
2668
  constructor(params) {
2760
2669
  super();
2761
- this.classType = 'functions';
2762
- this.className = 'channels.ToggleAutotranslation';
2670
+ this.classType = "functions";
2671
+ this.className = "channels.ToggleAutotranslation";
2763
2672
  this.constructorId = 0x167fc0a1;
2764
2673
  this.subclassOfId = 0x8af52aac;
2765
- this._slots = ['channel', 'enabled'];
2674
+ this._slots = ["channel", "enabled"];
2766
2675
  this.channel = params.channel;
2767
2676
  this.enabled = params.enabled;
2768
2677
  }
2769
2678
  /**
2770
- * Generate the TLObject from buffer.
2771
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2772
- */
2679
+ * Generate the TLObject from buffer.
2680
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2681
+ */
2773
2682
  static async read(_data, ..._args) {
2774
2683
  // no flags
2775
2684
  let channel = await TLObject.read(_data);
2776
2685
  let enabled = await Primitive.Bool.read(_data);
2777
- return new ToggleAutotranslation({ channel: channel, enabled: enabled });
2686
+ return new ToggleAutotranslation({ "channel": channel, "enabled": enabled });
2778
2687
  }
2779
2688
  /**
2780
- * Generate buffer from TLObject.
2781
- */
2689
+ * Generate buffer from TLObject.
2690
+ */
2782
2691
  write() {
2783
2692
  const b = new BytesIO();
2784
2693
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2787,7 +2696,7 @@ export class ToggleAutotranslation extends TLObject {
2787
2696
  b.write(this.channel.write());
2788
2697
  }
2789
2698
  if (this.enabled !== undefined) {
2790
- b.write(Primitive.Bool.write(this.enabled));
2699
+ b.write((Primitive.Bool.write(this.enabled)));
2791
2700
  }
2792
2701
  return b.buffer;
2793
2702
  }
@@ -2798,27 +2707,27 @@ export class GetMessageAuthor extends TLObject {
2798
2707
  id;
2799
2708
  constructor(params) {
2800
2709
  super();
2801
- this.classType = 'functions';
2802
- this.className = 'channels.GetMessageAuthor';
2710
+ this.classType = "functions";
2711
+ this.className = "channels.GetMessageAuthor";
2803
2712
  this.constructorId = 0xece2a0e6;
2804
2713
  this.subclassOfId = 0x2da17977;
2805
- this._slots = ['channel', 'id'];
2714
+ this._slots = ["channel", "id"];
2806
2715
  this.channel = params.channel;
2807
2716
  this.id = params.id;
2808
2717
  }
2809
2718
  /**
2810
- * Generate the TLObject from buffer.
2811
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2812
- */
2719
+ * Generate the TLObject from buffer.
2720
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2721
+ */
2813
2722
  static async read(_data, ..._args) {
2814
2723
  // no flags
2815
2724
  let channel = await TLObject.read(_data);
2816
2725
  let id = await Primitive.Int.read(_data);
2817
- return new GetMessageAuthor({ channel: channel, id: id });
2726
+ return new GetMessageAuthor({ "channel": channel, "id": id });
2818
2727
  }
2819
2728
  /**
2820
- * Generate buffer from TLObject.
2821
- */
2729
+ * Generate buffer from TLObject.
2730
+ */
2822
2731
  write() {
2823
2732
  const b = new BytesIO();
2824
2733
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2827,7 +2736,7 @@ export class GetMessageAuthor extends TLObject {
2827
2736
  b.write(this.channel.write());
2828
2737
  }
2829
2738
  if (this.id !== undefined) {
2830
- b.write(Primitive.Int.write(this.id));
2739
+ b.write((Primitive.Int.write(this.id)));
2831
2740
  }
2832
2741
  return b.buffer;
2833
2742
  }
@@ -2837,35 +2746,35 @@ export class CheckSearchPostsFlood extends TLObject {
2837
2746
  query;
2838
2747
  constructor(params) {
2839
2748
  super();
2840
- this.classType = 'functions';
2841
- this.className = 'channels.CheckSearchPostsFlood';
2749
+ this.classType = "functions";
2750
+ this.className = "channels.CheckSearchPostsFlood";
2842
2751
  this.constructorId = 0x22567115;
2843
2752
  this.subclassOfId = 0xc2c0ccc1;
2844
- this._slots = ['query'];
2753
+ this._slots = ["query"];
2845
2754
  this.query = params.query;
2846
2755
  }
2847
2756
  /**
2848
- * Generate the TLObject from buffer.
2849
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2850
- */
2757
+ * Generate the TLObject from buffer.
2758
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2759
+ */
2851
2760
  static async read(_data, ..._args) {
2852
2761
  // @ts-ignore
2853
2762
  let flags = await Primitive.Int.read(_data);
2854
- let query = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
2855
- return new CheckSearchPostsFlood({ query: query });
2763
+ let query = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
2764
+ return new CheckSearchPostsFlood({ "query": query });
2856
2765
  }
2857
2766
  /**
2858
- * Generate buffer from TLObject.
2859
- */
2767
+ * Generate buffer from TLObject.
2768
+ */
2860
2769
  write() {
2861
2770
  const b = new BytesIO();
2862
2771
  b.write(Primitive.Int.write(this.constructorId, false));
2863
2772
  // @ts-ignore
2864
2773
  let flags = 0;
2865
- flags |= this.query !== undefined ? 1 << 0 : 0;
2866
- b.write(Primitive.Int.write(flags));
2774
+ flags |= this.query !== undefined ? (1 << 0) : 0;
2775
+ b.write((Primitive.Int.write(flags)));
2867
2776
  if (this.query !== undefined) {
2868
- b.write(Primitive.String.write(this.query));
2777
+ b.write((Primitive.String.write(this.query)));
2869
2778
  }
2870
2779
  return b.buffer;
2871
2780
  }
@@ -2876,27 +2785,27 @@ export class SetMainProfileTab extends TLObject {
2876
2785
  tab;
2877
2786
  constructor(params) {
2878
2787
  super();
2879
- this.classType = 'functions';
2880
- this.className = 'channels.SetMainProfileTab';
2788
+ this.classType = "functions";
2789
+ this.className = "channels.SetMainProfileTab";
2881
2790
  this.constructorId = 0x3583fcb1;
2882
2791
  this.subclassOfId = 0xf5b399ac;
2883
- this._slots = ['channel', 'tab'];
2792
+ this._slots = ["channel", "tab"];
2884
2793
  this.channel = params.channel;
2885
2794
  this.tab = params.tab;
2886
2795
  }
2887
2796
  /**
2888
- * Generate the TLObject from buffer.
2889
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2890
- */
2797
+ * Generate the TLObject from buffer.
2798
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2799
+ */
2891
2800
  static async read(_data, ..._args) {
2892
2801
  // no flags
2893
2802
  let channel = await TLObject.read(_data);
2894
2803
  let tab = await TLObject.read(_data);
2895
- return new SetMainProfileTab({ channel: channel, tab: tab });
2804
+ return new SetMainProfileTab({ "channel": channel, "tab": tab });
2896
2805
  }
2897
2806
  /**
2898
- * Generate buffer from TLObject.
2899
- */
2807
+ * Generate buffer from TLObject.
2808
+ */
2900
2809
  write() {
2901
2810
  const b = new BytesIO();
2902
2811
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2916,27 +2825,27 @@ export class EditChannelNews extends TLObject {
2916
2825
  news;
2917
2826
  constructor(params) {
2918
2827
  super();
2919
- this.classType = 'functions';
2920
- this.className = 'channels.EditChannelNews';
2828
+ this.classType = "functions";
2829
+ this.className = "channels.EditChannelNews";
2921
2830
  this.constructorId = 0xd704f985;
2922
2831
  this.subclassOfId = 0x8af52aac;
2923
- this._slots = ['channel', 'news'];
2832
+ this._slots = ["channel", "news"];
2924
2833
  this.channel = params.channel;
2925
2834
  this.news = params.news;
2926
2835
  }
2927
2836
  /**
2928
- * Generate the TLObject from buffer.
2929
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2930
- */
2837
+ * Generate the TLObject from buffer.
2838
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2839
+ */
2931
2840
  static async read(_data, ..._args) {
2932
2841
  // no flags
2933
2842
  let channel = await TLObject.read(_data);
2934
2843
  let news = await Primitive.Bool.read(_data);
2935
- return new EditChannelNews({ channel: channel, news: news });
2844
+ return new EditChannelNews({ "channel": channel, "news": news });
2936
2845
  }
2937
2846
  /**
2938
- * Generate buffer from TLObject.
2939
- */
2847
+ * Generate buffer from TLObject.
2848
+ */
2940
2849
  write() {
2941
2850
  const b = new BytesIO();
2942
2851
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2945,7 +2854,7 @@ export class EditChannelNews extends TLObject {
2945
2854
  b.write(this.channel.write());
2946
2855
  }
2947
2856
  if (this.news !== undefined) {
2948
- b.write(Primitive.Bool.write(this.news));
2857
+ b.write((Primitive.Bool.write(this.news)));
2949
2858
  }
2950
2859
  return b.buffer;
2951
2860
  }