@tgsnake/skema 3.1.0 → 3.2.1-browser.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 (74) hide show
  1. package/README.md +1 -1
  2. package/dist/src/deps.d.ts +4 -3
  3. package/dist/src/deps.js +4 -4
  4. package/dist/src/errors/RpcError.js +3 -1
  5. package/dist/src/helpers.js +19 -34
  6. package/dist/src/raw/class/All.d.ts +49 -5
  7. package/dist/src/raw/class/All.js +2783 -2739
  8. package/dist/src/raw/class/Raw.d.ts +7856 -7518
  9. package/dist/src/raw/class/Raw.js +27367 -20433
  10. package/dist/src/raw/class/tl/account.d.ts +841 -841
  11. package/dist/src/raw/class/tl/account.js +1983 -1813
  12. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  13. package/dist/src/raw/class/tl/aicompose.js +128 -117
  14. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  15. package/dist/src/raw/class/tl/auth.js +849 -714
  16. package/dist/src/raw/class/tl/bots.d.ts +353 -232
  17. package/dist/src/raw/class/tl/bots.js +871 -504
  18. package/dist/src/raw/class/tl/channels.d.ts +351 -331
  19. package/dist/src/raw/class/tl/channels.js +873 -735
  20. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  21. package/dist/src/raw/class/tl/chatlists.js +196 -183
  22. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  23. package/dist/src/raw/class/tl/communities.js +159 -138
  24. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  25. package/dist/src/raw/class/tl/contacts.js +537 -492
  26. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  27. package/dist/src/raw/class/tl/ephemeral.js +204 -152
  28. package/dist/src/raw/class/tl/feed.d.ts +278 -0
  29. package/dist/src/raw/class/tl/feed.js +671 -0
  30. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  31. package/dist/src/raw/class/tl/folders.js +11 -11
  32. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  33. package/dist/src/raw/class/tl/fragment.js +32 -25
  34. package/dist/src/raw/class/tl/help.d.ts +286 -286
  35. package/dist/src/raw/class/tl/help.js +686 -618
  36. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  37. package/dist/src/raw/class/tl/langpack.js +57 -57
  38. package/dist/src/raw/class/tl/messages.d.ts +1901 -1851
  39. package/dist/src/raw/class/tl/messages.js +6043 -4855
  40. package/dist/src/raw/class/tl/payments.d.ts +677 -641
  41. package/dist/src/raw/class/tl/payments.js +2312 -1734
  42. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  43. package/dist/src/raw/class/tl/phone.js +779 -644
  44. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  45. package/dist/src/raw/class/tl/photos.js +139 -116
  46. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  47. package/dist/src/raw/class/tl/premium.js +133 -111
  48. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  49. package/dist/src/raw/class/tl/smsjobs.js +115 -97
  50. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  51. package/dist/src/raw/class/tl/stats.js +268 -169
  52. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  53. package/dist/src/raw/class/tl/stickers.js +173 -144
  54. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  55. package/dist/src/raw/class/tl/storage.js +71 -71
  56. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  57. package/dist/src/raw/class/tl/stories.js +781 -622
  58. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  59. package/dist/src/raw/class/tl/toncenter.js +52 -47
  60. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  61. package/dist/src/raw/class/tl/updates.js +246 -175
  62. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  63. package/dist/src/raw/class/tl/upload.js +178 -155
  64. package/dist/src/raw/class/tl/users.d.ts +61 -61
  65. package/dist/src/raw/class/tl/users.js +124 -124
  66. package/dist/src/raw/class/tl/wallet.d.ts +257 -206
  67. package/dist/src/raw/class/tl/wallet.js +701 -525
  68. package/dist/src/raw/class/types.d.ts +3 -2
  69. package/dist/src/raw/class/types.js +1 -1
  70. package/dist/src/raw/core/GzipPacked.d.ts +4 -0
  71. package/dist/src/raw/core/GzipPacked.js +9 -1
  72. package/dist/src/raw/core/primitive/Bytes.js +26 -4
  73. package/dist/src/raw/core/primitive/Vector.js +11 -3
  74. package/package.json +7 -5
@@ -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,46 +613,52 @@ 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({ "bot": bot, "langCode": langCode, "name": name, "about": about, "description": description });
628
- }
629
- /**
630
- * Generate buffer from TLObject.
631
- */
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
+ */
632
638
  write() {
633
639
  const b = new BytesIO();
634
640
  b.write(Primitive.Int.write(this.constructorId, false));
635
641
  // @ts-ignore
636
642
  let flags = 0;
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)));
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));
642
648
  if (this.bot !== undefined) {
643
649
  b.write(this.bot.write());
644
650
  }
645
651
  if (this.langCode !== undefined) {
646
- b.write((Primitive.String.write(this.langCode)));
652
+ b.write(Primitive.String.write(this.langCode));
647
653
  }
648
654
  if (this.name !== undefined) {
649
- b.write((Primitive.String.write(this.name)));
655
+ b.write(Primitive.String.write(this.name));
650
656
  }
651
657
  if (this.about !== undefined) {
652
- b.write((Primitive.String.write(this.about)));
658
+ b.write(Primitive.String.write(this.about));
653
659
  }
654
660
  if (this.description !== undefined) {
655
- b.write((Primitive.String.write(this.description)));
661
+ b.write(Primitive.String.write(this.description));
656
662
  }
657
663
  return b.buffer;
658
664
  }
