@tgsnake/skema 3.1.0-browser.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/src/deps.d.ts +3 -4
  2. package/dist/src/deps.js +4 -4
  3. package/dist/src/raw/class/All.d.ts +1 -1
  4. package/dist/src/raw/class/All.js +2739 -2739
  5. package/dist/src/raw/class/Raw.d.ts +7516 -7516
  6. package/dist/src/raw/class/Raw.js +20426 -26448
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1813 -1983
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +117 -128
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +714 -849
  13. package/dist/src/raw/class/tl/bots.d.ts +231 -231
  14. package/dist/src/raw/class/tl/bots.js +504 -524
  15. package/dist/src/raw/class/tl/channels.d.ts +331 -331
  16. package/dist/src/raw/class/tl/channels.js +732 -823
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +183 -196
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +138 -159
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +492 -537
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +152 -204
  25. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  26. package/dist/src/raw/class/tl/folders.js +11 -11
  27. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  28. package/dist/src/raw/class/tl/fragment.js +25 -32
  29. package/dist/src/raw/class/tl/help.d.ts +286 -286
  30. package/dist/src/raw/class/tl/help.js +618 -686
  31. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  32. package/dist/src/raw/class/tl/langpack.js +57 -57
  33. package/dist/src/raw/class/tl/messages.d.ts +1851 -1851
  34. package/dist/src/raw/class/tl/messages.js +4854 -5924
  35. package/dist/src/raw/class/tl/payments.d.ts +641 -641
  36. package/dist/src/raw/class/tl/payments.js +1734 -2198
  37. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  38. package/dist/src/raw/class/tl/phone.js +644 -779
  39. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  40. package/dist/src/raw/class/tl/photos.js +116 -139
  41. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  42. package/dist/src/raw/class/tl/premium.js +111 -133
  43. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  44. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  45. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  46. package/dist/src/raw/class/tl/stats.js +169 -268
  47. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  48. package/dist/src/raw/class/tl/stickers.js +144 -173
  49. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  50. package/dist/src/raw/class/tl/storage.js +71 -71
  51. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  52. package/dist/src/raw/class/tl/stories.js +622 -781
  53. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  54. package/dist/src/raw/class/tl/toncenter.js +47 -52
  55. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  56. package/dist/src/raw/class/tl/updates.js +175 -246
  57. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  58. package/dist/src/raw/class/tl/upload.js +155 -178
  59. package/dist/src/raw/class/tl/users.d.ts +61 -61
  60. package/dist/src/raw/class/tl/users.js +124 -124
  61. package/dist/src/raw/class/tl/wallet.d.ts +206 -206
  62. package/dist/src/raw/class/tl/wallet.js +525 -591
  63. package/dist/src/raw/class/types.d.ts +1 -1
  64. package/dist/src/raw/class/types.js +1 -1
  65. package/package.json +4 -6
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -16,41 +16,41 @@ export class BotInfo extends TLObject {
16
16
  description;
17
17
  constructor(params) {
18
18
  super();
19
- this.classType = 'types';
20
- this.className = 'bots.BotInfo';
19
+ this.classType = "types";
20
+ this.className = "bots.BotInfo";
21
21
  this.constructorId = 0xe8a775b0;
22
22
  this.subclassOfId = 0xca7b2235;
23
- this._slots = ['name', 'about', 'description'];
23
+ this._slots = ["name", "about", "description"];
24
24
  this.name = params.name;
25
25
  this.about = params.about;
26
26
  this.description = params.description;
27
27
  }
28
28
  /**
29
- * Generate the TLObject from buffer.
30
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
31
- */
29
+ * Generate the TLObject from buffer.
30
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
31
+ */
32
32
  static async read(_data, ..._args) {
33
33
  // no flags
34
34
  let name = await Primitive.String.read(_data);
35
35
  let about = await Primitive.String.read(_data);
36
36
  let description = await Primitive.String.read(_data);
37
- return new BotInfo({ name: name, about: about, description: description });
37
+ return new BotInfo({ "name": name, "about": about, "description": description });
38
38
  }
39
39
  /**
40
- * Generate buffer from TLObject.
41
- */
40
+ * Generate buffer from TLObject.
41
+ */
42
42
  write() {
43
43
  const b = new BytesIO();
44
44
  b.write(Primitive.Int.write(this.constructorId, false));
45
45
  // no flags
46
46
  if (this.name !== undefined) {
47
- b.write(Primitive.String.write(this.name));
47
+ b.write((Primitive.String.write(this.name)));
48
48
  }
49
49
  if (this.about !== undefined) {
50
- b.write(Primitive.String.write(this.about));
50
+ b.write((Primitive.String.write(this.about)));
51
51
  }
52
52
  if (this.description !== undefined) {
53
- b.write(Primitive.String.write(this.description));
53
+ b.write((Primitive.String.write(this.description)));
54
54
  }
55
55
  return b.buffer;
56
56
  }
@@ -60,40 +60,40 @@ export class PopularAppBots extends TLObject {
60
60
  users;
61
61
  constructor(params) {
62
62
  super();
63
- this.classType = 'types';
64
- this.className = 'bots.PopularAppBots';
63
+ this.classType = "types";
64
+ this.className = "bots.PopularAppBots";
65
65
  this.constructorId = 0x1991b13b;
66
66
  this.subclassOfId = 0x7b64be7d;
67
- this._slots = ['nextOffset', 'users'];
67
+ this._slots = ["nextOffset", "users"];
68
68
  this.nextOffset = params.nextOffset;
69
69
  this.users = params.users;
70
70
  }
71
71
  /**
72
- * Generate the TLObject from buffer.
73
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
74
- */
72
+ * Generate the TLObject from buffer.
73
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
74
+ */
75
75
  static async read(_data, ..._args) {
76
76
  // @ts-ignore
77
77
  let flags = await Primitive.Int.read(_data);
78
- let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
78
+ let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
79
79
  let users = await TLObject.read(_data);
80
- return new PopularAppBots({ nextOffset: nextOffset, users: users });
80
+ return new PopularAppBots({ "nextOffset": nextOffset, "users": users });
81
81
  }
82
82
  /**
83
- * Generate buffer from TLObject.
84
- */
83
+ * Generate buffer from TLObject.
84
+ */
85
85
  write() {
86
86
  const b = new BytesIO();
87
87
  b.write(Primitive.Int.write(this.constructorId, false));
88
88
  // @ts-ignore
89
89
  let flags = 0;
90
- flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
91
- b.write(Primitive.Int.write(flags));
90
+ flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
91
+ b.write((Primitive.Int.write(flags)));
92
92
  if (this.nextOffset !== undefined) {
93
- b.write(Primitive.String.write(this.nextOffset));
93
+ b.write((Primitive.String.write(this.nextOffset)));
94
94
  }
95
95
  if (this.users) {
96
- b.write(Primitive.Vector.write(this.users));
96
+ b.write((Primitive.Vector.write(this.users)));
97
97
  }
98
98
  return b.buffer;
99
99
  }
@@ -103,36 +103,36 @@ export class PreviewInfo extends TLObject {
103
103
  langCodes;
104
104
  constructor(params) {
105
105
  super();
106
- this.classType = 'types';
107
- this.className = 'bots.PreviewInfo';
106
+ this.classType = "types";
107
+ this.className = "bots.PreviewInfo";
108
108
  this.constructorId = 0xca71d64;
109
109
  this.subclassOfId = 0xf0c27f35;
110
- this._slots = ['media', 'langCodes'];
110
+ this._slots = ["media", "langCodes"];
111
111
  this.media = params.media;
112
112
  this.langCodes = params.langCodes;
113
113
  }
114
114
  /**
115
- * Generate the TLObject from buffer.
116
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
117
- */
115
+ * Generate the TLObject from buffer.
116
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
117
+ */
118
118
  static async read(_data, ..._args) {
119
119
  // no flags
120
120
  let media = await TLObject.read(_data);
121
121
  let langCodes = await TLObject.read(_data, Primitive.String);
122
- return new PreviewInfo({ media: media, langCodes: langCodes });
122
+ return new PreviewInfo({ "media": media, "langCodes": langCodes });
123
123
  }
124
124
  /**
125
- * Generate buffer from TLObject.
126
- */
125
+ * Generate buffer from TLObject.
126
+ */
127
127
  write() {
128
128
  const b = new BytesIO();
129
129
  b.write(Primitive.Int.write(this.constructorId, false));
130
130
  // no flags
131
131
  if (this.media) {
132
- b.write(Primitive.Vector.write(this.media));
132
+ b.write((Primitive.Vector.write(this.media)));
133
133
  }
134
134
  if (this.langCodes) {
135
- b.write(Primitive.Vector.write(this.langCodes, Primitive.String));
135
+ b.write((Primitive.Vector.write(this.langCodes, Primitive.String)));
136
136
  }
137
137
  return b.buffer;
138
138
  }
@@ -141,31 +141,31 @@ export class ExportedBotToken extends TLObject {
141
141
  token;
142
142
  constructor(params) {
143
143
  super();
144
- this.classType = 'types';
145
- this.className = 'bots.ExportedBotToken';
144
+ this.classType = "types";
145
+ this.className = "bots.ExportedBotToken";
146
146
  this.constructorId = 0x3c60b621;
147
147
  this.subclassOfId = 0x78496c77;
148
- this._slots = ['token'];
148
+ this._slots = ["token"];
149
149
  this.token = params.token;
150
150
  }
151
151
  /**
152
- * Generate the TLObject from buffer.
153
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
154
- */
152
+ * Generate the TLObject from buffer.
153
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
154
+ */
155
155
  static async read(_data, ..._args) {
156
156
  // no flags
157
157
  let token = await Primitive.String.read(_data);
158
- return new ExportedBotToken({ token: token });
158
+ return new ExportedBotToken({ "token": token });
159
159
  }
160
160
  /**
161
- * Generate buffer from TLObject.
162
- */
161
+ * Generate buffer from TLObject.
162
+ */
163
163
  write() {
164
164
  const b = new BytesIO();
165
165
  b.write(Primitive.Int.write(this.constructorId, false));
166
166
  // no flags
167
167
  if (this.token !== undefined) {
168
- b.write(Primitive.String.write(this.token));
168
+ b.write((Primitive.String.write(this.token)));
169
169
  }
170
170
  return b.buffer;
171
171
  }
@@ -174,31 +174,31 @@ export class RequestedButton extends TLObject {
174
174
  webappReqId;
175
175
  constructor(params) {
176
176
  super();
177
- this.classType = 'types';
178
- this.className = 'bots.RequestedButton';
177
+ this.classType = "types";
178
+ this.className = "bots.RequestedButton";
179
179
  this.constructorId = 0xf13bbcd7;
180
180
  this.subclassOfId = 0xf9df53a;
181
- this._slots = ['webappReqId'];
181
+ this._slots = ["webappReqId"];
182
182
  this.webappReqId = params.webappReqId;
183
183
  }
184
184
  /**
185
- * Generate the TLObject from buffer.
186
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
187
- */
185
+ * Generate the TLObject from buffer.
186
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
187
+ */
188
188
  static async read(_data, ..._args) {
189
189
  // no flags
190
190
  let webappReqId = await Primitive.String.read(_data);
191
- return new RequestedButton({ webappReqId: webappReqId });
191
+ return new RequestedButton({ "webappReqId": webappReqId });
192
192
  }
193
193
  /**
194
- * Generate buffer from TLObject.
195
- */
194
+ * Generate buffer from TLObject.
195
+ */
196
196
  write() {
197
197
  const b = new BytesIO();
198
198
  b.write(Primitive.Int.write(this.constructorId, false));
199
199
  // no flags
200
200
  if (this.webappReqId !== undefined) {
201
- b.write(Primitive.String.write(this.webappReqId));
201
+ b.write((Primitive.String.write(this.webappReqId)));
202
202
  }
203
203
  return b.buffer;
204
204
  }
@@ -208,38 +208,38 @@ export class AccessSettings extends TLObject {
208
208
  addUsers;
209
209
  constructor(params) {
210
210
  super();
211
- this.classType = 'types';
212
- this.className = 'bots.AccessSettings';
211
+ this.classType = "types";
212
+ this.className = "bots.AccessSettings";
213
213
  this.constructorId = 0xdd1fbf93;
214
214
  this.subclassOfId = 0xeca109c2;
215
- this._slots = ['restricted', 'addUsers'];
215
+ this._slots = ["restricted", "addUsers"];
216
216
  this.restricted = params.restricted;
217
217
  this.addUsers = params.addUsers;
218
218
  }
219
219
  /**
220
- * Generate the TLObject from buffer.
221
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
222
- */
220
+ * Generate the TLObject from buffer.
221
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
222
+ */
223
223
  static async read(_data, ..._args) {
224
224
  // @ts-ignore
225
225
  let flags = await Primitive.Int.read(_data);
226
- let restricted = flags & (1 << 0) ? true : false;
227
- let addUsers = flags & (1 << 1) ? await TLObject.read(_data) : [];
228
- return new AccessSettings({ restricted: restricted, addUsers: addUsers });
226
+ let restricted = (flags & (1 << 0)) ? true : false;
227
+ let addUsers = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
228
+ return new AccessSettings({ "restricted": restricted, "addUsers": addUsers });
229
229
  }
230
230
  /**
231
- * Generate buffer from TLObject.
232
- */
231
+ * Generate buffer from TLObject.
232
+ */
233
233
  write() {
234
234
  const b = new BytesIO();
235
235
  b.write(Primitive.Int.write(this.constructorId, false));
236
236
  // @ts-ignore
237
237
  let flags = 0;
238
- flags |= this.restricted ? 1 << 0 : 0;
239
- flags |= this.addUsers ? 1 << 1 : 0;
240
- b.write(Primitive.Int.write(flags));
238
+ flags |= this.restricted ? (1 << 0) : 0;
239
+ flags |= this.addUsers ? (1 << 1) : 0;
240
+ b.write((Primitive.Int.write(flags)));
241
241
  if (this.addUsers) {
242
- b.write(Primitive.Vector.write(this.addUsers));
242
+ b.write((Primitive.Vector.write(this.addUsers)));
243
243
  }
244
244
  return b.buffer;
245
245
  }
@@ -250,33 +250,33 @@ export class SendCustomRequest extends TLObject {
250
250
  params;
251
251
  constructor(params) {
252
252
  super();
253
- this.classType = 'functions';
254
- this.className = 'bots.SendCustomRequest';
253
+ this.classType = "functions";
254
+ this.className = "bots.SendCustomRequest";
255
255
  this.constructorId = 0xaa2769ed;
256
256
  this.subclassOfId = 0xad0352e8;
257
- this._slots = ['customMethod', 'params'];
257
+ this._slots = ["customMethod", "params"];
258
258
  this.customMethod = params.customMethod;
259
259
  this.params = params.params;
260
260
  }
261
261
  /**
262
- * Generate the TLObject from buffer.
263
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
264
- */
262
+ * Generate the TLObject from buffer.
263
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
264
+ */
265
265
  static async read(_data, ..._args) {
266
266
  // no flags
267
267
  let customMethod = await Primitive.String.read(_data);
268
268
  let params = await TLObject.read(_data);
269
- return new SendCustomRequest({ customMethod: customMethod, params: params });
269
+ return new SendCustomRequest({ "customMethod": customMethod, "params": params });
270
270
  }
271
271
  /**
272
- * Generate buffer from TLObject.
273
- */
272
+ * Generate buffer from TLObject.
273
+ */
274
274
  write() {
275
275
  const b = new BytesIO();
276
276
  b.write(Primitive.Int.write(this.constructorId, false));
277
277
  // no flags
278
278
  if (this.customMethod !== undefined) {
279
- b.write(Primitive.String.write(this.customMethod));
279
+ b.write((Primitive.String.write(this.customMethod)));
280
280
  }
281
281
  if (this.params !== undefined) {
282
282
  b.write(this.params.write());
@@ -290,33 +290,33 @@ export class AnswerWebhookJSONQuery extends TLObject {
290
290
  data;
291
291
  constructor(params) {
292
292
  super();
293
- this.classType = 'functions';
294
- this.className = 'bots.AnswerWebhookJSONQuery';
293
+ this.classType = "functions";
294
+ this.className = "bots.AnswerWebhookJSONQuery";
295
295
  this.constructorId = 0xe6213f4d;
296
296
  this.subclassOfId = 0xf5b399ac;
297
- this._slots = ['queryId', 'data'];
297
+ this._slots = ["queryId", "data"];
298
298
  this.queryId = params.queryId;
299
299
  this.data = params.data;
300
300
  }
301
301
  /**
302
- * Generate the TLObject from buffer.
303
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
304
- */
302
+ * Generate the TLObject from buffer.
303
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
304
+ */
305
305
  static async read(_data, ..._args) {
306
306
  // no flags
307
307
  let queryId = await Primitive.Long.read(_data);
308
308
  let data = await TLObject.read(_data);
309
- return new AnswerWebhookJSONQuery({ queryId: queryId, data: data });
309
+ return new AnswerWebhookJSONQuery({ "queryId": queryId, "data": data });
310
310
  }
311
311
  /**
312
- * Generate buffer from TLObject.
313
- */
312
+ * Generate buffer from TLObject.
313
+ */
314
314
  write() {
315
315
  const b = new BytesIO();
316
316
  b.write(Primitive.Int.write(this.constructorId, false));
317
317
  // no flags
318
318
  if (this.queryId !== undefined) {
319
- b.write(Primitive.Long.write(this.queryId));
319
+ b.write((Primitive.Long.write(this.queryId)));
320
320
  }
321
321
  if (this.data !== undefined) {
322
322
  b.write(this.data.write());
@@ -331,29 +331,29 @@ export class SetBotCommands extends TLObject {
331
331
  commands;
332
332
  constructor(params) {
333
333
  super();
334
- this.classType = 'functions';
335
- this.className = 'bots.SetBotCommands';
334
+ this.classType = "functions";
335
+ this.className = "bots.SetBotCommands";
336
336
  this.constructorId = 0x517165a;
337
337
  this.subclassOfId = 0xf5b399ac;
338
- this._slots = ['scope', 'langCode', 'commands'];
338
+ this._slots = ["scope", "langCode", "commands"];
339
339
  this.scope = params.scope;
340
340
  this.langCode = params.langCode;
341
341
  this.commands = params.commands;
342
342
  }
343
343
  /**
344
- * Generate the TLObject from buffer.
345
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
346
- */
344
+ * Generate the TLObject from buffer.
345
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
346
+ */
347
347
  static async read(_data, ..._args) {
348
348
  // no flags
349
349
  let scope = await TLObject.read(_data);
350
350
  let langCode = await Primitive.String.read(_data);
351
351
  let commands = await TLObject.read(_data);
352
- return new SetBotCommands({ scope: scope, langCode: langCode, commands: commands });
352
+ return new SetBotCommands({ "scope": scope, "langCode": langCode, "commands": commands });
353
353
  }
354
354
  /**
355
- * Generate buffer from TLObject.
356
- */
355
+ * Generate buffer from TLObject.
356
+ */
357
357
  write() {
358
358
  const b = new BytesIO();
359
359
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -362,10 +362,10 @@ export class SetBotCommands extends TLObject {
362
362
  b.write(this.scope.write());
363
363
  }
364
364
  if (this.langCode !== undefined) {
365
- b.write(Primitive.String.write(this.langCode));
365
+ b.write((Primitive.String.write(this.langCode)));
366
366
  }
367
367
  if (this.commands) {
368
- b.write(Primitive.Vector.write(this.commands));
368
+ b.write((Primitive.Vector.write(this.commands)));
369
369
  }
370
370
  return b.buffer;
371
371
  }
@@ -376,27 +376,27 @@ export class ResetBotCommands extends TLObject {
376
376
  langCode;
377
377
  constructor(params) {
378
378
  super();
379
- this.classType = 'functions';
380
- this.className = 'bots.ResetBotCommands';
379
+ this.classType = "functions";
380
+ this.className = "bots.ResetBotCommands";
381
381
  this.constructorId = 0x3d8de0f9;
382
382
  this.subclassOfId = 0xf5b399ac;
383
- this._slots = ['scope', 'langCode'];
383
+ this._slots = ["scope", "langCode"];
384
384
  this.scope = params.scope;
385
385
  this.langCode = params.langCode;
386
386
  }
387
387
  /**
388
- * Generate the TLObject from buffer.
389
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
390
- */
388
+ * Generate the TLObject from buffer.
389
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
390
+ */
391
391
  static async read(_data, ..._args) {
392
392
  // no flags
393
393
  let scope = await TLObject.read(_data);
394
394
  let langCode = await Primitive.String.read(_data);
395
- return new ResetBotCommands({ scope: scope, langCode: langCode });
395
+ return new ResetBotCommands({ "scope": scope, "langCode": langCode });
396
396
  }
397
397
  /**
398
- * Generate buffer from TLObject.
399
- */
398
+ * Generate buffer from TLObject.
399
+ */
400
400
  write() {
401
401
  const b = new BytesIO();
402
402
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -405,7 +405,7 @@ export class ResetBotCommands extends TLObject {
405
405
  b.write(this.scope.write());
406
406
  }
407
407
  if (this.langCode !== undefined) {
408
- b.write(Primitive.String.write(this.langCode));
408
+ b.write((Primitive.String.write(this.langCode)));
409
409
  }
410
410
  return b.buffer;
411
411
  }
@@ -416,27 +416,27 @@ export class GetBotCommands extends TLObject {
416
416
  langCode;
417
417
  constructor(params) {
418
418
  super();
419
- this.classType = 'functions';
420
- this.className = 'bots.GetBotCommands';
419
+ this.classType = "functions";
420
+ this.className = "bots.GetBotCommands";
421
421
  this.constructorId = 0xe34c0dd6;
422
422
  this.subclassOfId = 0xfae91529;
423
- this._slots = ['scope', 'langCode'];
423
+ this._slots = ["scope", "langCode"];
424
424
  this.scope = params.scope;
425
425
  this.langCode = params.langCode;
426
426
  }
427
427
  /**
428
- * Generate the TLObject from buffer.
429
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
430
- */
428
+ * Generate the TLObject from buffer.
429
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
430
+ */
431
431
  static async read(_data, ..._args) {
432
432
  // no flags
433
433
  let scope = await TLObject.read(_data);
434
434
  let langCode = await Primitive.String.read(_data);
435
- return new GetBotCommands({ scope: scope, langCode: langCode });
435
+ return new GetBotCommands({ "scope": scope, "langCode": langCode });
436
436
  }
437
437
  /**
438
- * Generate buffer from TLObject.
439
- */
438
+ * Generate buffer from TLObject.
439
+ */
440
440
  write() {
441
441
  const b = new BytesIO();
442
442
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -445,7 +445,7 @@ export class GetBotCommands extends TLObject {
445
445
  b.write(this.scope.write());
446
446
  }
447
447
  if (this.langCode !== undefined) {
448
- b.write(Primitive.String.write(this.langCode));
448
+ b.write((Primitive.String.write(this.langCode)));
449
449
  }
450
450
  return b.buffer;
451
451
  }
@@ -456,27 +456,27 @@ export class SetBotMenuButton extends TLObject {
456
456
  button;
457
457
  constructor(params) {
458
458
  super();
459
- this.classType = 'functions';
460
- this.className = 'bots.SetBotMenuButton';
459
+ this.classType = "functions";
460
+ this.className = "bots.SetBotMenuButton";
461
461
  this.constructorId = 0x4504d54f;
462
462
  this.subclassOfId = 0xf5b399ac;
463
- this._slots = ['userId', 'button'];
463
+ this._slots = ["userId", "button"];
464
464
  this.userId = params.userId;
465
465
  this.button = params.button;
466
466
  }
467
467
  /**
468
- * Generate the TLObject from buffer.
469
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
470
- */
468
+ * Generate the TLObject from buffer.
469
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
470
+ */
471
471
  static async read(_data, ..._args) {
472
472
  // no flags
473
473
  let userId = await TLObject.read(_data);
474
474
  let button = await TLObject.read(_data);
475
- return new SetBotMenuButton({ userId: userId, button: button });
475
+ return new SetBotMenuButton({ "userId": userId, "button": button });
476
476
  }
477
477
  /**
478
- * Generate buffer from TLObject.
479
- */
478
+ * Generate buffer from TLObject.
479
+ */
480
480
  write() {
481
481
  const b = new BytesIO();
482
482
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -495,25 +495,25 @@ export class GetBotMenuButton extends TLObject {
495
495
  userId;
496
496
  constructor(params) {
497
497
  super();
498
- this.classType = 'functions';
499
- this.className = 'bots.GetBotMenuButton';
498
+ this.classType = "functions";
499
+ this.className = "bots.GetBotMenuButton";
500
500
  this.constructorId = 0x9c60eb28;
501
501
  this.subclassOfId = 0x4c71bd3c;
502
- this._slots = ['userId'];
502
+ this._slots = ["userId"];
503
503
  this.userId = params.userId;
504
504
  }
505
505
  /**
506
- * Generate the TLObject from buffer.
507
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
508
- */
506
+ * Generate the TLObject from buffer.
507
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
508
+ */
509
509
  static async read(_data, ..._args) {
510
510
  // no flags
511
511
  let userId = await TLObject.read(_data);
512
- return new GetBotMenuButton({ userId: userId });
512
+ return new GetBotMenuButton({ "userId": userId });
513
513
  }
514
514
  /**
515
- * Generate buffer from TLObject.
516
- */
515
+ * Generate buffer from TLObject.
516
+ */
517
517
  write() {
518
518
  const b = new BytesIO();
519
519
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -529,25 +529,25 @@ export class SetBotBroadcastDefaultAdminRights extends TLObject {
529
529
  adminRights;
530
530
  constructor(params) {
531
531
  super();
532
- this.classType = 'functions';
533
- this.className = 'bots.SetBotBroadcastDefaultAdminRights';
532
+ this.classType = "functions";
533
+ this.className = "bots.SetBotBroadcastDefaultAdminRights";
534
534
  this.constructorId = 0x788464e1;
535
535
  this.subclassOfId = 0xf5b399ac;
536
- this._slots = ['adminRights'];
536
+ this._slots = ["adminRights"];
537
537
  this.adminRights = params.adminRights;
538
538
  }
539
539
  /**
540
- * Generate the TLObject from buffer.
541
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
542
- */
540
+ * Generate the TLObject from buffer.
541
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
542
+ */
543
543
  static async read(_data, ..._args) {
544
544
  // no flags
545
545
  let adminRights = await TLObject.read(_data);
546
- return new SetBotBroadcastDefaultAdminRights({ adminRights: adminRights });
546
+ return new SetBotBroadcastDefaultAdminRights({ "adminRights": adminRights });
547
547
  }
548
548
  /**
549
- * Generate buffer from TLObject.
550
- */
549
+ * Generate buffer from TLObject.
550
+ */
551
551
  write() {
552
552
  const b = new BytesIO();
553
553
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -563,25 +563,25 @@ export class SetBotGroupDefaultAdminRights extends TLObject {
563
563
  adminRights;
564
564
  constructor(params) {
565
565
  super();
566
- this.classType = 'functions';
567
- this.className = 'bots.SetBotGroupDefaultAdminRights';
566
+ this.classType = "functions";
567
+ this.className = "bots.SetBotGroupDefaultAdminRights";
568
568
  this.constructorId = 0x925ec9ea;
569
569
  this.subclassOfId = 0xf5b399ac;
570
- this._slots = ['adminRights'];
570
+ this._slots = ["adminRights"];
571
571
  this.adminRights = params.adminRights;
572
572
  }
573
573
  /**
574
- * Generate the TLObject from buffer.
575
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
576
- */
574
+ * Generate the TLObject from buffer.
575
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
576
+ */
577
577
  static async read(_data, ..._args) {
578
578
  // no flags
579
579
  let adminRights = await TLObject.read(_data);
580
- return new SetBotGroupDefaultAdminRights({ adminRights: adminRights });
580
+ return new SetBotGroupDefaultAdminRights({ "adminRights": adminRights });
581
581
  }
582
582
  /**
583
- * Generate buffer from TLObject.
584
- */
583
+ * Generate buffer from TLObject.
584
+ */
585
585
  write() {
586
586
  const b = new BytesIO();
587
587
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -601,11 +601,11 @@ export class SetBotInfo extends TLObject {
601
601
  description;
602
602
  constructor(params) {
603
603
  super();
604
- this.classType = 'functions';
605
- this.className = 'bots.SetBotInfo';
604
+ this.classType = "functions";
605
+ this.className = "bots.SetBotInfo";
606
606
  this.constructorId = 0x10cf3123;
607
607
  this.subclassOfId = 0xf5b399ac;
608
- this._slots = ['bot', 'langCode', 'name', 'about', 'description'];
608
+ this._slots = ["bot", "langCode", "name", "about", "description"];
609
609
  this.bot = params.bot;
610
610
  this.langCode = params.langCode;
611
611
  this.name = params.name;
@@ -613,52 +613,46 @@ export class SetBotInfo extends TLObject {
613
613
  this.description = params.description;
614
614
  }
615
615
  /**
616
- * Generate the TLObject from buffer.
617
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
618
- */
616
+ * Generate the TLObject from buffer.
617
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
618
+ */
619
619
  static async read(_data, ..._args) {
620
620
  // @ts-ignore
621
621
  let flags = await Primitive.Int.read(_data);
622
- let bot = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
622
+ let bot = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
623
623
  let langCode = await Primitive.String.read(_data);
624
- let name = flags & (1 << 3) ? await Primitive.String.read(_data) : undefined;
625
- let about = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
626
- let description = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
627
- return new SetBotInfo({
628
- bot: bot,
629
- langCode: langCode,
630
- name: name,
631
- about: about,
632
- description: description,
633
- });
634
- }
635
- /**
636
- * Generate buffer from TLObject.
637
- */
624
+ let name = (flags & (1 << 3)) ? await Primitive.String.read(_data) : undefined;
625
+ let about = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
626
+ let description = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
627
+ return new SetBotInfo({ "bot": bot, "langCode": langCode, "name": name, "about": about, "description": description });
628
+ }
629
+ /**
630
+ * Generate buffer from TLObject.
631
+ */
638
632
  write() {
639
633
  const b = new BytesIO();
640
634
  b.write(Primitive.Int.write(this.constructorId, false));
641
635
  // @ts-ignore
642
636
  let flags = 0;
643
- flags |= this.bot !== undefined ? 1 << 2 : 0;
644
- flags |= this.name !== undefined ? 1 << 3 : 0;
645
- flags |= this.about !== undefined ? 1 << 0 : 0;
646
- flags |= this.description !== undefined ? 1 << 1 : 0;
647
- b.write(Primitive.Int.write(flags));
637
+ flags |= this.bot !== undefined ? (1 << 2) : 0;
638
+ flags |= this.name !== undefined ? (1 << 3) : 0;
639
+ flags |= this.about !== undefined ? (1 << 0) : 0;
640
+ flags |= this.description !== undefined ? (1 << 1) : 0;
641
+ b.write((Primitive.Int.write(flags)));
648
642
  if (this.bot !== undefined) {
649
643
  b.write(this.bot.write());
650
644
  }
651
645
  if (this.langCode !== undefined) {
652
- b.write(Primitive.String.write(this.langCode));
646
+ b.write((Primitive.String.write(this.langCode)));
653
647
  }
654
648
  if (this.name !== undefined) {
655
- b.write(Primitive.String.write(this.name));
649
+ b.write((Primitive.String.write(this.name)));
656
650
  }
657
651
  if (this.about !== undefined) {
658
- b.write(Primitive.String.write(this.about));
652
+ b.write((Primitive.String.write(this.about)));
659
653
  }
660
654
  if (this.description !== undefined) {
661
- b.write(Primitive.String.write(this.description));
655
+ b.write((Primitive.String.write(this.description)));
662
656
  }
663
657
  return b.buffer;
664
658
  }
@@ -669,40 +663,40 @@ export class GetBotInfo extends TLObject {
669
663
  langCode;
670
664
  constructor(params) {
671
665
  super();
672
- this.classType = 'functions';
673
- this.className = 'bots.GetBotInfo';
666
+ this.classType = "functions";
667
+ this.className = "bots.GetBotInfo";
674
668
  this.constructorId = 0xdcd914fd;
675
669
  this.subclassOfId = 0xca7b2235;
676
- this._slots = ['bot', 'langCode'];
670
+ this._slots = ["bot", "langCode"];
677
671
  this.bot = params.bot;
678
672
  this.langCode = params.langCode;
679
673
  }
680
674
  /**
681
- * Generate the TLObject from buffer.
682
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
683
- */
675
+ * Generate the TLObject from buffer.
676
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
677
+ */
684
678
  static async read(_data, ..._args) {
685
679
  // @ts-ignore
686
680
  let flags = await Primitive.Int.read(_data);
687
- let bot = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
681
+ let bot = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
688
682
  let langCode = await Primitive.String.read(_data);
689
- return new GetBotInfo({ bot: bot, langCode: langCode });
683
+ return new GetBotInfo({ "bot": bot, "langCode": langCode });
690
684
  }
691
685
  /**
692
- * Generate buffer from TLObject.
693
- */
686
+ * Generate buffer from TLObject.
687
+ */
694
688
  write() {
695
689
  const b = new BytesIO();
696
690
  b.write(Primitive.Int.write(this.constructorId, false));
697
691
  // @ts-ignore
698
692
  let flags = 0;
699
- flags |= this.bot !== undefined ? 1 << 0 : 0;
700
- b.write(Primitive.Int.write(flags));
693
+ flags |= this.bot !== undefined ? (1 << 0) : 0;
694
+ b.write((Primitive.Int.write(flags)));
701
695
  if (this.bot !== undefined) {
702
696
  b.write(this.bot.write());
703
697
  }
704
698
  if (this.langCode !== undefined) {
705
- b.write(Primitive.String.write(this.langCode));
699
+ b.write((Primitive.String.write(this.langCode)));
706
700
  }
707
701
  return b.buffer;
708
702
  }
@@ -713,27 +707,27 @@ export class ReorderUsernames extends TLObject {
713
707
  order;
714
708
  constructor(params) {
715
709
  super();
716
- this.classType = 'functions';
717
- this.className = 'bots.ReorderUsernames';
710
+ this.classType = "functions";
711
+ this.className = "bots.ReorderUsernames";
718
712
  this.constructorId = 0x9709b1c2;
719
713
  this.subclassOfId = 0xf5b399ac;
720
- this._slots = ['bot', 'order'];
714
+ this._slots = ["bot", "order"];
721
715
  this.bot = params.bot;
722
716
  this.order = params.order;
723
717
  }
724
718
  /**
725
- * Generate the TLObject from buffer.
726
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
727
- */
719
+ * Generate the TLObject from buffer.
720
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
721
+ */
728
722
  static async read(_data, ..._args) {
729
723
  // no flags
730
724
  let bot = await TLObject.read(_data);
731
725
  let order = await TLObject.read(_data, Primitive.String);
732
- return new ReorderUsernames({ bot: bot, order: order });
726
+ return new ReorderUsernames({ "bot": bot, "order": order });
733
727
  }
734
728
  /**
735
- * Generate buffer from TLObject.
736
- */
729
+ * Generate buffer from TLObject.
730
+ */
737
731
  write() {
738
732
  const b = new BytesIO();
739
733
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -742,7 +736,7 @@ export class ReorderUsernames extends TLObject {
742
736
  b.write(this.bot.write());
743
737
  }
744
738
  if (this.order) {
745
- b.write(Primitive.Vector.write(this.order, Primitive.String));
739
+ b.write((Primitive.Vector.write(this.order, Primitive.String)));
746
740
  }
747
741
  return b.buffer;
748
742
  }
@@ -754,29 +748,29 @@ export class ToggleUsername extends TLObject {
754
748
  active;
755
749
  constructor(params) {
756
750
  super();
757
- this.classType = 'functions';
758
- this.className = 'bots.ToggleUsername';
751
+ this.classType = "functions";
752
+ this.className = "bots.ToggleUsername";
759
753
  this.constructorId = 0x53ca973;
760
754
  this.subclassOfId = 0xf5b399ac;
761
- this._slots = ['bot', 'username', 'active'];
755
+ this._slots = ["bot", "username", "active"];
762
756
  this.bot = params.bot;
763
757
  this.username = params.username;
764
758
  this.active = params.active;
765
759
  }
766
760
  /**
767
- * Generate the TLObject from buffer.
768
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
769
- */
761
+ * Generate the TLObject from buffer.
762
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
763
+ */
770
764
  static async read(_data, ..._args) {
771
765
  // no flags
772
766
  let bot = await TLObject.read(_data);
773
767
  let username = await Primitive.String.read(_data);
774
768
  let active = await Primitive.Bool.read(_data);
775
- return new ToggleUsername({ bot: bot, username: username, active: active });
769
+ return new ToggleUsername({ "bot": bot, "username": username, "active": active });
776
770
  }
777
771
  /**
778
- * Generate buffer from TLObject.
779
- */
772
+ * Generate buffer from TLObject.
773
+ */
780
774
  write() {
781
775
  const b = new BytesIO();
782
776
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -785,10 +779,10 @@ export class ToggleUsername extends TLObject {
785
779
  b.write(this.bot.write());
786
780
  }
787
781
  if (this.username !== undefined) {
788
- b.write(Primitive.String.write(this.username));
782
+ b.write((Primitive.String.write(this.username)));
789
783
  }
790
784
  if (this.active !== undefined) {
791
- b.write(Primitive.Bool.write(this.active));
785
+ b.write((Primitive.Bool.write(this.active)));
792
786
  }
793
787
  return b.buffer;
794
788
  }
@@ -798,25 +792,25 @@ export class CanSendMessage extends TLObject {
798
792
  bot;
799
793
  constructor(params) {
800
794
  super();
801
- this.classType = 'functions';
802
- this.className = 'bots.CanSendMessage';
795
+ this.classType = "functions";
796
+ this.className = "bots.CanSendMessage";
803
797
  this.constructorId = 0x1359f4e6;
804
798
  this.subclassOfId = 0xf5b399ac;
805
- this._slots = ['bot'];
799
+ this._slots = ["bot"];
806
800
  this.bot = params.bot;
807
801
  }
808
802
  /**
809
- * Generate the TLObject from buffer.
810
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
811
- */
803
+ * Generate the TLObject from buffer.
804
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
805
+ */
812
806
  static async read(_data, ..._args) {
813
807
  // no flags
814
808
  let bot = await TLObject.read(_data);
815
- return new CanSendMessage({ bot: bot });
809
+ return new CanSendMessage({ "bot": bot });
816
810
  }
817
811
  /**
818
- * Generate buffer from TLObject.
819
- */
812
+ * Generate buffer from TLObject.
813
+ */
820
814
  write() {
821
815
  const b = new BytesIO();
822
816
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -832,25 +826,25 @@ export class AllowSendMessage extends TLObject {
832
826
  bot;
833
827
  constructor(params) {
834
828
  super();
835
- this.classType = 'functions';
836
- this.className = 'bots.AllowSendMessage';
829
+ this.classType = "functions";
830
+ this.className = "bots.AllowSendMessage";
837
831
  this.constructorId = 0xf132e3ef;
838
832
  this.subclassOfId = 0x8af52aac;
839
- this._slots = ['bot'];
833
+ this._slots = ["bot"];
840
834
  this.bot = params.bot;
841
835
  }
842
836
  /**
843
- * Generate the TLObject from buffer.
844
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
845
- */
837
+ * Generate the TLObject from buffer.
838
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
839
+ */
846
840
  static async read(_data, ..._args) {
847
841
  // no flags
848
842
  let bot = await TLObject.read(_data);
849
- return new AllowSendMessage({ bot: bot });
843
+ return new AllowSendMessage({ "bot": bot });
850
844
  }
851
845
  /**
852
- * Generate buffer from TLObject.
853
- */
846
+ * Generate buffer from TLObject.
847
+ */
854
848
  write() {
855
849
  const b = new BytesIO();
856
850
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -868,29 +862,29 @@ export class InvokeWebViewCustomMethod extends TLObject {
868
862
  params;
869
863
  constructor(params) {
870
864
  super();
871
- this.classType = 'functions';
872
- this.className = 'bots.InvokeWebViewCustomMethod';
865
+ this.classType = "functions";
866
+ this.className = "bots.InvokeWebViewCustomMethod";
873
867
  this.constructorId = 0x87fc5e7;
874
868
  this.subclassOfId = 0xad0352e8;
875
- this._slots = ['bot', 'customMethod', 'params'];
869
+ this._slots = ["bot", "customMethod", "params"];
876
870
  this.bot = params.bot;
877
871
  this.customMethod = params.customMethod;
878
872
  this.params = params.params;
879
873
  }
880
874
  /**
881
- * Generate the TLObject from buffer.
882
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
883
- */
875
+ * Generate the TLObject from buffer.
876
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
877
+ */
884
878
  static async read(_data, ..._args) {
885
879
  // no flags
886
880
  let bot = await TLObject.read(_data);
887
881
  let customMethod = await Primitive.String.read(_data);
888
882
  let params = await TLObject.read(_data);
889
- return new InvokeWebViewCustomMethod({ bot: bot, customMethod: customMethod, params: params });
883
+ return new InvokeWebViewCustomMethod({ "bot": bot, "customMethod": customMethod, "params": params });
890
884
  }
891
885
  /**
892
- * Generate buffer from TLObject.
893
- */
886
+ * Generate buffer from TLObject.
887
+ */
894
888
  write() {
895
889
  const b = new BytesIO();
896
890
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -899,7 +893,7 @@ export class InvokeWebViewCustomMethod extends TLObject {
899
893
  b.write(this.bot.write());
900
894
  }
901
895
  if (this.customMethod !== undefined) {
902
- b.write(Primitive.String.write(this.customMethod));
896
+ b.write((Primitive.String.write(this.customMethod)));
903
897
  }
904
898
  if (this.params !== undefined) {
905
899
  b.write(this.params.write());
@@ -913,36 +907,36 @@ export class GetPopularAppBots extends TLObject {
913
907
  limit;
914
908
  constructor(params) {
915
909
  super();
916
- this.classType = 'functions';
917
- this.className = 'bots.GetPopularAppBots';
910
+ this.classType = "functions";
911
+ this.className = "bots.GetPopularAppBots";
918
912
  this.constructorId = 0xc2510192;
919
913
  this.subclassOfId = 0x7b64be7d;
920
- this._slots = ['offset', 'limit'];
914
+ this._slots = ["offset", "limit"];
921
915
  this.offset = params.offset;
922
916
  this.limit = params.limit;
923
917
  }
924
918
  /**
925
- * Generate the TLObject from buffer.
926
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
927
- */
919
+ * Generate the TLObject from buffer.
920
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
921
+ */
928
922
  static async read(_data, ..._args) {
929
923
  // no flags
930
924
  let offset = await Primitive.String.read(_data);
931
925
  let limit = await Primitive.Int.read(_data);
932
- return new GetPopularAppBots({ offset: offset, limit: limit });
926
+ return new GetPopularAppBots({ "offset": offset, "limit": limit });
933
927
  }
934
928
  /**
935
- * Generate buffer from TLObject.
936
- */
929
+ * Generate buffer from TLObject.
930
+ */
937
931
  write() {
938
932
  const b = new BytesIO();
939
933
  b.write(Primitive.Int.write(this.constructorId, false));
940
934
  // no flags
941
935
  if (this.offset !== undefined) {
942
- b.write(Primitive.String.write(this.offset));
936
+ b.write((Primitive.String.write(this.offset)));
943
937
  }
944
938
  if (this.limit !== undefined) {
945
- b.write(Primitive.Int.write(this.limit));
939
+ b.write((Primitive.Int.write(this.limit)));
946
940
  }
947
941
  return b.buffer;
948
942
  }
@@ -954,29 +948,29 @@ export class AddPreviewMedia extends TLObject {
954
948
  media;
955
949
  constructor(params) {
956
950
  super();
957
- this.classType = 'functions';
958
- this.className = 'bots.AddPreviewMedia';
951
+ this.classType = "functions";
952
+ this.className = "bots.AddPreviewMedia";
959
953
  this.constructorId = 0x17aeb75a;
960
954
  this.subclassOfId = 0x562abc2d;
961
- this._slots = ['bot', 'langCode', 'media'];
955
+ this._slots = ["bot", "langCode", "media"];
962
956
  this.bot = params.bot;
963
957
  this.langCode = params.langCode;
964
958
  this.media = params.media;
965
959
  }
966
960
  /**
967
- * Generate the TLObject from buffer.
968
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
969
- */
961
+ * Generate the TLObject from buffer.
962
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
963
+ */
970
964
  static async read(_data, ..._args) {
971
965
  // no flags
972
966
  let bot = await TLObject.read(_data);
973
967
  let langCode = await Primitive.String.read(_data);
974
968
  let media = await TLObject.read(_data);
975
- return new AddPreviewMedia({ bot: bot, langCode: langCode, media: media });
969
+ return new AddPreviewMedia({ "bot": bot, "langCode": langCode, "media": media });
976
970
  }
977
971
  /**
978
- * Generate buffer from TLObject.
979
- */
972
+ * Generate buffer from TLObject.
973
+ */
980
974
  write() {
981
975
  const b = new BytesIO();
982
976
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -985,7 +979,7 @@ export class AddPreviewMedia extends TLObject {
985
979
  b.write(this.bot.write());
986
980
  }
987
981
  if (this.langCode !== undefined) {
988
- b.write(Primitive.String.write(this.langCode));
982
+ b.write((Primitive.String.write(this.langCode)));
989
983
  }
990
984
  if (this.media !== undefined) {
991
985
  b.write(this.media.write());
@@ -1001,31 +995,31 @@ export class EditPreviewMedia extends TLObject {
1001
995
  newMedia;
1002
996
  constructor(params) {
1003
997
  super();
1004
- this.classType = 'functions';
1005
- this.className = 'bots.EditPreviewMedia';
998
+ this.classType = "functions";
999
+ this.className = "bots.EditPreviewMedia";
1006
1000
  this.constructorId = 0x8525606f;
1007
1001
  this.subclassOfId = 0x562abc2d;
1008
- this._slots = ['bot', 'langCode', 'media', 'newMedia'];
1002
+ this._slots = ["bot", "langCode", "media", "newMedia"];
1009
1003
  this.bot = params.bot;
1010
1004
  this.langCode = params.langCode;
1011
1005
  this.media = params.media;
1012
1006
  this.newMedia = params.newMedia;
1013
1007
  }
1014
1008
  /**
1015
- * Generate the TLObject from buffer.
1016
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1017
- */
1009
+ * Generate the TLObject from buffer.
1010
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1011
+ */
1018
1012
  static async read(_data, ..._args) {
1019
1013
  // no flags
1020
1014
  let bot = await TLObject.read(_data);
1021
1015
  let langCode = await Primitive.String.read(_data);
1022
1016
  let media = await TLObject.read(_data);
1023
1017
  let newMedia = await TLObject.read(_data);
1024
- return new EditPreviewMedia({ bot: bot, langCode: langCode, media: media, newMedia: newMedia });
1018
+ return new EditPreviewMedia({ "bot": bot, "langCode": langCode, "media": media, "newMedia": newMedia });
1025
1019
  }
1026
1020
  /**
1027
- * Generate buffer from TLObject.
1028
- */
1021
+ * Generate buffer from TLObject.
1022
+ */
1029
1023
  write() {
1030
1024
  const b = new BytesIO();
1031
1025
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1034,7 +1028,7 @@ export class EditPreviewMedia extends TLObject {
1034
1028
  b.write(this.bot.write());
1035
1029
  }
1036
1030
  if (this.langCode !== undefined) {
1037
- b.write(Primitive.String.write(this.langCode));
1031
+ b.write((Primitive.String.write(this.langCode)));
1038
1032
  }
1039
1033
  if (this.media !== undefined) {
1040
1034
  b.write(this.media.write());
@@ -1052,29 +1046,29 @@ export class DeletePreviewMedia extends TLObject {
1052
1046
  media;
1053
1047
  constructor(params) {
1054
1048
  super();
1055
- this.classType = 'functions';
1056
- this.className = 'bots.DeletePreviewMedia';
1049
+ this.classType = "functions";
1050
+ this.className = "bots.DeletePreviewMedia";
1057
1051
  this.constructorId = 0x2d0135b3;
1058
1052
  this.subclassOfId = 0xf5b399ac;
1059
- this._slots = ['bot', 'langCode', 'media'];
1053
+ this._slots = ["bot", "langCode", "media"];
1060
1054
  this.bot = params.bot;
1061
1055
  this.langCode = params.langCode;
1062
1056
  this.media = params.media;
1063
1057
  }
1064
1058
  /**
1065
- * Generate the TLObject from buffer.
1066
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1067
- */
1059
+ * Generate the TLObject from buffer.
1060
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1061
+ */
1068
1062
  static async read(_data, ..._args) {
1069
1063
  // no flags
1070
1064
  let bot = await TLObject.read(_data);
1071
1065
  let langCode = await Primitive.String.read(_data);
1072
1066
  let media = await TLObject.read(_data);
1073
- return new DeletePreviewMedia({ bot: bot, langCode: langCode, media: media });
1067
+ return new DeletePreviewMedia({ "bot": bot, "langCode": langCode, "media": media });
1074
1068
  }
1075
1069
  /**
1076
- * Generate buffer from TLObject.
1077
- */
1070
+ * Generate buffer from TLObject.
1071
+ */
1078
1072
  write() {
1079
1073
  const b = new BytesIO();
1080
1074
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1083,10 +1077,10 @@ export class DeletePreviewMedia extends TLObject {
1083
1077
  b.write(this.bot.write());
1084
1078
  }
1085
1079
  if (this.langCode !== undefined) {
1086
- b.write(Primitive.String.write(this.langCode));
1080
+ b.write((Primitive.String.write(this.langCode)));
1087
1081
  }
1088
1082
  if (this.media) {
1089
- b.write(Primitive.Vector.write(this.media));
1083
+ b.write((Primitive.Vector.write(this.media)));
1090
1084
  }
1091
1085
  return b.buffer;
1092
1086
  }
@@ -1098,29 +1092,29 @@ export class ReorderPreviewMedias extends TLObject {
1098
1092
  order;
1099
1093
  constructor(params) {
1100
1094
  super();
1101
- this.classType = 'functions';
1102
- this.className = 'bots.ReorderPreviewMedias';
1095
+ this.classType = "functions";
1096
+ this.className = "bots.ReorderPreviewMedias";
1103
1097
  this.constructorId = 0xb627f3aa;
1104
1098
  this.subclassOfId = 0xf5b399ac;
1105
- this._slots = ['bot', 'langCode', 'order'];
1099
+ this._slots = ["bot", "langCode", "order"];
1106
1100
  this.bot = params.bot;
1107
1101
  this.langCode = params.langCode;
1108
1102
  this.order = params.order;
1109
1103
  }
1110
1104
  /**
1111
- * Generate the TLObject from buffer.
1112
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1113
- */
1105
+ * Generate the TLObject from buffer.
1106
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1107
+ */
1114
1108
  static async read(_data, ..._args) {
1115
1109
  // no flags
1116
1110
  let bot = await TLObject.read(_data);
1117
1111
  let langCode = await Primitive.String.read(_data);
1118
1112
  let order = await TLObject.read(_data);
1119
- return new ReorderPreviewMedias({ bot: bot, langCode: langCode, order: order });
1113
+ return new ReorderPreviewMedias({ "bot": bot, "langCode": langCode, "order": order });
1120
1114
  }
1121
1115
  /**
1122
- * Generate buffer from TLObject.
1123
- */
1116
+ * Generate buffer from TLObject.
1117
+ */
1124
1118
  write() {
1125
1119
  const b = new BytesIO();
1126
1120
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1129,10 +1123,10 @@ export class ReorderPreviewMedias extends TLObject {
1129
1123
  b.write(this.bot.write());
1130
1124
  }
1131
1125
  if (this.langCode !== undefined) {
1132
- b.write(Primitive.String.write(this.langCode));
1126
+ b.write((Primitive.String.write(this.langCode)));
1133
1127
  }
1134
1128
  if (this.order) {
1135
- b.write(Primitive.Vector.write(this.order));
1129
+ b.write((Primitive.Vector.write(this.order)));
1136
1130
  }
1137
1131
  return b.buffer;
1138
1132
  }
@@ -1143,27 +1137,27 @@ export class GetPreviewInfo extends TLObject {
1143
1137
  langCode;
1144
1138
  constructor(params) {
1145
1139
  super();
1146
- this.classType = 'functions';
1147
- this.className = 'bots.GetPreviewInfo';
1140
+ this.classType = "functions";
1141
+ this.className = "bots.GetPreviewInfo";
1148
1142
  this.constructorId = 0x423ab3ad;
1149
1143
  this.subclassOfId = 0xf0c27f35;
1150
- this._slots = ['bot', 'langCode'];
1144
+ this._slots = ["bot", "langCode"];
1151
1145
  this.bot = params.bot;
1152
1146
  this.langCode = params.langCode;
1153
1147
  }
1154
1148
  /**
1155
- * Generate the TLObject from buffer.
1156
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1157
- */
1149
+ * Generate the TLObject from buffer.
1150
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1151
+ */
1158
1152
  static async read(_data, ..._args) {
1159
1153
  // no flags
1160
1154
  let bot = await TLObject.read(_data);
1161
1155
  let langCode = await Primitive.String.read(_data);
1162
- return new GetPreviewInfo({ bot: bot, langCode: langCode });
1156
+ return new GetPreviewInfo({ "bot": bot, "langCode": langCode });
1163
1157
  }
1164
1158
  /**
1165
- * Generate buffer from TLObject.
1166
- */
1159
+ * Generate buffer from TLObject.
1160
+ */
1167
1161
  write() {
1168
1162
  const b = new BytesIO();
1169
1163
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1172,7 +1166,7 @@ export class GetPreviewInfo extends TLObject {
1172
1166
  b.write(this.bot.write());
1173
1167
  }
1174
1168
  if (this.langCode !== undefined) {
1175
- b.write(Primitive.String.write(this.langCode));
1169
+ b.write((Primitive.String.write(this.langCode)));
1176
1170
  }
1177
1171
  return b.buffer;
1178
1172
  }
@@ -1182,25 +1176,25 @@ export class GetPreviewMedias extends TLObject {
1182
1176
  bot;
1183
1177
  constructor(params) {
1184
1178
  super();
1185
- this.classType = 'functions';
1186
- this.className = 'bots.GetPreviewMedias';
1179
+ this.classType = "functions";
1180
+ this.className = "bots.GetPreviewMedias";
1187
1181
  this.constructorId = 0xa2a5594d;
1188
1182
  this.subclassOfId = 0xf9862a78;
1189
- this._slots = ['bot'];
1183
+ this._slots = ["bot"];
1190
1184
  this.bot = params.bot;
1191
1185
  }
1192
1186
  /**
1193
- * Generate the TLObject from buffer.
1194
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1195
- */
1187
+ * Generate the TLObject from buffer.
1188
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1189
+ */
1196
1190
  static async read(_data, ..._args) {
1197
1191
  // no flags
1198
1192
  let bot = await TLObject.read(_data);
1199
- return new GetPreviewMedias({ bot: bot });
1193
+ return new GetPreviewMedias({ "bot": bot });
1200
1194
  }
1201
1195
  /**
1202
- * Generate buffer from TLObject.
1203
- */
1196
+ * Generate buffer from TLObject.
1197
+ */
1204
1198
  write() {
1205
1199
  const b = new BytesIO();
1206
1200
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1217,27 +1211,27 @@ export class UpdateUserEmojiStatus extends TLObject {
1217
1211
  emojiStatus;
1218
1212
  constructor(params) {
1219
1213
  super();
1220
- this.classType = 'functions';
1221
- this.className = 'bots.UpdateUserEmojiStatus';
1214
+ this.classType = "functions";
1215
+ this.className = "bots.UpdateUserEmojiStatus";
1222
1216
  this.constructorId = 0xed9f30c5;
1223
1217
  this.subclassOfId = 0xf5b399ac;
1224
- this._slots = ['userId', 'emojiStatus'];
1218
+ this._slots = ["userId", "emojiStatus"];
1225
1219
  this.userId = params.userId;
1226
1220
  this.emojiStatus = params.emojiStatus;
1227
1221
  }
1228
1222
  /**
1229
- * Generate the TLObject from buffer.
1230
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1231
- */
1223
+ * Generate the TLObject from buffer.
1224
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1225
+ */
1232
1226
  static async read(_data, ..._args) {
1233
1227
  // no flags
1234
1228
  let userId = await TLObject.read(_data);
1235
1229
  let emojiStatus = await TLObject.read(_data);
1236
- return new UpdateUserEmojiStatus({ userId: userId, emojiStatus: emojiStatus });
1230
+ return new UpdateUserEmojiStatus({ "userId": userId, "emojiStatus": emojiStatus });
1237
1231
  }
1238
1232
  /**
1239
- * Generate buffer from TLObject.
1240
- */
1233
+ * Generate buffer from TLObject.
1234
+ */
1241
1235
  write() {
1242
1236
  const b = new BytesIO();
1243
1237
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1257,27 +1251,27 @@ export class ToggleUserEmojiStatusPermission extends TLObject {
1257
1251
  enabled;
1258
1252
  constructor(params) {
1259
1253
  super();
1260
- this.classType = 'functions';
1261
- this.className = 'bots.ToggleUserEmojiStatusPermission';
1254
+ this.classType = "functions";
1255
+ this.className = "bots.ToggleUserEmojiStatusPermission";
1262
1256
  this.constructorId = 0x6de6392;
1263
1257
  this.subclassOfId = 0xf5b399ac;
1264
- this._slots = ['bot', 'enabled'];
1258
+ this._slots = ["bot", "enabled"];
1265
1259
  this.bot = params.bot;
1266
1260
  this.enabled = params.enabled;
1267
1261
  }
1268
1262
  /**
1269
- * Generate the TLObject from buffer.
1270
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1271
- */
1263
+ * Generate the TLObject from buffer.
1264
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1265
+ */
1272
1266
  static async read(_data, ..._args) {
1273
1267
  // no flags
1274
1268
  let bot = await TLObject.read(_data);
1275
1269
  let enabled = await Primitive.Bool.read(_data);
1276
- return new ToggleUserEmojiStatusPermission({ bot: bot, enabled: enabled });
1270
+ return new ToggleUserEmojiStatusPermission({ "bot": bot, "enabled": enabled });
1277
1271
  }
1278
1272
  /**
1279
- * Generate buffer from TLObject.
1280
- */
1273
+ * Generate buffer from TLObject.
1274
+ */
1281
1275
  write() {
1282
1276
  const b = new BytesIO();
1283
1277
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1286,7 +1280,7 @@ export class ToggleUserEmojiStatusPermission extends TLObject {
1286
1280
  b.write(this.bot.write());
1287
1281
  }
1288
1282
  if (this.enabled !== undefined) {
1289
- b.write(Primitive.Bool.write(this.enabled));
1283
+ b.write((Primitive.Bool.write(this.enabled)));
1290
1284
  }
1291
1285
  return b.buffer;
1292
1286
  }
@@ -1298,29 +1292,29 @@ export class CheckDownloadFileParams extends TLObject {
1298
1292
  url;
1299
1293
  constructor(params) {
1300
1294
  super();
1301
- this.classType = 'functions';
1302
- this.className = 'bots.CheckDownloadFileParams';
1295
+ this.classType = "functions";
1296
+ this.className = "bots.CheckDownloadFileParams";
1303
1297
  this.constructorId = 0x50077589;
1304
1298
  this.subclassOfId = 0xf5b399ac;
1305
- this._slots = ['bot', 'fileName', 'url'];
1299
+ this._slots = ["bot", "fileName", "url"];
1306
1300
  this.bot = params.bot;
1307
1301
  this.fileName = params.fileName;
1308
1302
  this.url = params.url;
1309
1303
  }
1310
1304
  /**
1311
- * Generate the TLObject from buffer.
1312
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1313
- */
1305
+ * Generate the TLObject from buffer.
1306
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1307
+ */
1314
1308
  static async read(_data, ..._args) {
1315
1309
  // no flags
1316
1310
  let bot = await TLObject.read(_data);
1317
1311
  let fileName = await Primitive.String.read(_data);
1318
1312
  let url = await Primitive.String.read(_data);
1319
- return new CheckDownloadFileParams({ bot: bot, fileName: fileName, url: url });
1313
+ return new CheckDownloadFileParams({ "bot": bot, "fileName": fileName, "url": url });
1320
1314
  }
1321
1315
  /**
1322
- * Generate buffer from TLObject.
1323
- */
1316
+ * Generate buffer from TLObject.
1317
+ */
1324
1318
  write() {
1325
1319
  const b = new BytesIO();
1326
1320
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1329,10 +1323,10 @@ export class CheckDownloadFileParams extends TLObject {
1329
1323
  b.write(this.bot.write());
1330
1324
  }
1331
1325
  if (this.fileName !== undefined) {
1332
- b.write(Primitive.String.write(this.fileName));
1326
+ b.write((Primitive.String.write(this.fileName)));
1333
1327
  }
1334
1328
  if (this.url !== undefined) {
1335
- b.write(Primitive.String.write(this.url));
1329
+ b.write((Primitive.String.write(this.url)));
1336
1330
  }
1337
1331
  return b.buffer;
1338
1332
  }
@@ -1341,23 +1335,23 @@ export class GetAdminedBots extends TLObject {
1341
1335
  __response__;
1342
1336
  constructor() {
1343
1337
  super();
1344
- this.classType = 'functions';
1345
- this.className = 'bots.GetAdminedBots';
1338
+ this.classType = "functions";
1339
+ this.className = "bots.GetAdminedBots";
1346
1340
  this.constructorId = 0xb0711d83;
1347
1341
  this.subclassOfId = 0x406da4d;
1348
1342
  this._slots = [];
1349
1343
  }
1350
1344
  /**
1351
- * Generate the TLObject from buffer.
1352
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1353
- */
1345
+ * Generate the TLObject from buffer.
1346
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1347
+ */
1354
1348
  static async read(_data, ..._args) {
1355
1349
  // no flags
1356
1350
  return new GetAdminedBots();
1357
1351
  }
1358
1352
  /**
1359
- * Generate buffer from TLObject.
1360
- */
1353
+ * Generate buffer from TLObject.
1354
+ */
1361
1355
  write() {
1362
1356
  const b = new BytesIO();
1363
1357
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1372,49 +1366,45 @@ export class UpdateStarRefProgram extends TLObject {
1372
1366
  durationMonths;
1373
1367
  constructor(params) {
1374
1368
  super();
1375
- this.classType = 'functions';
1376
- this.className = 'bots.UpdateStarRefProgram';
1369
+ this.classType = "functions";
1370
+ this.className = "bots.UpdateStarRefProgram";
1377
1371
  this.constructorId = 0x778b5ab3;
1378
1372
  this.subclassOfId = 0x9888e002;
1379
- this._slots = ['bot', 'commissionPermille', 'durationMonths'];
1373
+ this._slots = ["bot", "commissionPermille", "durationMonths"];
1380
1374
  this.bot = params.bot;
1381
1375
  this.commissionPermille = params.commissionPermille;
1382
1376
  this.durationMonths = params.durationMonths;
1383
1377
  }
1384
1378
  /**
1385
- * Generate the TLObject from buffer.
1386
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1387
- */
1379
+ * Generate the TLObject from buffer.
1380
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1381
+ */
1388
1382
  static async read(_data, ..._args) {
1389
1383
  // @ts-ignore
1390
1384
  let flags = await Primitive.Int.read(_data);
1391
1385
  let bot = await TLObject.read(_data);
1392
1386
  let commissionPermille = await Primitive.Int.read(_data);
1393
- let durationMonths = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
1394
- return new UpdateStarRefProgram({
1395
- bot: bot,
1396
- commissionPermille: commissionPermille,
1397
- durationMonths: durationMonths,
1398
- });
1387
+ let durationMonths = (flags & (1 << 0)) ? await Primitive.Int.read(_data) : undefined;
1388
+ return new UpdateStarRefProgram({ "bot": bot, "commissionPermille": commissionPermille, "durationMonths": durationMonths });
1399
1389
  }
1400
1390
  /**
1401
- * Generate buffer from TLObject.
1402
- */
1391
+ * Generate buffer from TLObject.
1392
+ */
1403
1393
  write() {
1404
1394
  const b = new BytesIO();
1405
1395
  b.write(Primitive.Int.write(this.constructorId, false));
1406
1396
  // @ts-ignore
1407
1397
  let flags = 0;
1408
- flags |= this.durationMonths !== undefined ? 1 << 0 : 0;
1409
- b.write(Primitive.Int.write(flags));
1398
+ flags |= this.durationMonths !== undefined ? (1 << 0) : 0;
1399
+ b.write((Primitive.Int.write(flags)));
1410
1400
  if (this.bot !== undefined) {
1411
1401
  b.write(this.bot.write());
1412
1402
  }
1413
1403
  if (this.commissionPermille !== undefined) {
1414
- b.write(Primitive.Int.write(this.commissionPermille));
1404
+ b.write((Primitive.Int.write(this.commissionPermille)));
1415
1405
  }
1416
1406
  if (this.durationMonths !== undefined) {
1417
- b.write(Primitive.Int.write(this.durationMonths));
1407
+ b.write((Primitive.Int.write(this.durationMonths)));
1418
1408
  }
1419
1409
  return b.buffer;
1420
1410
  }
@@ -1427,46 +1417,41 @@ export class SetCustomVerification extends TLObject {
1427
1417
  customDescription;
1428
1418
  constructor(params) {
1429
1419
  super();
1430
- this.classType = 'functions';
1431
- this.className = 'bots.SetCustomVerification';
1420
+ this.classType = "functions";
1421
+ this.className = "bots.SetCustomVerification";
1432
1422
  this.constructorId = 0xf4946757;
1433
1423
  this.subclassOfId = 0xf5b399ac;
1434
- this._slots = ['enabled', 'bot', 'peer', 'customDescription'];
1424
+ this._slots = ["enabled", "bot", "peer", "customDescription"];
1435
1425
  this.enabled = params.enabled;
1436
1426
  this.bot = params.bot;
1437
1427
  this.peer = params.peer;
1438
1428
  this.customDescription = params.customDescription;
1439
1429
  }
1440
1430
  /**
1441
- * Generate the TLObject from buffer.
1442
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1443
- */
1431
+ * Generate the TLObject from buffer.
1432
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1433
+ */
1444
1434
  static async read(_data, ..._args) {
1445
1435
  // @ts-ignore
1446
1436
  let flags = await Primitive.Int.read(_data);
1447
- let enabled = flags & (1 << 1) ? true : false;
1448
- let bot = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
1437
+ let enabled = (flags & (1 << 1)) ? true : false;
1438
+ let bot = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
1449
1439
  let peer = await TLObject.read(_data);
1450
- let customDescription = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
1451
- return new SetCustomVerification({
1452
- enabled: enabled,
1453
- bot: bot,
1454
- peer: peer,
1455
- customDescription: customDescription,
1456
- });
1440
+ let customDescription = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
1441
+ return new SetCustomVerification({ "enabled": enabled, "bot": bot, "peer": peer, "customDescription": customDescription });
1457
1442
  }
1458
1443
  /**
1459
- * Generate buffer from TLObject.
1460
- */
1444
+ * Generate buffer from TLObject.
1445
+ */
1461
1446
  write() {
1462
1447
  const b = new BytesIO();
1463
1448
  b.write(Primitive.Int.write(this.constructorId, false));
1464
1449
  // @ts-ignore
1465
1450
  let flags = 0;
1466
- flags |= this.enabled ? 1 << 1 : 0;
1467
- flags |= this.bot !== undefined ? 1 << 0 : 0;
1468
- flags |= this.customDescription !== undefined ? 1 << 2 : 0;
1469
- b.write(Primitive.Int.write(flags));
1451
+ flags |= this.enabled ? (1 << 1) : 0;
1452
+ flags |= this.bot !== undefined ? (1 << 0) : 0;
1453
+ flags |= this.customDescription !== undefined ? (1 << 2) : 0;
1454
+ b.write((Primitive.Int.write(flags)));
1470
1455
  if (this.bot !== undefined) {
1471
1456
  b.write(this.bot.write());
1472
1457
  }
@@ -1484,25 +1469,25 @@ export class GetBotRecommendations extends TLObject {
1484
1469
  bot;
1485
1470
  constructor(params) {
1486
1471
  super();
1487
- this.classType = 'functions';
1488
- this.className = 'bots.GetBotRecommendations';
1472
+ this.classType = "functions";
1473
+ this.className = "bots.GetBotRecommendations";
1489
1474
  this.constructorId = 0xa1b70815;
1490
1475
  this.subclassOfId = 0xf24bf0c0;
1491
- this._slots = ['bot'];
1476
+ this._slots = ["bot"];
1492
1477
  this.bot = params.bot;
1493
1478
  }
1494
1479
  /**
1495
- * Generate the TLObject from buffer.
1496
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1497
- */
1480
+ * Generate the TLObject from buffer.
1481
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1482
+ */
1498
1483
  static async read(_data, ..._args) {
1499
1484
  // no flags
1500
1485
  let bot = await TLObject.read(_data);
1501
- return new GetBotRecommendations({ bot: bot });
1486
+ return new GetBotRecommendations({ "bot": bot });
1502
1487
  }
1503
1488
  /**
1504
- * Generate buffer from TLObject.
1505
- */
1489
+ * Generate buffer from TLObject.
1490
+ */
1506
1491
  write() {
1507
1492
  const b = new BytesIO();
1508
1493
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1519,37 +1504,37 @@ export class CheckUsername extends TLObject {
1519
1504
  username;
1520
1505
  constructor(params) {
1521
1506
  super();
1522
- this.classType = 'functions';
1523
- this.className = 'bots.CheckUsername';
1507
+ this.classType = "functions";
1508
+ this.className = "bots.CheckUsername";
1524
1509
  this.constructorId = 0xe3ac4c61;
1525
1510
  this.subclassOfId = 0xf5b399ac;
1526
- this._slots = ['additional', 'username'];
1511
+ this._slots = ["additional", "username"];
1527
1512
  this.additional = params.additional;
1528
1513
  this.username = params.username;
1529
1514
  }
1530
1515
  /**
1531
- * Generate the TLObject from buffer.
1532
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1533
- */
1516
+ * Generate the TLObject from buffer.
1517
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1518
+ */
1534
1519
  static async read(_data, ..._args) {
1535
1520
  // @ts-ignore
1536
1521
  let flags = await Primitive.Int.read(_data);
1537
- let additional = flags & (1 << 0) ? true : false;
1522
+ let additional = (flags & (1 << 0)) ? true : false;
1538
1523
  let username = await Primitive.String.read(_data);
1539
- return new CheckUsername({ additional: additional, username: username });
1524
+ return new CheckUsername({ "additional": additional, "username": username });
1540
1525
  }
1541
1526
  /**
1542
- * Generate buffer from TLObject.
1543
- */
1527
+ * Generate buffer from TLObject.
1528
+ */
1544
1529
  write() {
1545
1530
  const b = new BytesIO();
1546
1531
  b.write(Primitive.Int.write(this.constructorId, false));
1547
1532
  // @ts-ignore
1548
1533
  let flags = 0;
1549
- flags |= this.additional ? 1 << 0 : 0;
1550
- b.write(Primitive.Int.write(flags));
1534
+ flags |= this.additional ? (1 << 0) : 0;
1535
+ b.write((Primitive.Int.write(flags)));
1551
1536
  if (this.username !== undefined) {
1552
- b.write(Primitive.String.write(this.username));
1537
+ b.write((Primitive.String.write(this.username)));
1553
1538
  }
1554
1539
  return b.buffer;
1555
1540
  }
@@ -1562,49 +1547,44 @@ export class CreateBot extends TLObject {
1562
1547
  managerId;
1563
1548
  constructor(params) {
1564
1549
  super();
1565
- this.classType = 'functions';
1566
- this.className = 'bots.CreateBot';
1550
+ this.classType = "functions";
1551
+ this.className = "bots.CreateBot";
1567
1552
  this.constructorId = 0xe5b17f2b;
1568
1553
  this.subclassOfId = 0x2da17977;
1569
- this._slots = ['viaDeeplink', 'name', 'username', 'managerId'];
1554
+ this._slots = ["viaDeeplink", "name", "username", "managerId"];
1570
1555
  this.viaDeeplink = params.viaDeeplink;
1571
1556
  this.name = params.name;
1572
1557
  this.username = params.username;
1573
1558
  this.managerId = params.managerId;
1574
1559
  }
1575
1560
  /**
1576
- * Generate the TLObject from buffer.
1577
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1578
- */
1561
+ * Generate the TLObject from buffer.
1562
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1563
+ */
1579
1564
  static async read(_data, ..._args) {
1580
1565
  // @ts-ignore
1581
1566
  let flags = await Primitive.Int.read(_data);
1582
- let viaDeeplink = flags & (1 << 0) ? true : false;
1567
+ let viaDeeplink = (flags & (1 << 0)) ? true : false;
1583
1568
  let name = await Primitive.String.read(_data);
1584
1569
  let username = await Primitive.String.read(_data);
1585
1570
  let managerId = await TLObject.read(_data);
1586
- return new CreateBot({
1587
- viaDeeplink: viaDeeplink,
1588
- name: name,
1589
- username: username,
1590
- managerId: managerId,
1591
- });
1571
+ return new CreateBot({ "viaDeeplink": viaDeeplink, "name": name, "username": username, "managerId": managerId });
1592
1572
  }
1593
1573
  /**
1594
- * Generate buffer from TLObject.
1595
- */
1574
+ * Generate buffer from TLObject.
1575
+ */
1596
1576
  write() {
1597
1577
  const b = new BytesIO();
1598
1578
  b.write(Primitive.Int.write(this.constructorId, false));
1599
1579
  // @ts-ignore
1600
1580
  let flags = 0;
1601
- flags |= this.viaDeeplink ? 1 << 0 : 0;
1602
- b.write(Primitive.Int.write(flags));
1581
+ flags |= this.viaDeeplink ? (1 << 0) : 0;
1582
+ b.write((Primitive.Int.write(flags)));
1603
1583
  if (this.name !== undefined) {
1604
- b.write(Primitive.String.write(this.name));
1584
+ b.write((Primitive.String.write(this.name)));
1605
1585
  }
1606
1586
  if (this.username !== undefined) {
1607
- b.write(Primitive.String.write(this.username));
1587
+ b.write((Primitive.String.write(this.username)));
1608
1588
  }
1609
1589
  if (this.managerId !== undefined) {
1610
1590
  b.write(this.managerId.write());
@@ -1618,27 +1598,27 @@ export class ExportBotToken extends TLObject {
1618
1598
  revoke;
1619
1599
  constructor(params) {
1620
1600
  super();
1621
- this.classType = 'functions';
1622
- this.className = 'bots.ExportBotToken';
1601
+ this.classType = "functions";
1602
+ this.className = "bots.ExportBotToken";
1623
1603
  this.constructorId = 0xbd0d99eb;
1624
1604
  this.subclassOfId = 0x78496c77;
1625
- this._slots = ['bot', 'revoke'];
1605
+ this._slots = ["bot", "revoke"];
1626
1606
  this.bot = params.bot;
1627
1607
  this.revoke = params.revoke;
1628
1608
  }
1629
1609
  /**
1630
- * Generate the TLObject from buffer.
1631
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1632
- */
1610
+ * Generate the TLObject from buffer.
1611
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1612
+ */
1633
1613
  static async read(_data, ..._args) {
1634
1614
  // no flags
1635
1615
  let bot = await TLObject.read(_data);
1636
1616
  let revoke = await Primitive.Bool.read(_data);
1637
- return new ExportBotToken({ bot: bot, revoke: revoke });
1617
+ return new ExportBotToken({ "bot": bot, "revoke": revoke });
1638
1618
  }
1639
1619
  /**
1640
- * Generate buffer from TLObject.
1641
- */
1620
+ * Generate buffer from TLObject.
1621
+ */
1642
1622
  write() {
1643
1623
  const b = new BytesIO();
1644
1624
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1647,7 +1627,7 @@ export class ExportBotToken extends TLObject {
1647
1627
  b.write(this.bot.write());
1648
1628
  }
1649
1629
  if (this.revoke !== undefined) {
1650
- b.write(Primitive.Bool.write(this.revoke));
1630
+ b.write((Primitive.Bool.write(this.revoke)));
1651
1631
  }
1652
1632
  return b.buffer;
1653
1633
  }
@@ -1658,27 +1638,27 @@ export class RequestWebViewButton extends TLObject {
1658
1638
  button;
1659
1639
  constructor(params) {
1660
1640
  super();
1661
- this.classType = 'functions';
1662
- this.className = 'bots.RequestWebViewButton';
1641
+ this.classType = "functions";
1642
+ this.className = "bots.RequestWebViewButton";
1663
1643
  this.constructorId = 0x31a2a35e;
1664
1644
  this.subclassOfId = 0xf9df53a;
1665
- this._slots = ['userId', 'button'];
1645
+ this._slots = ["userId", "button"];
1666
1646
  this.userId = params.userId;
1667
1647
  this.button = params.button;
1668
1648
  }
1669
1649
  /**
1670
- * Generate the TLObject from buffer.
1671
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1672
- */
1650
+ * Generate the TLObject from buffer.
1651
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1652
+ */
1673
1653
  static async read(_data, ..._args) {
1674
1654
  // no flags
1675
1655
  let userId = await TLObject.read(_data);
1676
1656
  let button = await TLObject.read(_data);
1677
- return new RequestWebViewButton({ userId: userId, button: button });
1657
+ return new RequestWebViewButton({ "userId": userId, "button": button });
1678
1658
  }
1679
1659
  /**
1680
- * Generate buffer from TLObject.
1681
- */
1660
+ * Generate buffer from TLObject.
1661
+ */
1682
1662
  write() {
1683
1663
  const b = new BytesIO();
1684
1664
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1698,27 +1678,27 @@ export class GetRequestedWebViewButton extends TLObject {
1698
1678
  webappReqId;
1699
1679
  constructor(params) {
1700
1680
  super();
1701
- this.classType = 'functions';
1702
- this.className = 'bots.GetRequestedWebViewButton';
1681
+ this.classType = "functions";
1682
+ this.className = "bots.GetRequestedWebViewButton";
1703
1683
  this.constructorId = 0xbf25b7f3;
1704
1684
  this.subclassOfId = 0xbad74a3;
1705
- this._slots = ['bot', 'webappReqId'];
1685
+ this._slots = ["bot", "webappReqId"];
1706
1686
  this.bot = params.bot;
1707
1687
  this.webappReqId = params.webappReqId;
1708
1688
  }
1709
1689
  /**
1710
- * Generate the TLObject from buffer.
1711
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1712
- */
1690
+ * Generate the TLObject from buffer.
1691
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1692
+ */
1713
1693
  static async read(_data, ..._args) {
1714
1694
  // no flags
1715
1695
  let bot = await TLObject.read(_data);
1716
1696
  let webappReqId = await Primitive.String.read(_data);
1717
- return new GetRequestedWebViewButton({ bot: bot, webappReqId: webappReqId });
1697
+ return new GetRequestedWebViewButton({ "bot": bot, "webappReqId": webappReqId });
1718
1698
  }
1719
1699
  /**
1720
- * Generate buffer from TLObject.
1721
- */
1700
+ * Generate buffer from TLObject.
1701
+ */
1722
1702
  write() {
1723
1703
  const b = new BytesIO();
1724
1704
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1727,7 +1707,7 @@ export class GetRequestedWebViewButton extends TLObject {
1727
1707
  b.write(this.bot.write());
1728
1708
  }
1729
1709
  if (this.webappReqId !== undefined) {
1730
- b.write(Primitive.String.write(this.webappReqId));
1710
+ b.write((Primitive.String.write(this.webappReqId)));
1731
1711
  }
1732
1712
  return b.buffer;
1733
1713
  }
@@ -1737,25 +1717,25 @@ export class GetAccessSettings extends TLObject {
1737
1717
  bot;
1738
1718
  constructor(params) {
1739
1719
  super();
1740
- this.classType = 'functions';
1741
- this.className = 'bots.GetAccessSettings';
1720
+ this.classType = "functions";
1721
+ this.className = "bots.GetAccessSettings";
1742
1722
  this.constructorId = 0x213853a3;
1743
1723
  this.subclassOfId = 0xeca109c2;
1744
- this._slots = ['bot'];
1724
+ this._slots = ["bot"];
1745
1725
  this.bot = params.bot;
1746
1726
  }
1747
1727
  /**
1748
- * Generate the TLObject from buffer.
1749
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1750
- */
1728
+ * Generate the TLObject from buffer.
1729
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1730
+ */
1751
1731
  static async read(_data, ..._args) {
1752
1732
  // no flags
1753
1733
  let bot = await TLObject.read(_data);
1754
- return new GetAccessSettings({ bot: bot });
1734
+ return new GetAccessSettings({ "bot": bot });
1755
1735
  }
1756
1736
  /**
1757
- * Generate buffer from TLObject.
1758
- */
1737
+ * Generate buffer from TLObject.
1738
+ */
1759
1739
  write() {
1760
1740
  const b = new BytesIO();
1761
1741
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1773,43 +1753,43 @@ export class EditAccessSettings extends TLObject {
1773
1753
  addUsers;
1774
1754
  constructor(params) {
1775
1755
  super();
1776
- this.classType = 'functions';
1777
- this.className = 'bots.EditAccessSettings';
1756
+ this.classType = "functions";
1757
+ this.className = "bots.EditAccessSettings";
1778
1758
  this.constructorId = 0x31813cd8;
1779
1759
  this.subclassOfId = 0xf5b399ac;
1780
- this._slots = ['restricted', 'bot', 'addUsers'];
1760
+ this._slots = ["restricted", "bot", "addUsers"];
1781
1761
  this.restricted = params.restricted;
1782
1762
  this.bot = params.bot;
1783
1763
  this.addUsers = params.addUsers;
1784
1764
  }
1785
1765
  /**
1786
- * Generate the TLObject from buffer.
1787
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1788
- */
1766
+ * Generate the TLObject from buffer.
1767
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1768
+ */
1789
1769
  static async read(_data, ..._args) {
1790
1770
  // @ts-ignore
1791
1771
  let flags = await Primitive.Int.read(_data);
1792
- let restricted = flags & (1 << 0) ? true : false;
1772
+ let restricted = (flags & (1 << 0)) ? true : false;
1793
1773
  let bot = await TLObject.read(_data);
1794
- let addUsers = flags & (1 << 1) ? await TLObject.read(_data) : [];
1795
- return new EditAccessSettings({ restricted: restricted, bot: bot, addUsers: addUsers });
1774
+ let addUsers = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
1775
+ return new EditAccessSettings({ "restricted": restricted, "bot": bot, "addUsers": addUsers });
1796
1776
  }
1797
1777
  /**
1798
- * Generate buffer from TLObject.
1799
- */
1778
+ * Generate buffer from TLObject.
1779
+ */
1800
1780
  write() {
1801
1781
  const b = new BytesIO();
1802
1782
  b.write(Primitive.Int.write(this.constructorId, false));
1803
1783
  // @ts-ignore
1804
1784
  let flags = 0;
1805
- flags |= this.restricted ? 1 << 0 : 0;
1806
- flags |= this.addUsers ? 1 << 1 : 0;
1807
- b.write(Primitive.Int.write(flags));
1785
+ flags |= this.restricted ? (1 << 0) : 0;
1786
+ flags |= this.addUsers ? (1 << 1) : 0;
1787
+ b.write((Primitive.Int.write(flags)));
1808
1788
  if (this.bot !== undefined) {
1809
1789
  b.write(this.bot.write());
1810
1790
  }
1811
1791
  if (this.addUsers) {
1812
- b.write(Primitive.Vector.write(this.addUsers));
1792
+ b.write((Primitive.Vector.write(this.addUsers)));
1813
1793
  }
1814
1794
  return b.buffer;
1815
1795
  }
@@ -1820,33 +1800,33 @@ export class SetJoinChatResults extends TLObject {
1820
1800
  result;
1821
1801
  constructor(params) {
1822
1802
  super();
1823
- this.classType = 'functions';
1824
- this.className = 'bots.SetJoinChatResults';
1803
+ this.classType = "functions";
1804
+ this.className = "bots.SetJoinChatResults";
1825
1805
  this.constructorId = 0xe71a4810;
1826
1806
  this.subclassOfId = 0xf5b399ac;
1827
- this._slots = ['queryId', 'result'];
1807
+ this._slots = ["queryId", "result"];
1828
1808
  this.queryId = params.queryId;
1829
1809
  this.result = params.result;
1830
1810
  }
1831
1811
  /**
1832
- * Generate the TLObject from buffer.
1833
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1834
- */
1812
+ * Generate the TLObject from buffer.
1813
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1814
+ */
1835
1815
  static async read(_data, ..._args) {
1836
1816
  // no flags
1837
1817
  let queryId = await Primitive.Long.read(_data);
1838
1818
  let result = await TLObject.read(_data);
1839
- return new SetJoinChatResults({ queryId: queryId, result: result });
1819
+ return new SetJoinChatResults({ "queryId": queryId, "result": result });
1840
1820
  }
1841
1821
  /**
1842
- * Generate buffer from TLObject.
1843
- */
1822
+ * Generate buffer from TLObject.
1823
+ */
1844
1824
  write() {
1845
1825
  const b = new BytesIO();
1846
1826
  b.write(Primitive.Int.write(this.constructorId, false));
1847
1827
  // no flags
1848
1828
  if (this.queryId !== undefined) {
1849
- b.write(Primitive.Long.write(this.queryId));
1829
+ b.write((Primitive.Long.write(this.queryId)));
1850
1830
  }
1851
1831
  if (this.result !== undefined) {
1852
1832
  b.write(this.result.write());
@@ -1860,27 +1840,27 @@ export class AddUsername extends TLObject {
1860
1840
  username;
1861
1841
  constructor(params) {
1862
1842
  super();
1863
- this.classType = 'functions';
1864
- this.className = 'bots.AddUsername';
1843
+ this.classType = "functions";
1844
+ this.className = "bots.AddUsername";
1865
1845
  this.constructorId = 0x3501c08a;
1866
1846
  this.subclassOfId = 0xf5b399ac;
1867
- this._slots = ['bot', 'username'];
1847
+ this._slots = ["bot", "username"];
1868
1848
  this.bot = params.bot;
1869
1849
  this.username = params.username;
1870
1850
  }
1871
1851
  /**
1872
- * Generate the TLObject from buffer.
1873
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1874
- */
1852
+ * Generate the TLObject from buffer.
1853
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1854
+ */
1875
1855
  static async read(_data, ..._args) {
1876
1856
  // no flags
1877
1857
  let bot = await TLObject.read(_data);
1878
1858
  let username = await Primitive.String.read(_data);
1879
- return new AddUsername({ bot: bot, username: username });
1859
+ return new AddUsername({ "bot": bot, "username": username });
1880
1860
  }
1881
1861
  /**
1882
- * Generate buffer from TLObject.
1883
- */
1862
+ * Generate buffer from TLObject.
1863
+ */
1884
1864
  write() {
1885
1865
  const b = new BytesIO();
1886
1866
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1889,7 +1869,7 @@ export class AddUsername extends TLObject {
1889
1869
  b.write(this.bot.write());
1890
1870
  }
1891
1871
  if (this.username !== undefined) {
1892
- b.write(Primitive.String.write(this.username));
1872
+ b.write((Primitive.String.write(this.username)));
1893
1873
  }
1894
1874
  return b.buffer;
1895
1875
  }
@@ -1900,27 +1880,27 @@ export class RemoveUsername extends TLObject {
1900
1880
  username;
1901
1881
  constructor(params) {
1902
1882
  super();
1903
- this.classType = 'functions';
1904
- this.className = 'bots.RemoveUsername';
1883
+ this.classType = "functions";
1884
+ this.className = "bots.RemoveUsername";
1905
1885
  this.constructorId = 0xc704147d;
1906
1886
  this.subclassOfId = 0xf5b399ac;
1907
- this._slots = ['bot', 'username'];
1887
+ this._slots = ["bot", "username"];
1908
1888
  this.bot = params.bot;
1909
1889
  this.username = params.username;
1910
1890
  }
1911
1891
  /**
1912
- * Generate the TLObject from buffer.
1913
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1914
- */
1892
+ * Generate the TLObject from buffer.
1893
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1894
+ */
1915
1895
  static async read(_data, ..._args) {
1916
1896
  // no flags
1917
1897
  let bot = await TLObject.read(_data);
1918
1898
  let username = await Primitive.String.read(_data);
1919
- return new RemoveUsername({ bot: bot, username: username });
1899
+ return new RemoveUsername({ "bot": bot, "username": username });
1920
1900
  }
1921
1901
  /**
1922
- * Generate buffer from TLObject.
1923
- */
1902
+ * Generate buffer from TLObject.
1903
+ */
1924
1904
  write() {
1925
1905
  const b = new BytesIO();
1926
1906
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1929,7 +1909,7 @@ export class RemoveUsername extends TLObject {
1929
1909
  b.write(this.bot.write());
1930
1910
  }
1931
1911
  if (this.username !== undefined) {
1932
- b.write(Primitive.String.write(this.username));
1912
+ b.write((Primitive.String.write(this.username)));
1933
1913
  }
1934
1914
  return b.buffer;
1935
1915
  }