@@ -663,40 +669,40 @@ export class GetBotInfo extends TLObject {
663
669
  langCode;
664
670
  constructor(params) {
665
671
  super();
666
- this.classType = "functions";
667
- this.className = "bots.GetBotInfo";
672
+ this.classType = 'functions';
673
+ this.className = 'bots.GetBotInfo';
668
674
  this.constructorId = 0xdcd914fd;
669
675
  this.subclassOfId = 0xca7b2235;
670
- this._slots = ["bot", "langCode"];
676
+ this._slots = ['bot', 'langCode'];
671
677
  this.bot = params.bot;
672
678
  this.langCode = params.langCode;
673
679
  }
674
680
  /**
675
- * Generate the TLObject from buffer.
676
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
677
- */
681
+ * Generate the TLObject from buffer.
682
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
683
+ */
678
684
  static async read(_data, ..._args) {
679
685
  // @ts-ignore
680
686
  let flags = await Primitive.Int.read(_data);
681
- let bot = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
687
+ let bot = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
682
688
  let langCode = await Primitive.String.read(_data);
683
- return new GetBotInfo({ "bot": bot, "langCode": langCode });
689
+ return new GetBotInfo({ bot: bot, langCode: langCode });
684
690
  }
685
691
  /**
686
- * Generate buffer from TLObject.
687
- */
692
+ * Generate buffer from TLObject.
693
+ */
688
694
  write() {
689
695
  const b = new BytesIO();
690
696
  b.write(Primitive.Int.write(this.constructorId, false));
691
697
  // @ts-ignore
692
698
  let flags = 0;
693
- flags |= this.bot !== undefined ? (1 << 0) : 0;
694
- b.write((Primitive.Int.write(flags)));
699
+ flags |= this.bot !== undefined ? 1 << 0 : 0;
700
+ b.write(Primitive.Int.write(flags));
695
701
  if (this.bot !== undefined) {
696
702
  b.write(this.bot.write());
697
703
  }
698
704
  if (this.langCode !== undefined) {
699
- b.write((Primitive.String.write(this.langCode)));
705
+ b.write(Primitive.String.write(this.langCode));
700
706
  }
701
707
  return b.buffer;
702
708
  }
@@ -707,27 +713,27 @@ export class ReorderUsernames extends TLObject {
707
713
  order;
708
714
  constructor(params) {
709
715
  super();
710
- this.classType = "functions";
711
- this.className = "bots.ReorderUsernames";
716
+ this.classType = 'functions';
717
+ this.className = 'bots.ReorderUsernames';
712
718
  this.constructorId = 0x9709b1c2;
713
719
  this.subclassOfId = 0xf5b399ac;
714
- this._slots = ["bot", "order"];
720
+ this._slots = ['bot', 'order'];
715
721
  this.bot = params.bot;
716
722
  this.order = params.order;
717
723
  }
718
724
  /**
719
- * Generate the TLObject from buffer.
720
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
721
- */
725
+ * Generate the TLObject from buffer.
726
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
727
+ */
722
728
  static async read(_data, ..._args) {
723
729
  // no flags
724
730
  let bot = await TLObject.read(_data);
725
731
  let order = await TLObject.read(_data, Primitive.String);
726
- return new ReorderUsernames({ "bot": bot, "order": order });
732
+ return new ReorderUsernames({ bot: bot, order: order });
727
733
  }
728
734
  /**
729
- * Generate buffer from TLObject.
730
- */
735
+ * Generate buffer from TLObject.
736
+ */
731
737
  write() {
732
738
  const b = new BytesIO();
733
739
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -736,7 +742,7 @@ export class ReorderUsernames extends TLObject {
736
742
  b.write(this.bot.write());
737
743
  }
738
744
  if (this.order) {
739
- b.write((Primitive.Vector.write(this.order, Primitive.String)));
745
+ b.write(Primitive.Vector.write(this.order, Primitive.String));
740
746
  }
741
747
  return b.buffer;
742
748
  }
@@ -748,29 +754,29 @@ export class ToggleUsername extends TLObject {
748
754
  active;
749
755
  constructor(params) {
750
756
  super();
751
- this.classType = "functions";
752
- this.className = "bots.ToggleUsername";
757
+ this.classType = 'functions';
758
+ this.className = 'bots.ToggleUsername';
753
759
  this.constructorId = 0x53ca973;
754
760
  this.subclassOfId = 0xf5b399ac;
755
- this._slots = ["bot", "username", "active"];
761
+ this._slots = ['bot', 'username', 'active'];
756
762
  this.bot = params.bot;
757
763
  this.username = params.username;
758
764
  this.active = params.active;
759
765
  }
760
766
  /**
761
- * Generate the TLObject from buffer.
762
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
763
- */
767
+ * Generate the TLObject from buffer.
768
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
769
+ */
764
770
  static async read(_data, ..._args) {
765
771
  // no flags
766
772
  let bot = await TLObject.read(_data);
767
773
  let username = await Primitive.String.read(_data);
768
774
  let active = await Primitive.Bool.read(_data);
769
- return new ToggleUsername({ "bot": bot, "username": username, "active": active });
775
+ return new ToggleUsername({ bot: bot, username: username, active: active });
770
776
  }
771
777
  /**
772
- * Generate buffer from TLObject.
773
- */
778
+ * Generate buffer from TLObject.
779
+ */
774
780
  write() {
775
781
  const b = new BytesIO();
776
782
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -779,10 +785,10 @@ export class ToggleUsername extends TLObject {
779
785
  b.write(this.bot.write());
780
786
  }
781
787
  if (this.username !== undefined) {
782
- b.write((Primitive.String.write(this.username)));
788
+ b.write(Primitive.String.write(this.username));
783
789
  }
784
790
  if (this.active !== undefined) {
785
- b.write((Primitive.Bool.write(this.active)));
791
+ b.write(Primitive.Bool.write(this.active));
786
792
  }
787
793
  return b.buffer;
788
794
  }
@@ -792,25 +798,25 @@ export class CanSendMessage extends TLObject {
792
798
  bot;
793
799
  constructor(params) {
794
800
  super();
795
- this.classType = "functions";
796
- this.className = "bots.CanSendMessage";
801
+ this.classType = 'functions';
802
+ this.className = 'bots.CanSendMessage';
797
803
  this.constructorId = 0x1359f4e6;
798
804
  this.subclassOfId = 0xf5b399ac;
799
- this._slots = ["bot"];
805
+ this._slots = ['bot'];
800
806
  this.bot = params.bot;
801
807
  }
802
808
  /**
803
- * Generate the TLObject from buffer.
804
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
805
- */
809
+ * Generate the TLObject from buffer.
810
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
811
+ */
806
812
  static async read(_data, ..._args) {
807
813
  // no flags
808
814
  let bot = await TLObject.read(_data);
809
- return new CanSendMessage({ "bot": bot });
815
+ return new CanSendMessage({ bot: bot });
810
816
  }
811
817
  /**
812
- * Generate buffer from TLObject.
813
- */
818
+ * Generate buffer from TLObject.
819
+ */
814
820
  write() {
815
821
  const b = new BytesIO();
816
822
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -826,25 +832,25 @@ export class AllowSendMessage extends TLObject {
826
832
  bot;
827
833
  constructor(params) {
828
834
  super();
829
- this.classType = "functions";
830
- this.className = "bots.AllowSendMessage";
835
+ this.classType = 'functions';
836
+ this.className = 'bots.AllowSendMessage';
831
837
  this.constructorId = 0xf132e3ef;
832
838
  this.subclassOfId = 0x8af52aac;
833
- this._slots = ["bot"];
839
+ this._slots = ['bot'];
834
840
  this.bot = params.bot;
835
841
  }
836
842
  /**
837
- * Generate the TLObject from buffer.
838
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
839
- */
843
+ * Generate the TLObject from buffer.
844
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
845
+ */
840
846
  static async read(_data, ..._args) {
841
847
  // no flags
842
848
  let bot = await TLObject.read(_data);
843
- return new AllowSendMessage({ "bot": bot });
849
+ return new AllowSendMessage({ bot: bot });
844
850
  }
845
851
  /**
846
- * Generate buffer from TLObject.
847
- */
852
+ * Generate buffer from TLObject.
853
+ */
848
854
  write() {
849
855
  const b = new BytesIO();
850
856
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -862,29 +868,29 @@ export class InvokeWebViewCustomMethod extends TLObject {
862
868
  params;
863
869
  constructor(params) {
864
870
  super();
865
- this.classType = "functions";
866
- this.className = "bots.InvokeWebViewCustomMethod";
871
+ this.classType = 'functions';
872
+ this.className = 'bots.InvokeWebViewCustomMethod';
867
873
  this.constructorId = 0x87fc5e7;
868
874
  this.subclassOfId = 0xad0352e8;
869
- this._slots = ["bot", "customMethod", "params"];
875
+ this._slots = ['bot', 'customMethod', 'params'];
870
876
  this.bot = params.bot;
871
877
  this.customMethod = params.customMethod;
872
878
  this.params = params.params;
873
879
  }
874
880
  /**
875
- * Generate the TLObject from buffer.
876
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
877
- */
881
+ * Generate the TLObject from buffer.
882
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
883
+ */
878
884
  static async read(_data, ..._args) {
879
885
  // no flags
880
886
  let bot = await TLObject.read(_data);
881
887
  let customMethod = await Primitive.String.read(_data);
882
888
  let params = await TLObject.read(_data);
883
- return new InvokeWebViewCustomMethod({ "bot": bot, "customMethod": customMethod, "params": params });
889
+ return new InvokeWebViewCustomMethod({ bot: bot, customMethod: customMethod, params: params });
884
890
  }
885
891
  /**
886
- * Generate buffer from TLObject.
887
- */
892
+ * Generate buffer from TLObject.
893
+ */
888
894
  write() {
889
895
  const b = new BytesIO();
890
896
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -893,7 +899,7 @@ export class InvokeWebViewCustomMethod extends TLObject {
893
899
  b.write(this.bot.write());
894
900
  }
895
901
  if (this.customMethod !== undefined) {
896
- b.write((Primitive.String.write(this.customMethod)));
902
+ b.write(Primitive.String.write(this.customMethod));
897
903
  }
898
904
  if (this.params !== undefined) {
899
905
  b.write(this.params.write());
@@ -907,36 +913,36 @@ export class GetPopularAppBots extends TLObject {
907
913
  limit;
908
914
  constructor(params) {
909
915
  super();
910
- this.classType = "functions";
911
- this.className = "bots.GetPopularAppBots";
916
+ this.classType = 'functions';
917
+ this.className = 'bots.GetPopularAppBots';
912
918
  this.constructorId = 0xc2510192;
913
919
  this.subclassOfId = 0x7b64be7d;
914
- this._slots = ["offset", "limit"];
920
+ this._slots = ['offset', 'limit'];
915
921
  this.offset = params.offset;
916
922
  this.limit = params.limit;
917
923
  }
918
924
  /**
919
- * Generate the TLObject from buffer.
920
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
921
- */
925
+ * Generate the TLObject from buffer.
926
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
927
+ */
922
928
  static async read(_data, ..._args) {
923
929
  // no flags
924
930
  let offset = await Primitive.String.read(_data);
925
931
  let limit = await Primitive.Int.read(_data);
926
- return new GetPopularAppBots({ "offset": offset, "limit": limit });
932
+ return new GetPopularAppBots({ offset: offset, limit: limit });
927
933
  }
928
934
  /**
929
- * Generate buffer from TLObject.
930
- */
935
+ * Generate buffer from TLObject.
936
+ */
931
937
  write() {
932
938
  const b = new BytesIO();
933
939
  b.write(Primitive.Int.write(this.constructorId, false));
934
940
  // no flags
935
941
  if (this.offset !== undefined) {
936
- b.write((Primitive.String.write(this.offset)));
942
+ b.write(Primitive.String.write(this.offset));
937
943
  }
938
944
  if (this.limit !== undefined) {
939
- b.write((Primitive.Int.write(this.limit)));
945
+ b.write(Primitive.Int.write(this.limit));
940
946
  }
941
947
  return b.buffer;
942
948
  }
@@ -948,29 +954,29 @@ export class AddPreviewMedia extends TLObject {
948
954
  media;
949
955
  constructor(params) {
950
956
  super();
951
- this.classType = "functions";
952
- this.className = "bots.AddPreviewMedia";
957
+ this.classType = 'functions';
958
+ this.className = 'bots.AddPreviewMedia';
953
959
  this.constructorId = 0x17aeb75a;
954
960
  this.subclassOfId = 0x562abc2d;
955
- this._slots = ["bot", "langCode", "media"];
961
+ this._slots = ['bot', 'langCode', 'media'];
956
962
  this.bot = params.bot;
957
963
  this.langCode = params.langCode;
958
964
  this.media = params.media;
959
965
  }
960
966
  /**
961
- * Generate the TLObject from buffer.
962
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
963
- */
967
+ * Generate the TLObject from buffer.
968
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
969
+ */
964
970
  static async read(_data, ..._args) {
965
971
  // no flags
966
972
  let bot = await TLObject.read(_data);
967
973
  let langCode = await Primitive.String.read(_data);
968
974
  let media = await TLObject.read(_data);
969
- return new AddPreviewMedia({ "bot": bot, "langCode": langCode, "media": media });
975
+ return new AddPreviewMedia({ bot: bot, langCode: langCode, media: media });
970
976
  }
971
977
  /**
972
- * Generate buffer from TLObject.
973
- */
978
+ * Generate buffer from TLObject.
979
+ */
974
980
  write() {
975
981
  const b = new BytesIO();
976
982
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -979,7 +985,7 @@ export class AddPreviewMedia extends TLObject {
979
985
  b.write(this.bot.write());
980
986
  }
981
987
  if (this.langCode !== undefined) {
982
- b.write((Primitive.String.write(this.langCode)));
988
+ b.write(Primitive.String.write(this.langCode));
983
989
  }
984
990
  if (this.media !== undefined) {
985
991
  b.write(this.media.write());
@@ -995,31 +1001,31 @@ export class EditPreviewMedia extends TLObject {
995
1001
  newMedia;
996
1002
  constructor(params) {
997
1003
  super();
998
- this.classType = "functions";
999
- this.className = "bots.EditPreviewMedia";
1004
+ this.classType = 'functions';
1005
+ this.className = 'bots.EditPreviewMedia';
1000
1006
  this.constructorId = 0x8525606f;
1001
1007
  this.subclassOfId = 0x562abc2d;
1002
- this._slots = ["bot", "langCode", "media", "newMedia"];
1008
+ this._slots = ['bot', 'langCode', 'media', 'newMedia'];
1003
1009
  this.bot = params.bot;
1004
1010
  this.langCode = params.langCode;
1005
1011
  this.media = params.media;
1006
1012
  this.newMedia = params.newMedia;
1007
1013
  }
1008
1014
  /**
1009
- * Generate the TLObject from buffer.
1010
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1011
- */
1015
+ * Generate the TLObject from buffer.
1016
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1017
+ */
1012
1018
  static async read(_data, ..._args) {
1013
1019
  // no flags
1014
1020
  let bot = await TLObject.read(_data);
1015
1021
  let langCode = await Primitive.String.read(_data);
1016
1022
  let media = await TLObject.read(_data);
1017
1023
  let newMedia = await TLObject.read(_data);
1018
- return new EditPreviewMedia({ "bot": bot, "langCode": langCode, "media": media, "newMedia": newMedia });
1024
+ return new EditPreviewMedia({ bot: bot, langCode: langCode, media: media, newMedia: newMedia });
1019
1025
  }
1020
1026
  /**
1021
- * Generate buffer from TLObject.
1022
- */
1027
+ * Generate buffer from TLObject.
1028
+ */
1023
1029
  write() {
1024
1030
  const b = new BytesIO();
1025
1031
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1028,7 +1034,7 @@ export class EditPreviewMedia extends TLObject {
1028
1034
  b.write(this.bot.write());
1029
1035
  }
1030
1036
  if (this.langCode !== undefined) {
1031
- b.write((Primitive.String.write(this.langCode)));
1037
+ b.write(Primitive.String.write(this.langCode));
1032
1038
  }
1033
1039
  if (this.media !== undefined) {
1034
1040
  b.write(this.media.write());
@@ -1046,29 +1052,29 @@ export class DeletePreviewMedia extends TLObject {
1046
1052
  media;
1047
1053
  constructor(params) {
1048
1054
  super();
1049
- this.classType = "functions";
1050
- this.className = "bots.DeletePreviewMedia";
1055
+ this.classType = 'functions';
1056
+ this.className = 'bots.DeletePreviewMedia';
1051
1057
  this.constructorId = 0x2d0135b3;
1052
1058
  this.subclassOfId = 0xf5b399ac;
1053
- this._slots = ["bot", "langCode", "media"];
1059
+ this._slots = ['bot', 'langCode', 'media'];
1054
1060
  this.bot = params.bot;
1055
1061
  this.langCode = params.langCode;
1056
1062
  this.media = params.media;
1057
1063
  }
1058
1064
  /**
1059
- * Generate the TLObject from buffer.
1060
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1061
- */
1065
+ * Generate the TLObject from buffer.
1066
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1067
+ */
1062
1068
  static async read(_data, ..._args) {
1063
1069
  // no flags
1064
1070
  let bot = await TLObject.read(_data);
1065
1071
  let langCode = await Primitive.String.read(_data);
1066
1072
  let media = await TLObject.read(_data);
1067
- return new DeletePreviewMedia({ "bot": bot, "langCode": langCode, "media": media });
1073
+ return new DeletePreviewMedia({ bot: bot, langCode: langCode, media: media });
1068
1074
  }
1069
1075
  /**
1070
- * Generate buffer from TLObject.
1071
- */
1076
+ * Generate buffer from TLObject.
1077
+ */
1072
1078
  write() {
1073
1079
  const b = new BytesIO();
1074
1080
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1077,10 +1083,10 @@ export class DeletePreviewMedia extends TLObject {
1077
1083
  b.write(this.bot.write());
1078
1084
  }
1079
1085
  if (this.langCode !== undefined) {
1080
- b.write((Primitive.String.write(this.langCode)));
1086
+ b.write(Primitive.String.write(this.langCode));
1081
1087
  }
1082
1088
  if (this.media) {
1083
- b.write((Primitive.Vector.write(this.media)));
1089
+ b.write(Primitive.Vector.write(this.media));
1084
1090
  }
1085
1091
  return b.buffer;
1086
1092
  }
@@ -1092,29 +1098,29 @@ export class ReorderPreviewMedias extends TLObject {
1092
1098
  order;
1093
1099
  constructor(params) {
1094
1100
  super();
1095
- this.classType = "functions";
1096
- this.className = "bots.ReorderPreviewMedias";
1101
+ this.classType = 'functions';
1102
+ this.className = 'bots.ReorderPreviewMedias';
1097
1103
  this.constructorId = 0xb627f3aa;
1098
1104
  this.subclassOfId = 0xf5b399ac;
1099
- this._slots = ["bot", "langCode", "order"];
1105
+ this._slots = ['bot', 'langCode', 'order'];
1100
1106
  this.bot = params.bot;
1101
1107
  this.langCode = params.langCode;
1102
1108
  this.order = params.order;
1103
1109
  }
1104
1110
  /**
1105
- * Generate the TLObject from buffer.
1106
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1107
- */
1111
+ * Generate the TLObject from buffer.
1112
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1113
+ */
1108
1114
  static async read(_data, ..._args) {
1109
1115
  // no flags
1110
1116
  let bot = await TLObject.read(_data);
1111
1117
  let langCode = await Primitive.String.read(_data);
1112
1118
  let order = await TLObject.read(_data);
1113
- return new ReorderPreviewMedias({ "bot": bot, "langCode": langCode, "order": order });
1119
+ return new ReorderPreviewMedias({ bot: bot, langCode: langCode, order: order });
1114
1120
  }
1115
1121
  /**
1116
- * Generate buffer from TLObject.
1117
- */
1122
+ * Generate buffer from TLObject.
1123
+ */
1118
1124
  write() {
1119
1125
  const b = new BytesIO();
1120
1126
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1123,10 +1129,10 @@ export class ReorderPreviewMedias extends TLObject {
1123
1129
  b.write(this.bot.write());
1124
1130
  }
1125
1131
  if (this.langCode !== undefined) {
1126
- b.write((Primitive.String.write(this.langCode)));
1132
+ b.write(Primitive.String.write(this.langCode));
1127
1133
  }
1128
1134
  if (this.order) {
1129
- b.write((Primitive.Vector.write(this.order)));
1135
+ b.write(Primitive.Vector.write(this.order));
1130
1136
  }
1131
1137
  return b.buffer;
1132
1138
  }
@@ -1137,27 +1143,27 @@ export class GetPreviewInfo extends TLObject {
1137
1143
  langCode;
1138
1144
  constructor(params) {
1139
1145
  super();
1140
- this.classType = "functions";
1141
- this.className = "bots.GetPreviewInfo";
1146
+ this.classType = 'functions';
1147
+ this.className = 'bots.GetPreviewInfo';
1142
1148
  this.constructorId = 0x423ab3ad;
1143
1149
  this.subclassOfId = 0xf0c27f35;
1144
- this._slots = ["bot", "langCode"];
1150
+ this._slots = ['bot', 'langCode'];
1145
1151
  this.bot = params.bot;
1146
1152
  this.langCode = params.langCode;
1147
1153
  }
1148
1154
  /**
1149
- * Generate the TLObject from buffer.
1150
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1151
- */
1155
+ * Generate the TLObject from buffer.
1156
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1157
+ */
1152
1158
  static async read(_data, ..._args) {
1153
1159
  // no flags
1154
1160
  let bot = await TLObject.read(_data);
1155
1161
  let langCode = await Primitive.String.read(_data);
1156
- return new GetPreviewInfo({ "bot": bot, "langCode": langCode });
1162
+ return new GetPreviewInfo({ bot: bot, langCode: langCode });
1157
1163
  }
1158
1164
  /**
1159
- * Generate buffer from TLObject.
1160
- */
1165
+ * Generate buffer from TLObject.
1166
+ */
1161
1167
  write() {
1162
1168
  const b = new BytesIO();
1163
1169
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1166,7 +1172,7 @@ export class GetPreviewInfo extends TLObject {
1166
1172
  b.write(this.bot.write());
1167
1173
  }
1168
1174
  if (this.langCode !== undefined) {
1169
- b.write((Primitive.String.write(this.langCode)));
1175
+ b.write(Primitive.String.write(this.langCode));
1170
1176
  }
1171
1177
  return b.buffer;
1172
1178
  }
@@ -1176,25 +1182,25 @@ export class GetPreviewMedias extends TLObject {
1176
1182
  bot;
1177
1183
  constructor(params) {
1178
1184
  super();
1179
- this.classType = "functions";
1180
- this.className = "bots.GetPreviewMedias";
1185
+ this.classType = 'functions';
1186
+ this.className = 'bots.GetPreviewMedias';
1181
1187
  this.constructorId = 0xa2a5594d;
1182
1188
  this.subclassOfId = 0xf9862a78;
1183
- this._slots = ["bot"];
1189
+ this._slots = ['bot'];
1184
1190
  this.bot = params.bot;
1185
1191
  }
1186
1192
  /**
1187
- * Generate the TLObject from buffer.
1188
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1189
- */
1193
+ * Generate the TLObject from buffer.
1194
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1195
+ */
1190
1196
  static async read(_data, ..._args) {
1191
1197
  // no flags
1192
1198
  let bot = await TLObject.read(_data);
1193
- return new GetPreviewMedias({ "bot": bot });
1199
+ return new GetPreviewMedias({ bot: bot });
1194
1200
  }
1195
1201
  /**
1196
- * Generate buffer from TLObject.
1197
- */
1202
+ * Generate buffer from TLObject.
1203
+ */
1198
1204
  write() {
1199
1205
  const b = new BytesIO();
1200
1206
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1211,27 +1217,27 @@ export class UpdateUserEmojiStatus extends TLObject {
1211
1217
  emojiStatus;
1212
1218
  constructor(params) {
1213
1219
  super();
1214
- this.classType = "functions";
1215
- this.className = "bots.UpdateUserEmojiStatus";
1220
+ this.classType = 'functions';
1221
+ this.className = 'bots.UpdateUserEmojiStatus';
1216
1222
  this.constructorId = 0xed9f30c5;
1217
1223
  this.subclassOfId = 0xf5b399ac;
1218
- this._slots = ["userId", "emojiStatus"];
1224
+ this._slots = ['userId', 'emojiStatus'];
1219
1225
  this.userId = params.userId;
1220
1226
  this.emojiStatus = params.emojiStatus;
1221
1227
  }
1222
1228
  /**
1223
- * Generate the TLObject from buffer.
1224
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1225
- */
1229
+ * Generate the TLObject from buffer.
1230
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1231
+ */
1226
1232
  static async read(_data, ..._args) {
1227
1233
  // no flags
1228
1234
  let userId = await TLObject.read(_data);
1229
1235
  let emojiStatus = await TLObject.read(_data);
1230
- return new UpdateUserEmojiStatus({ "userId": userId, "emojiStatus": emojiStatus });
1236
+ return new UpdateUserEmojiStatus({ userId: userId, emojiStatus: emojiStatus });
1231
1237
  }
1232
1238
  /**
1233
- * Generate buffer from TLObject.
1234
- */
1239
+ * Generate buffer from TLObject.
1240
+ */
1235
1241
  write() {
1236
1242
  const b = new BytesIO();
1237
1243
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1251,27 +1257,27 @@ export class ToggleUserEmojiStatusPermission extends TLObject {
1251
1257
  enabled;
1252
1258
  constructor(params) {
1253
1259
  super();
1254
- this.classType = "functions";
1255
- this.className = "bots.ToggleUserEmojiStatusPermission";
1260
+ this.classType = 'functions';
1261
+ this.className = 'bots.ToggleUserEmojiStatusPermission';
1256
1262
  this.constructorId = 0x6de6392;
1257
1263
  this.subclassOfId = 0xf5b399ac;
1258
- this._slots = ["bot", "enabled"];
1264
+ this._slots = ['bot', 'enabled'];
1259
1265
  this.bot = params.bot;
1260
1266
  this.enabled = params.enabled;
1261
1267
  }
1262
1268
  /**
1263
- * Generate the TLObject from buffer.
1264
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1265
- */
1269
+ * Generate the TLObject from buffer.
1270
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1271
+ */
1266
1272
  static async read(_data, ..._args) {
1267
1273
  // no flags
1268
1274
  let bot = await TLObject.read(_data);
1269
1275
  let enabled = await Primitive.Bool.read(_data);
1270
- return new ToggleUserEmojiStatusPermission({ "bot": bot, "enabled": enabled });
1276
+ return new ToggleUserEmojiStatusPermission({ bot: bot, enabled: enabled });
1271
1277
  }
1272
1278
  /**
1273
- * Generate buffer from TLObject.
1274
- */
1279
+ * Generate buffer from TLObject.
1280
+ */
1275
1281
  write() {
1276
1282
  const b = new BytesIO();
1277
1283
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1280,7 +1286,7 @@ export class ToggleUserEmojiStatusPermission extends TLObject {
1280
1286
  b.write(this.bot.write());
1281
1287
  }
1282
1288
  if (this.enabled !== undefined) {
1283
- b.write((Primitive.Bool.write(this.enabled)));
1289
+ b.write(Primitive.Bool.write(this.enabled));
1284
1290
  }
1285
1291
  return b.buffer;
1286
1292
  }
@@ -1292,29 +1298,29 @@ export class CheckDownloadFileParams extends TLObject {
1292
1298
  url;
1293
1299
  constructor(params) {
1294
1300
  super();
1295
- this.classType = "functions";
1296
- this.className = "bots.CheckDownloadFileParams";
1301
+ this.classType = 'functions';
1302
+ this.className = 'bots.CheckDownloadFileParams';
1297
1303
  this.constructorId = 0x50077589;
1298
1304
  this.subclassOfId = 0xf5b399ac;
1299
- this._slots = ["bot", "fileName", "url"];
1305
+ this._slots = ['bot', 'fileName', 'url'];
1300
1306
  this.bot = params.bot;
1301
1307
  this.fileName = params.fileName;
1302
1308
  this.url = params.url;
1303
1309
  }
1304
1310
  /**
1305
- * Generate the TLObject from buffer.
1306
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1307
- */
1311
+ * Generate the TLObject from buffer.
1312
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1313
+ */
1308
1314
  static async read(_data, ..._args) {
1309
1315
  // no flags
1310
1316
  let bot = await TLObject.read(_data);
1311
1317
  let fileName = await Primitive.String.read(_data);
1312
1318
  let url = await Primitive.String.read(_data);
1313
- return new CheckDownloadFileParams({ "bot": bot, "fileName": fileName, "url": url });
1319
+ return new CheckDownloadFileParams({ bot: bot, fileName: fileName, url: url });
1314
1320
  }
1315
1321
  /**
1316
- * Generate buffer from TLObject.
1317
- */
1322
+ * Generate buffer from TLObject.
1323
+ */
1318
1324
  write() {
1319
1325
  const b = new BytesIO();
1320
1326
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1323,10 +1329,10 @@ export class CheckDownloadFileParams extends TLObject {
1323
1329
  b.write(this.bot.write());
1324
1330
  }
1325
1331
  if (this.fileName !== undefined) {
1326
- b.write((Primitive.String.write(this.fileName)));
1332
+ b.write(Primitive.String.write(this.fileName));
1327
1333
  }
1328
1334
  if (this.url !== undefined) {
1329
- b.write((Primitive.String.write(this.url)));
1335
+ b.write(Primitive.String.write(this.url));
1330
1336
  }
1331
1337
  return b.buffer;
1332
1338
  }
@@ -1335,23 +1341,23 @@ export class GetAdminedBots extends TLObject {
1335
1341
  __response__;
1336
1342
  constructor() {
1337
1343
  super();
1338
- this.classType = "functions";
1339
- this.className = "bots.GetAdminedBots";
1344
+ this.classType = 'functions';
1345
+ this.className = 'bots.GetAdminedBots';
1340
1346
  this.constructorId = 0xb0711d83;
1341
1347
  this.subclassOfId = 0x406da4d;
1342
1348
  this._slots = [];
1343
1349
  }
1344
1350
  /**
1345
- * Generate the TLObject from buffer.
1346
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1347
- */
1351
+ * Generate the TLObject from buffer.
1352
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1353
+ */
1348
1354
  static async read(_data, ..._args) {
1349
1355
  // no flags
1350
1356
  return new GetAdminedBots();
1351
1357
  }
1352
1358
  /**
1353
- * Generate buffer from TLObject.
1354
- */
1359
+ * Generate buffer from TLObject.
1360
+ */
1355
1361
  write() {
1356
1362
  const b = new BytesIO();
1357
1363
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1366,45 +1372,49 @@ export class UpdateStarRefProgram extends TLObject {
1366
1372
  durationMonths;
1367
1373
  constructor(params) {
1368
1374
  super();
1369
- this.classType = "functions";
1370
- this.className = "bots.UpdateStarRefProgram";
1375
+ this.classType = 'functions';
1376
+ this.className = 'bots.UpdateStarRefProgram';
1371
1377
  this.constructorId = 0x778b5ab3;
1372
1378
  this.subclassOfId = 0x9888e002;
1373
- this._slots = ["bot", "commissionPermille", "durationMonths"];
1379
+ this._slots = ['bot', 'commissionPermille', 'durationMonths'];
1374
1380
  this.bot = params.bot;
1375
1381
  this.commissionPermille = params.commissionPermille;
1376
1382
  this.durationMonths = params.durationMonths;
1377
1383
  }
1378
1384
  /**
1379
- * Generate the TLObject from buffer.
1380
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1381
- */
1385
+ * Generate the TLObject from buffer.
1386
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1387
+ */
1382
1388
  static async read(_data, ..._args) {
1383
1389
  // @ts-ignore
1384
1390
  let flags = await Primitive.Int.read(_data);
1385
1391
  let bot = await TLObject.read(_data);
1386
1392
  let commissionPermille = await Primitive.Int.read(_data);
1387
- let durationMonths = (flags & (1 << 0)) ? await Primitive.Int.read(_data) : undefined;
1388
- return new UpdateStarRefProgram({ "bot": bot, "commissionPermille": commissionPermille, "durationMonths": durationMonths });
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
+ });
1389
1399
  }
1390
1400
  /**
1391
- * Generate buffer from TLObject.
1392
- */
1401
+ * Generate buffer from TLObject.
1402
+ */
1393
1403
  write() {
1394
1404
  const b = new BytesIO();
1395
1405
  b.write(Primitive.Int.write(this.constructorId, false));
1396
1406
  // @ts-ignore
1397
1407
  let flags = 0;
1398
- flags |= this.durationMonths !== undefined ? (1 << 0) : 0;
1399
- b.write((Primitive.Int.write(flags)));
1408
+ flags |= this.durationMonths !== undefined ? 1 << 0 : 0;
1409
+ b.write(Primitive.Int.write(flags));
1400
1410
  if (this.bot !== undefined) {
1401
1411
  b.write(this.bot.write());
1402
1412
  }
1403
1413
  if (this.commissionPermille !== undefined) {
1404
- b.write((Primitive.Int.write(this.commissionPermille)));
1414
+ b.write(Primitive.Int.write(this.commissionPermille));
1405
1415
  }
1406
1416
  if (this.durationMonths !== undefined) {
1407
- b.write((Primitive.Int.write(this.durationMonths)));
1417
+ b.write(Primitive.Int.write(this.durationMonths));
1408
1418
  }
1409
1419
  return b.buffer;
1410
1420
  }
@@ -1417,41 +1427,46 @@ export class SetCustomVerification extends TLObject {
1417
1427
  customDescription;
1418
1428
  constructor(params) {
1419
1429
  super();
1420
- this.classType = "functions";
1421
- this.className = "bots.SetCustomVerification";
1430
+ this.classType = 'functions';
1431
+ this.className = 'bots.SetCustomVerification';
1422
1432
  this.constructorId = 0xf4946757;
1423
1433
  this.subclassOfId = 0xf5b399ac;
1424
- this._slots = ["enabled", "bot", "peer", "customDescription"];
1434
+ this._slots = ['enabled', 'bot', 'peer', 'customDescription'];
1425
1435
  this.enabled = params.enabled;
1426
1436
  this.bot = params.bot;
1427
1437
  this.peer = params.peer;
1428
1438
  this.customDescription = params.customDescription;
1429
1439
  }
1430
1440
  /**
1431
- * Generate the TLObject from buffer.
1432
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1433
- */
1441
+ * Generate the TLObject from buffer.
1442
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1443
+ */
1434
1444
  static async read(_data, ..._args) {
1435
1445
  // @ts-ignore
1436
1446
  let flags = await Primitive.Int.read(_data);
1437
- let enabled = (flags & (1 << 1)) ? true : false;
1438
- let bot = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
1447
+ let enabled = flags & (1 << 1) ? true : false;
1448
+ let bot = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
1439
1449
  let peer = await TLObject.read(_data);
1440
- let customDescription = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
1441
- return new SetCustomVerification({ "enabled": enabled, "bot": bot, "peer": peer, "customDescription": customDescription });
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
+ });
1442
1457
  }
1443
1458
  /**
1444
- * Generate buffer from TLObject.
1445
- */
1459
+ * Generate buffer from TLObject.
1460
+ */
1446
1461
  write() {
1447
1462
  const b = new BytesIO();
1448
1463
  b.write(Primitive.Int.write(this.constructorId, false));
1449
1464
  // @ts-ignore
1450
1465
  let flags = 0;
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)));
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));
1455
1470
  if (this.bot !== undefined) {
1456
1471
  b.write(this.bot.write());
1457
1472
  }
@@ -1469,25 +1484,25 @@ export class GetBotRecommendations extends TLObject {
1469
1484
  bot;
1470
1485
  constructor(params) {
1471
1486
  super();
1472
- this.classType = "functions";
1473
- this.className = "bots.GetBotRecommendations";
1487
+ this.classType = 'functions';
1488
+ this.className = 'bots.GetBotRecommendations';
1474
1489
  this.constructorId = 0xa1b70815;
1475
1490
  this.subclassOfId = 0xf24bf0c0;
1476
- this._slots = ["bot"];
1491
+ this._slots = ['bot'];
1477
1492
  this.bot = params.bot;
1478
1493
  }
1479
1494
  /**
1480
- * Generate the TLObject from buffer.
1481
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1482
- */
1495
+ * Generate the TLObject from buffer.
1496
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1497
+ */
1483
1498
  static async read(_data, ..._args) {
1484
1499
  // no flags
1485
1500
  let bot = await TLObject.read(_data);
1486
- return new GetBotRecommendations({ "bot": bot });
1501
+ return new GetBotRecommendations({ bot: bot });
1487
1502
  }
1488
1503
  /**
1489
- * Generate buffer from TLObject.
1490
- */
1504
+ * Generate buffer from TLObject.
1505
+ */
1491
1506
  write() {
1492
1507
  const b = new BytesIO();
1493
1508
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1504,37 +1519,37 @@ export class CheckUsername extends TLObject {
1504
1519
  username;
1505
1520
  constructor(params) {
1506
1521
  super();
1507
- this.classType = "functions";
1508
- this.className = "bots.CheckUsername";
1522
+ this.classType = 'functions';
1523
+ this.className = 'bots.CheckUsername';
1509
1524
  this.constructorId = 0xe3ac4c61;
1510
1525
  this.subclassOfId = 0xf5b399ac;
1511
- this._slots = ["additional", "username"];
1526
+ this._slots = ['additional', 'username'];
1512
1527
  this.additional = params.additional;
1513
1528
  this.username = params.username;
1514
1529
  }
1515
1530
  /**
1516
- * Generate the TLObject from buffer.
1517
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1518
- */
1531
+ * Generate the TLObject from buffer.
1532
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1533
+ */
1519
1534
  static async read(_data, ..._args) {
1520
1535
  // @ts-ignore
1521
1536
  let flags = await Primitive.Int.read(_data);
1522
- let additional = (flags & (1 << 0)) ? true : false;
1537
+ let additional = flags & (1 << 0) ? true : false;
1523
1538
  let username = await Primitive.String.read(_data);
1524
- return new CheckUsername({ "additional": additional, "username": username });
1539
+ return new CheckUsername({ additional: additional, username: username });
1525
1540
  }
1526
1541
  /**
1527
- * Generate buffer from TLObject.
1528
- */
1542
+ * Generate buffer from TLObject.
1543
+ */
1529
1544
  write() {
1530
1545
  const b = new BytesIO();
1531
1546
  b.write(Primitive.Int.write(this.constructorId, false));
1532
1547
  // @ts-ignore
1533
1548
  let flags = 0;
1534
- flags |= this.additional ? (1 << 0) : 0;
1535
- b.write((Primitive.Int.write(flags)));
1549
+ flags |= this.additional ? 1 << 0 : 0;
1550
+ b.write(Primitive.Int.write(flags));
1536
1551
  if (this.username !== undefined) {
1537
- b.write((Primitive.String.write(this.username)));
1552
+ b.write(Primitive.String.write(this.username));
1538
1553
  }
1539
1554
  return b.buffer;
1540
1555
  }
@@ -1547,44 +1562,49 @@ export class CreateBot extends TLObject {
1547
1562
  managerId;
1548
1563
  constructor(params) {
1549
1564
  super();
1550
- this.classType = "functions";
1551
- this.className = "bots.CreateBot";
1565
+ this.classType = 'functions';
1566
+ this.className = 'bots.CreateBot';
1552
1567
  this.constructorId = 0xe5b17f2b;
1553
1568
  this.subclassOfId = 0x2da17977;
1554
- this._slots = ["viaDeeplink", "name", "username", "managerId"];
1569
+ this._slots = ['viaDeeplink', 'name', 'username', 'managerId'];
1555
1570
  this.viaDeeplink = params.viaDeeplink;
1556
1571
  this.name = params.name;
1557
1572
  this.username = params.username;
1558
1573
  this.managerId = params.managerId;
1559
1574
  }
1560
1575
  /**
1561
- * Generate the TLObject from buffer.
1562
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1563
- */
1576
+ * Generate the TLObject from buffer.
1577
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1578
+ */
1564
1579
  static async read(_data, ..._args) {
1565
1580
  // @ts-ignore
1566
1581
  let flags = await Primitive.Int.read(_data);
1567
- let viaDeeplink = (flags & (1 << 0)) ? true : false;
1582
+ let viaDeeplink = flags & (1 << 0) ? true : false;
1568
1583
  let name = await Primitive.String.read(_data);
1569
1584
  let username = await Primitive.String.read(_data);
1570
1585
  let managerId = await TLObject.read(_data);
1571
- return new CreateBot({ "viaDeeplink": viaDeeplink, "name": name, "username": username, "managerId": managerId });
1586
+ return new CreateBot({
1587
+ viaDeeplink: viaDeeplink,
1588
+ name: name,
1589
+ username: username,
1590
+ managerId: managerId,
1591
+ });
1572
1592
  }
1573
1593
  /**
1574
- * Generate buffer from TLObject.
1575
- */
1594
+ * Generate buffer from TLObject.
1595
+ */
1576
1596
  write() {
1577
1597
  const b = new BytesIO();
1578
1598
  b.write(Primitive.Int.write(this.constructorId, false));
1579
1599
  // @ts-ignore
1580
1600
  let flags = 0;
1581
- flags |= this.viaDeeplink ? (1 << 0) : 0;
1582
- b.write((Primitive.Int.write(flags)));
1601
+ flags |= this.viaDeeplink ? 1 << 0 : 0;
1602
+ b.write(Primitive.Int.write(flags));
1583
1603
  if (this.name !== undefined) {
1584
- b.write((Primitive.String.write(this.name)));
1604
+ b.write(Primitive.String.write(this.name));
1585
1605
  }
1586
1606
  if (this.username !== undefined) {
1587
- b.write((Primitive.String.write(this.username)));
1607
+ b.write(Primitive.String.write(this.username));
1588
1608
  }
1589
1609
  if (this.managerId !== undefined) {
1590
1610
  b.write(this.managerId.write());
@@ -1598,27 +1618,27 @@ export class ExportBotToken extends TLObject {
1598
1618
  revoke;
1599
1619
  constructor(params) {
1600
1620
  super();
1601
- this.classType = "functions";
1602
- this.className = "bots.ExportBotToken";
1621
+ this.classType = 'functions';
1622
+ this.className = 'bots.ExportBotToken';
1603
1623
  this.constructorId = 0xbd0d99eb;
1604
1624
  this.subclassOfId = 0x78496c77;
1605
- this._slots = ["bot", "revoke"];
1625
+ this._slots = ['bot', 'revoke'];
1606
1626
  this.bot = params.bot;
1607
1627
  this.revoke = params.revoke;
1608
1628
  }
1609
1629
  /**
1610
- * Generate the TLObject from buffer.
1611
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1612
- */
1630
+ * Generate the TLObject from buffer.
1631
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1632
+ */
1613
1633
  static async read(_data, ..._args) {
1614
1634
  // no flags
1615
1635
  let bot = await TLObject.read(_data);
1616
1636
  let revoke = await Primitive.Bool.read(_data);
1617
- return new ExportBotToken({ "bot": bot, "revoke": revoke });
1637
+ return new ExportBotToken({ bot: bot, revoke: revoke });
1618
1638
  }
1619
1639
  /**
1620
- * Generate buffer from TLObject.
1621
- */
1640
+ * Generate buffer from TLObject.
1641
+ */
1622
1642
  write() {
1623
1643
  const b = new BytesIO();
1624
1644
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1627,7 +1647,7 @@ export class ExportBotToken extends TLObject {
1627
1647
  b.write(this.bot.write());
1628
1648
  }
1629
1649
  if (this.revoke !== undefined) {
1630
- b.write((Primitive.Bool.write(this.revoke)));
1650
+ b.write(Primitive.Bool.write(this.revoke));
1631
1651
  }
1632
1652
  return b.buffer;
1633
1653
  }
@@ -1638,27 +1658,27 @@ export class RequestWebViewButton extends TLObject {
1638
1658
  button;
1639
1659
  constructor(params) {
1640
1660
  super();
1641
- this.classType = "functions";
1642
- this.className = "bots.RequestWebViewButton";
1661
+ this.classType = 'functions';
1662
+ this.className = 'bots.RequestWebViewButton';
1643
1663
  this.constructorId = 0x31a2a35e;
1644
1664
  this.subclassOfId = 0xf9df53a;
1645
- this._slots = ["userId", "button"];
1665
+ this._slots = ['userId', 'button'];
1646
1666
  this.userId = params.userId;
1647
1667
  this.button = params.button;
1648
1668
  }
1649
1669
  /**
1650
- * Generate the TLObject from buffer.
1651
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1652
- */
1670
+ * Generate the TLObject from buffer.
1671
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1672
+ */
1653
1673
  static async read(_data, ..._args) {
1654
1674
  // no flags
1655
1675
  let userId = await TLObject.read(_data);
1656
1676
  let button = await TLObject.read(_data);
1657
- return new RequestWebViewButton({ "userId": userId, "button": button });
1677
+ return new RequestWebViewButton({ userId: userId, button: button });
1658
1678
  }
1659
1679
  /**
1660
- * Generate buffer from TLObject.
1661
- */
1680
+ * Generate buffer from TLObject.
1681
+ */
1662
1682
  write() {
1663
1683
  const b = new BytesIO();
1664
1684
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1678,27 +1698,27 @@ export class GetRequestedWebViewButton extends TLObject {
1678
1698
  webappReqId;
1679
1699
  constructor(params) {
1680
1700
  super();
1681
- this.classType = "functions";
1682
- this.className = "bots.GetRequestedWebViewButton";
1701
+ this.classType = 'functions';
1702
+ this.className = 'bots.GetRequestedWebViewButton';
1683
1703
  this.constructorId = 0xbf25b7f3;
1684
1704
  this.subclassOfId = 0xbad74a3;
1685
- this._slots = ["bot", "webappReqId"];
1705
+ this._slots = ['bot', 'webappReqId'];
1686
1706
  this.bot = params.bot;
1687
1707
  this.webappReqId = params.webappReqId;
1688
1708
  }
1689
1709
  /**
1690
- * Generate the TLObject from buffer.
1691
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1692
- */
1710
+ * Generate the TLObject from buffer.
1711
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1712
+ */
1693
1713
  static async read(_data, ..._args) {
1694
1714
  // no flags
1695
1715
  let bot = await TLObject.read(_data);
1696
1716
  let webappReqId = await Primitive.String.read(_data);
1697
- return new GetRequestedWebViewButton({ "bot": bot, "webappReqId": webappReqId });
1717
+ return new GetRequestedWebViewButton({ bot: bot, webappReqId: webappReqId });
1698
1718
  }
1699
1719
  /**
1700
- * Generate buffer from TLObject.
1701
- */
1720
+ * Generate buffer from TLObject.
1721
+ */
1702
1722
  write() {
1703
1723
  const b = new BytesIO();
1704
1724
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1707,7 +1727,7 @@ export class GetRequestedWebViewButton extends TLObject {
1707
1727
  b.write(this.bot.write());
1708
1728
  }
1709
1729
  if (this.webappReqId !== undefined) {
1710
- b.write((Primitive.String.write(this.webappReqId)));
1730
+ b.write(Primitive.String.write(this.webappReqId));
1711
1731
  }
1712
1732
  return b.buffer;
1713
1733
  }
@@ -1717,25 +1737,25 @@ export class GetAccessSettings extends TLObject {
1717
1737
  bot;
1718
1738
  constructor(params) {
1719
1739
  super();
1720
- this.classType = "functions";
1721
- this.className = "bots.GetAccessSettings";
1740
+ this.classType = 'functions';
1741
+ this.className = 'bots.GetAccessSettings';
1722
1742
  this.constructorId = 0x213853a3;
1723
1743
  this.subclassOfId = 0xeca109c2;
1724
- this._slots = ["bot"];
1744
+ this._slots = ['bot'];
1725
1745
  this.bot = params.bot;
1726
1746
  }
1727
1747
  /**
1728
- * Generate the TLObject from buffer.
1729
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1730
- */
1748
+ * Generate the TLObject from buffer.
1749
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1750
+ */
1731
1751
  static async read(_data, ..._args) {
1732
1752
  // no flags
1733
1753
  let bot = await TLObject.read(_data);
1734
- return new GetAccessSettings({ "bot": bot });
1754
+ return new GetAccessSettings({ bot: bot });
1735
1755
  }
1736
1756
  /**
1737
- * Generate buffer from TLObject.
1738
- */
1757
+ * Generate buffer from TLObject.
1758
+ */
1739
1759
  write() {
1740
1760
  const b = new BytesIO();
1741
1761
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1753,43 +1773,43 @@ export class EditAccessSettings extends TLObject {
1753
1773
  addUsers;
1754
1774
  constructor(params) {
1755
1775
  super();
1756
- this.classType = "functions";
1757
- this.className = "bots.EditAccessSettings";
1776
+ this.classType = 'functions';
1777
+ this.className = 'bots.EditAccessSettings';
1758
1778
  this.constructorId = 0x31813cd8;
1759
1779
  this.subclassOfId = 0xf5b399ac;
1760
- this._slots = ["restricted", "bot", "addUsers"];
1780
+ this._slots = ['restricted', 'bot', 'addUsers'];
1761
1781
  this.restricted = params.restricted;
1762
1782
  this.bot = params.bot;
1763
1783
  this.addUsers = params.addUsers;
1764
1784
  }
1765
1785
  /**
1766
- * Generate the TLObject from buffer.
1767
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1768
- */
1786
+ * Generate the TLObject from buffer.
1787
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1788
+ */
1769
1789
  static async read(_data, ..._args) {
1770
1790
  // @ts-ignore
1771
1791
  let flags = await Primitive.Int.read(_data);
1772
- let restricted = (flags & (1 << 0)) ? true : false;
1792
+ let restricted = flags & (1 << 0) ? true : false;
1773
1793
  let bot = await TLObject.read(_data);
1774
- let addUsers = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
1775
- return new EditAccessSettings({ "restricted": restricted, "bot": bot, "addUsers": addUsers });
1794
+ let addUsers = flags & (1 << 1) ? await TLObject.read(_data) : [];
1795
+ return new EditAccessSettings({ restricted: restricted, bot: bot, addUsers: addUsers });
1776
1796
  }
1777
1797
  /**
1778
- * Generate buffer from TLObject.
1779
- */
1798
+ * Generate buffer from TLObject.
1799
+ */
1780
1800
  write() {
1781
1801
  const b = new BytesIO();
1782
1802
  b.write(Primitive.Int.write(this.constructorId, false));
1783
1803
  // @ts-ignore
1784
1804
  let flags = 0;
1785
- flags |= this.restricted ? (1 << 0) : 0;
1786
- flags |= this.addUsers ? (1 << 1) : 0;
1787
- b.write((Primitive.Int.write(flags)));
1805
+ flags |= this.restricted ? 1 << 0 : 0;
1806
+ flags |= this.addUsers ? 1 << 1 : 0;
1807
+ b.write(Primitive.Int.write(flags));
1788
1808
  if (this.bot !== undefined) {
1789
1809
  b.write(this.bot.write());
1790
1810
  }
1791
1811
  if (this.addUsers) {
1792
- b.write((Primitive.Vector.write(this.addUsers)));
1812
+ b.write(Primitive.Vector.write(this.addUsers));
1793
1813
  }
1794
1814
  return b.buffer;
1795
1815
  }
@@ -1800,33 +1820,33 @@ export class SetJoinChatResults extends TLObject {
1800
1820
  result;
1801
1821
  constructor(params) {
1802
1822
  super();
1803
- this.classType = "functions";
1804
- this.className = "bots.SetJoinChatResults";
1823
+ this.classType = 'functions';
1824
+ this.className = 'bots.SetJoinChatResults';
1805
1825
  this.constructorId = 0xe71a4810;
1806
1826
  this.subclassOfId = 0xf5b399ac;
1807
- this._slots = ["queryId", "result"];
1827
+ this._slots = ['queryId', 'result'];
1808
1828
  this.queryId = params.queryId;
1809
1829
  this.result = params.result;
1810
1830
  }
1811
1831
  /**
1812
- * Generate the TLObject from buffer.
1813
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1814
- */
1832
+ * Generate the TLObject from buffer.
1833
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1834
+ */
1815
1835
  static async read(_data, ..._args) {
1816
1836
  // no flags
1817
1837
  let queryId = await Primitive.Long.read(_data);
1818
1838
  let result = await TLObject.read(_data);
1819
- return new SetJoinChatResults({ "queryId": queryId, "result": result });
1839
+ return new SetJoinChatResults({ queryId: queryId, result: result });
1820
1840
  }
1821
1841
  /**
1822
- * Generate buffer from TLObject.
1823
- */
1842
+ * Generate buffer from TLObject.
1843
+ */
1824
1844
  write() {
1825
1845
  const b = new BytesIO();
1826
1846
  b.write(Primitive.Int.write(this.constructorId, false));
1827
1847
  // no flags
1828
1848
  if (this.queryId !== undefined) {
1829
- b.write((Primitive.Long.write(this.queryId)));
1849
+ b.write(Primitive.Long.write(this.queryId));
1830
1850
  }
1831
1851
  if (this.result !== undefined) {
1832
1852
  b.write(this.result.write());
@@ -1840,27 +1860,27 @@ export class AddUsername extends TLObject {
1840
1860
  username;
1841
1861
  constructor(params) {
1842
1862
  super();
1843
- this.classType = "functions";
1844
- this.className = "bots.AddUsername";
1863
+ this.classType = 'functions';
1864
+ this.className = 'bots.AddUsername';
1845
1865
  this.constructorId = 0x3501c08a;
1846
1866
  this.subclassOfId = 0xf5b399ac;
1847
- this._slots = ["bot", "username"];
1867
+ this._slots = ['bot', 'username'];
1848
1868
  this.bot = params.bot;
1849
1869
  this.username = params.username;
1850
1870
  }
1851
1871
  /**
1852
- * Generate the TLObject from buffer.
1853
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1854
- */
1872
+ * Generate the TLObject from buffer.
1873
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1874
+ */
1855
1875
  static async read(_data, ..._args) {
1856
1876
  // no flags
1857
1877
  let bot = await TLObject.read(_data);
1858
1878
  let username = await Primitive.String.read(_data);
1859
- return new AddUsername({ "bot": bot, "username": username });
1879
+ return new AddUsername({ bot: bot, username: username });
1860
1880
  }
1861
1881
  /**
1862
- * Generate buffer from TLObject.
1863
- */
1882
+ * Generate buffer from TLObject.
1883
+ */
1864
1884
  write() {
1865
1885
  const b = new BytesIO();
1866
1886
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1869,7 +1889,7 @@ export class AddUsername extends TLObject {
1869
1889
  b.write(this.bot.write());
1870
1890
  }
1871
1891
  if (this.username !== undefined) {
1872
- b.write((Primitive.String.write(this.username)));
1892
+ b.write(Primitive.String.write(this.username));
1873
1893
  }
1874
1894
  return b.buffer;
1875
1895
  }
@@ -1880,27 +1900,27 @@ export class RemoveUsername extends TLObject {
1880
1900
  username;
1881
1901
  constructor(params) {
1882
1902
  super();
1883
- this.classType = "functions";
1884
- this.className = "bots.RemoveUsername";
1903
+ this.classType = 'functions';
1904
+ this.className = 'bots.RemoveUsername';
1885
1905
  this.constructorId = 0xc704147d;
1886
1906
  this.subclassOfId = 0xf5b399ac;
1887
- this._slots = ["bot", "username"];
1907
+ this._slots = ['bot', 'username'];
1888
1908
  this.bot = params.bot;
1889
1909
  this.username = params.username;
1890
1910
  }
1891
1911
  /**
1892
- * Generate the TLObject from buffer.
1893
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1894
- */
1912
+ * Generate the TLObject from buffer.
1913
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1914
+ */
1895
1915
  static async read(_data, ..._args) {
1896
1916
  // no flags
1897
1917
  let bot = await TLObject.read(_data);
1898
1918
  let username = await Primitive.String.read(_data);
1899
- return new RemoveUsername({ "bot": bot, "username": username });
1919
+ return new RemoveUsername({ bot: bot, username: username });
1900
1920
  }
1901
1921
  /**
1902
- * Generate buffer from TLObject.
1903
- */
1922
+ * Generate buffer from TLObject.
1923
+ */
1904
1924
  write() {
1905
1925
  const b = new BytesIO();
1906
1926
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1909,7 +1929,354 @@ export class RemoveUsername extends TLObject {
1909
1929
  b.write(this.bot.write());
1910
1930
  }
1911
1931
  if (this.username !== undefined) {
1912
- b.write((Primitive.String.write(this.username)));
1932
+ b.write(Primitive.String.write(this.username));
1933
+ }
1934
+ return b.buffer;
1935
+ }
1936
+ }
1937
+ export class SetBotSettings extends TLObject {
1938
+ __response__;
1939
+ bot;
1940
+ inlineMode;
1941
+ inlinePlaceholder;
1942
+ inlineGeo;
1943
+ inlineFeedback;
1944
+ nochats;
1945
+ chatHistory;
1946
+ business;
1947
+ canManageBots;
1948
+ guestchat;
1949
+ guard;
1950
+ forumView;
1951
+ forumCanManageTopics;
1952
+ forumSidebar;
1953
+ botToBotCommunicationMode;
1954
+ callbackMode;
1955
+ constructor(params) {
1956
+ super();
1957
+ this.classType = 'functions';
1958
+ this.className = 'bots.SetBotSettings';
1959
+ this.constructorId = 0x7cc0c0ca;
1960
+ this.subclassOfId = 0x2da17977;
1961
+ this._slots = [
1962
+ 'bot',
1963
+ 'inlineMode',
1964
+ 'inlinePlaceholder',
1965
+ 'inlineGeo',
1966
+ 'inlineFeedback',
1967
+ 'nochats',
1968
+ 'chatHistory',
1969
+ 'business',
1970
+ 'canManageBots',
1971
+ 'guestchat',
1972
+ 'guard',
1973
+ 'forumView',
1974
+ 'forumCanManageTopics',
1975
+ 'forumSidebar',
1976
+ 'botToBotCommunicationMode',
1977
+ 'callbackMode',
1978
+ ];
1979
+ this.bot = params.bot;
1980
+ this.inlineMode = params.inlineMode;
1981
+ this.inlinePlaceholder = params.inlinePlaceholder;
1982
+ this.inlineGeo = params.inlineGeo;
1983
+ this.inlineFeedback = params.inlineFeedback;
1984
+ this.nochats = params.nochats;
1985
+ this.chatHistory = params.chatHistory;
1986
+ this.business = params.business;
1987
+ this.canManageBots = params.canManageBots;
1988
+ this.guestchat = params.guestchat;
1989
+ this.guard = params.guard;
1990
+ this.forumView = params.forumView;
1991
+ this.forumCanManageTopics = params.forumCanManageTopics;
1992
+ this.forumSidebar = params.forumSidebar;
1993
+ this.botToBotCommunicationMode = params.botToBotCommunicationMode;
1994
+ this.callbackMode = params.callbackMode;
1995
+ }
1996
+ /**
1997
+ * Generate the TLObject from buffer.
1998
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1999
+ */
2000
+ static async read(_data, ..._args) {
2001
+ // @ts-ignore
2002
+ let flags = await Primitive.Int.read(_data);
2003
+ let bot = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
2004
+ let inlineMode = flags & (1 << 1) ? await Primitive.Bool.read(_data) : undefined;
2005
+ let inlinePlaceholder = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
2006
+ let inlineGeo = flags & (1 << 3) ? await Primitive.Bool.read(_data) : undefined;
2007
+ let inlineFeedback = flags & (1 << 4) ? await Primitive.Int.read(_data) : undefined;
2008
+ let nochats = flags & (1 << 5) ? await Primitive.Bool.read(_data) : undefined;
2009
+ let chatHistory = flags & (1 << 6) ? await Primitive.Bool.read(_data) : undefined;
2010
+ let business = flags & (1 << 7) ? await Primitive.Bool.read(_data) : undefined;
2011
+ let canManageBots = flags & (1 << 8) ? await Primitive.Bool.read(_data) : undefined;
2012
+ let guestchat = flags & (1 << 9) ? await Primitive.Bool.read(_data) : undefined;
2013
+ let guard = flags & (1 << 10) ? await Primitive.Bool.read(_data) : undefined;
2014
+ let forumView = flags & (1 << 11) ? await Primitive.Bool.read(_data) : undefined;
2015
+ let forumCanManageTopics = flags & (1 << 12) ? await Primitive.Bool.read(_data) : undefined;
2016
+ let forumSidebar = flags & (1 << 13) ? await Primitive.Bool.read(_data) : undefined;
2017
+ let botToBotCommunicationMode = flags & (1 << 14) ? await Primitive.Bool.read(_data) : undefined;
2018
+ let callbackMode = flags & (1 << 15) ? await Primitive.String.read(_data) : undefined;
2019
+ return new SetBotSettings({
2020
+ bot: bot,
2021
+ inlineMode: inlineMode,
2022
+ inlinePlaceholder: inlinePlaceholder,
2023
+ inlineGeo: inlineGeo,
2024
+ inlineFeedback: inlineFeedback,
2025
+ nochats: nochats,
2026
+ chatHistory: chatHistory,
2027
+ business: business,
2028
+ canManageBots: canManageBots,
2029
+ guestchat: guestchat,
2030
+ guard: guard,
2031
+ forumView: forumView,
2032
+ forumCanManageTopics: forumCanManageTopics,
2033
+ forumSidebar: forumSidebar,
2034
+ botToBotCommunicationMode: botToBotCommunicationMode,
2035
+ callbackMode: callbackMode,
2036
+ });
2037
+ }
2038
+ /**
2039
+ * Generate buffer from TLObject.
2040
+ */
2041
+ write() {
2042
+ const b = new BytesIO();
2043
+ b.write(Primitive.Int.write(this.constructorId, false));
2044
+ // @ts-ignore
2045
+ let flags = 0;
2046
+ flags |= this.bot !== undefined ? 1 << 0 : 0;
2047
+ flags |= this.inlineMode !== undefined ? 1 << 1 : 0;
2048
+ flags |= this.inlinePlaceholder !== undefined ? 1 << 2 : 0;
2049
+ flags |= this.inlineGeo !== undefined ? 1 << 3 : 0;
2050
+ flags |= this.inlineFeedback !== undefined ? 1 << 4 : 0;
2051
+ flags |= this.nochats !== undefined ? 1 << 5 : 0;
2052
+ flags |= this.chatHistory !== undefined ? 1 << 6 : 0;
2053
+ flags |= this.business !== undefined ? 1 << 7 : 0;
2054
+ flags |= this.canManageBots !== undefined ? 1 << 8 : 0;
2055
+ flags |= this.guestchat !== undefined ? 1 << 9 : 0;
2056
+ flags |= this.guard !== undefined ? 1 << 10 : 0;
2057
+ flags |= this.forumView !== undefined ? 1 << 11 : 0;
2058
+ flags |= this.forumCanManageTopics !== undefined ? 1 << 12 : 0;
2059
+ flags |= this.forumSidebar !== undefined ? 1 << 13 : 0;
2060
+ flags |= this.botToBotCommunicationMode !== undefined ? 1 << 14 : 0;
2061
+ flags |= this.callbackMode !== undefined ? 1 << 15 : 0;
2062
+ b.write(Primitive.Int.write(flags));
2063
+ if (this.bot !== undefined) {
2064
+ b.write(this.bot.write());
2065
+ }
2066
+ if (this.inlineMode !== undefined) {
2067
+ b.write(Primitive.Bool.write(this.inlineMode));
2068
+ }
2069
+ if (this.inlinePlaceholder !== undefined) {
2070
+ b.write(Primitive.String.write(this.inlinePlaceholder));
2071
+ }
2072
+ if (this.inlineGeo !== undefined) {
2073
+ b.write(Primitive.Bool.write(this.inlineGeo));
2074
+ }
2075
+ if (this.inlineFeedback !== undefined) {
2076
+ b.write(Primitive.Int.write(this.inlineFeedback));
2077
+ }
2078
+ if (this.nochats !== undefined) {
2079
+ b.write(Primitive.Bool.write(this.nochats));
2080
+ }
2081
+ if (this.chatHistory !== undefined) {
2082
+ b.write(Primitive.Bool.write(this.chatHistory));
2083
+ }
2084
+ if (this.business !== undefined) {
2085
+ b.write(Primitive.Bool.write(this.business));
2086
+ }
2087
+ if (this.canManageBots !== undefined) {
2088
+ b.write(Primitive.Bool.write(this.canManageBots));
2089
+ }
2090
+ if (this.guestchat !== undefined) {
2091
+ b.write(Primitive.Bool.write(this.guestchat));
2092
+ }
2093
+ if (this.guard !== undefined) {
2094
+ b.write(Primitive.Bool.write(this.guard));
2095
+ }
2096
+ if (this.forumView !== undefined) {
2097
+ b.write(Primitive.Bool.write(this.forumView));
2098
+ }
2099
+ if (this.forumCanManageTopics !== undefined) {
2100
+ b.write(Primitive.Bool.write(this.forumCanManageTopics));
2101
+ }
2102
+ if (this.forumSidebar !== undefined) {
2103
+ b.write(Primitive.Bool.write(this.forumSidebar));
2104
+ }
2105
+ if (this.botToBotCommunicationMode !== undefined) {
2106
+ b.write(Primitive.Bool.write(this.botToBotCommunicationMode));
2107
+ }
2108
+ if (this.callbackMode !== undefined) {
2109
+ b.write(Primitive.String.write(this.callbackMode));
2110
+ }
2111
+ return b.buffer;
2112
+ }
2113
+ }
2114
+ export class GetProfileWidgetQueryAnswer extends TLObject {
2115
+ __response__;
2116
+ bot;
2117
+ queryType;
2118
+ data;
2119
+ constructor(params) {
2120
+ super();
2121
+ this.classType = 'functions';
2122
+ this.className = 'bots.GetProfileWidgetQueryAnswer';
2123
+ this.constructorId = 0x85748074;
2124
+ this.subclassOfId = 0xa7b102a;
2125
+ this._slots = ['bot', 'queryType', 'data'];
2126
+ this.bot = params.bot;
2127
+ this.queryType = params.queryType;
2128
+ this.data = params.data;
2129
+ }
2130
+ /**
2131
+ * Generate the TLObject from buffer.
2132
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2133
+ */
2134
+ static async read(_data, ..._args) {
2135
+ // no flags
2136
+ let bot = await TLObject.read(_data);
2137
+ let queryType = await TLObject.read(_data);
2138
+ let data = await Primitive.Bytes.read(_data);
2139
+ return new GetProfileWidgetQueryAnswer({ bot: bot, queryType: queryType, data: data });
2140
+ }
2141
+ /**
2142
+ * Generate buffer from TLObject.
2143
+ */
2144
+ write() {
2145
+ const b = new BytesIO();
2146
+ b.write(Primitive.Int.write(this.constructorId, false));
2147
+ // no flags
2148
+ if (this.bot !== undefined) {
2149
+ b.write(this.bot.write());
2150
+ }
2151
+ if (this.queryType !== undefined) {
2152
+ b.write(this.queryType.write());
2153
+ }
2154
+ if (this.data !== undefined) {
2155
+ b.write(Primitive.Bytes.write(this.data));
2156
+ }
2157
+ return b.buffer;
2158
+ }
2159
+ }
2160
+ export class EditProfileWidgetData extends TLObject {
2161
+ __response__;
2162
+ cacheTime;
2163
+ publicData;
2164
+ constructor(params) {
2165
+ super();
2166
+ this.classType = 'functions';
2167
+ this.className = 'bots.EditProfileWidgetData';
2168
+ this.constructorId = 0x35ff9572;
2169
+ this.subclassOfId = 0xf5b399ac;
2170
+ this._slots = ['cacheTime', 'publicData'];
2171
+ this.cacheTime = params.cacheTime;
2172
+ this.publicData = params.publicData;
2173
+ }
2174
+ /**
2175
+ * Generate the TLObject from buffer.
2176
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2177
+ */
2178
+ static async read(_data, ..._args) {
2179
+ // @ts-ignore
2180
+ let flags = await Primitive.Int.read(_data);
2181
+ let cacheTime = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
2182
+ let publicData = await Primitive.String.read(_data);
2183
+ return new EditProfileWidgetData({ cacheTime: cacheTime, publicData: publicData });
2184
+ }
2185
+ /**
2186
+ * Generate buffer from TLObject.
2187
+ */
2188
+ write() {
2189
+ const b = new BytesIO();
2190
+ b.write(Primitive.Int.write(this.constructorId, false));
2191
+ // @ts-ignore
2192
+ let flags = 0;
2193
+ flags |= this.cacheTime !== undefined ? 1 << 0 : 0;
2194
+ b.write(Primitive.Int.write(flags));
2195
+ if (this.cacheTime !== undefined) {
2196
+ b.write(Primitive.Int.write(this.cacheTime));
2197
+ }
2198
+ if (this.publicData !== undefined) {
2199
+ b.write(Primitive.String.write(this.publicData));
2200
+ }
2201
+ return b.buffer;
2202
+ }
2203
+ }
2204
+ export class EditProfileWidgetChatData extends TLObject {
2205
+ __response__;
2206
+ userId;
2207
+ chatData;
2208
+ constructor(params) {
2209
+ super();
2210
+ this.classType = 'functions';
2211
+ this.className = 'bots.EditProfileWidgetChatData';
2212
+ this.constructorId = 0xfcc22359;
2213
+ this.subclassOfId = 0xf5b399ac;
2214
+ this._slots = ['userId', 'chatData'];
2215
+ this.userId = params.userId;
2216
+ this.chatData = params.chatData;
2217
+ }
2218
+ /**
2219
+ * Generate the TLObject from buffer.
2220
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2221
+ */
2222
+ static async read(_data, ..._args) {
2223
+ // no flags
2224
+ let userId = await TLObject.read(_data);
2225
+ let chatData = await Primitive.String.read(_data);
2226
+ return new EditProfileWidgetChatData({ userId: userId, chatData: chatData });
2227
+ }
2228
+ /**
2229
+ * Generate buffer from TLObject.
2230
+ */
2231
+ write() {
2232
+ const b = new BytesIO();
2233
+ b.write(Primitive.Int.write(this.constructorId, false));
2234
+ // no flags
2235
+ if (this.userId !== undefined) {
2236
+ b.write(this.userId.write());
2237
+ }
2238
+ if (this.chatData !== undefined) {
2239
+ b.write(Primitive.String.write(this.chatData));
2240
+ }
2241
+ return b.buffer;
2242
+ }
2243
+ }
2244
+ export class GetProfileWidgetPublicData extends TLObject {
2245
+ __response__;
2246
+ bot;
2247
+ hash;
2248
+ constructor(params) {
2249
+ super();
2250
+ this.classType = 'functions';
2251
+ this.className = 'bots.GetProfileWidgetPublicData';
2252
+ this.constructorId = 0x72a0d773;
2253
+ this.subclassOfId = 0x30e16d71;
2254
+ this._slots = ['bot', 'hash'];
2255
+ this.bot = params.bot;
2256
+ this.hash = params.hash;
2257
+ }
2258
+ /**
2259
+ * Generate the TLObject from buffer.
2260
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2261
+ */
2262
+ static async read(_data, ..._args) {
2263
+ // no flags
2264
+ let bot = await TLObject.read(_data);
2265
+ let hash = await Primitive.Long.read(_data);
2266
+ return new GetProfileWidgetPublicData({ bot: bot, hash: hash });
2267
+ }
2268
+ /**
2269
+ * Generate buffer from TLObject.
2270
+ */
2271
+ write() {
2272
+ const b = new BytesIO();
2273
+ b.write(Primitive.Int.write(this.constructorId, false));
2274
+ // no flags
2275
+ if (this.bot !== undefined) {
2276
+ b.write(this.bot.write());
2277
+ }
2278
+ if (this.hash !== undefined) {
2279
+ b.write(Primitive.Long.write(this.hash));
1913
2280
  }
1914
2281
  return b.buffer;
1915
2282
  }