@tgsnake/skema 3.2.1-browser.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/src/deps.d.ts +3 -4
  2. package/dist/src/deps.js +4 -4
  3. package/dist/src/raw/class/All.d.ts +1 -1
  4. package/dist/src/raw/class/All.js +2783 -2783
  5. package/dist/src/raw/class/Raw.d.ts +7601 -7601
  6. package/dist/src/raw/class/Raw.js +20676 -26781
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1813 -1983
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +117 -128
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +714 -849
  13. package/dist/src/raw/class/tl/bots.d.ts +256 -256
  14. package/dist/src/raw/class/tl/bots.js +607 -661
  15. package/dist/src/raw/class/tl/channels.d.ts +336 -336
  16. package/dist/src/raw/class/tl/channels.js +745 -836
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +183 -196
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +138 -159
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +492 -537
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +152 -204
  25. package/dist/src/raw/class/tl/feed.d.ts +71 -71
  26. package/dist/src/raw/class/tl/feed.js +179 -214
  27. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  28. package/dist/src/raw/class/tl/folders.js +11 -11
  29. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  30. package/dist/src/raw/class/tl/fragment.js +25 -32
  31. package/dist/src/raw/class/tl/help.d.ts +286 -286
  32. package/dist/src/raw/class/tl/help.js +618 -686
  33. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  34. package/dist/src/raw/class/tl/langpack.js +57 -57
  35. package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
  36. package/dist/src/raw/class/tl/messages.js +4886 -5965
  37. package/dist/src/raw/class/tl/payments.d.ts +646 -646
  38. package/dist/src/raw/class/tl/payments.js +1766 -2254
  39. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  40. package/dist/src/raw/class/tl/phone.js +644 -779
  41. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  42. package/dist/src/raw/class/tl/photos.js +116 -139
  43. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  44. package/dist/src/raw/class/tl/premium.js +111 -133
  45. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  46. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  47. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  48. package/dist/src/raw/class/tl/stats.js +169 -268
  49. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  50. package/dist/src/raw/class/tl/stickers.js +144 -173
  51. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  52. package/dist/src/raw/class/tl/storage.js +71 -71
  53. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  54. package/dist/src/raw/class/tl/stories.js +622 -781
  55. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  56. package/dist/src/raw/class/tl/toncenter.js +47 -52
  57. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  58. package/dist/src/raw/class/tl/updates.js +175 -246
  59. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  60. package/dist/src/raw/class/tl/upload.js +155 -178
  61. package/dist/src/raw/class/tl/users.d.ts +61 -61
  62. package/dist/src/raw/class/tl/users.js +124 -124
  63. package/dist/src/raw/class/tl/wallet.d.ts +221 -221
  64. package/dist/src/raw/class/tl/wallet.js +558 -624
  65. package/dist/src/raw/class/types.d.ts +1 -1
  66. package/dist/src/raw/class/types.js +1 -1
  67. package/package.json +4 -6
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -14,31 +14,31 @@ export class SuggestedShortName extends TLObject {
14
14
  shortName;
15
15
  constructor(params) {
16
16
  super();
17
- this.classType = 'types';
18
- this.className = 'stickers.SuggestedShortName';
17
+ this.classType = "types";
18
+ this.className = "stickers.SuggestedShortName";
19
19
  this.constructorId = 0x85fea03f;
20
20
  this.subclassOfId = 0xc44a4b21;
21
- this._slots = ['shortName'];
21
+ this._slots = ["shortName"];
22
22
  this.shortName = params.shortName;
23
23
  }
24
24
  /**
25
- * Generate the TLObject from buffer.
26
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
27
- */
25
+ * Generate the TLObject from buffer.
26
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
27
+ */
28
28
  static async read(_data, ..._args) {
29
29
  // no flags
30
30
  let shortName = await Primitive.String.read(_data);
31
- return new SuggestedShortName({ shortName: shortName });
31
+ return new SuggestedShortName({ "shortName": shortName });
32
32
  }
33
33
  /**
34
- * Generate buffer from TLObject.
35
- */
34
+ * Generate buffer from TLObject.
35
+ */
36
36
  write() {
37
37
  const b = new BytesIO();
38
38
  b.write(Primitive.Int.write(this.constructorId, false));
39
39
  // no flags
40
40
  if (this.shortName !== undefined) {
41
- b.write(Primitive.String.write(this.shortName));
41
+ b.write((Primitive.String.write(this.shortName)));
42
42
  }
43
43
  return b.buffer;
44
44
  }
@@ -56,21 +56,11 @@ export class CreateStickerSet extends TLObject {
56
56
  software;
57
57
  constructor(params) {
58
58
  super();
59
- this.classType = 'functions';
60
- this.className = 'stickers.CreateStickerSet';
59
+ this.classType = "functions";
60
+ this.className = "stickers.CreateStickerSet";
61
61
  this.constructorId = 0x9021ab67;
62
62
  this.subclassOfId = 0x9b704a5a;
63
- this._slots = [
64
- 'masks',
65
- 'emojis',
66
- 'textColor',
67
- 'userId',
68
- 'title',
69
- 'shortName',
70
- 'thumb',
71
- 'stickers',
72
- 'software',
73
- ];
63
+ this._slots = ["masks", "emojis", "textColor", "userId", "title", "shortName", "thumb", "stickers", "software"];
74
64
  this.masks = params.masks;
75
65
  this.emojis = params.emojis;
76
66
  this.textColor = params.textColor;
@@ -82,64 +72,54 @@ export class CreateStickerSet extends TLObject {
82
72
  this.software = params.software;
83
73
  }
84
74
  /**
85
- * Generate the TLObject from buffer.
86
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
87
- */
75
+ * Generate the TLObject from buffer.
76
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
77
+ */
88
78
  static async read(_data, ..._args) {
89
79
  // @ts-ignore
90
80
  let flags = await Primitive.Int.read(_data);
91
- let masks = flags & (1 << 0) ? true : false;
92
- let emojis = flags & (1 << 5) ? true : false;
93
- let textColor = flags & (1 << 6) ? true : false;
81
+ let masks = (flags & (1 << 0)) ? true : false;
82
+ let emojis = (flags & (1 << 5)) ? true : false;
83
+ let textColor = (flags & (1 << 6)) ? true : false;
94
84
  let userId = await TLObject.read(_data);
95
85
  let title = await Primitive.String.read(_data);
96
86
  let shortName = await Primitive.String.read(_data);
97
- let thumb = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
87
+ let thumb = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
98
88
  let stickers = await TLObject.read(_data);
99
- let software = flags & (1 << 3) ? await Primitive.String.read(_data) : undefined;
100
- return new CreateStickerSet({
101
- masks: masks,
102
- emojis: emojis,
103
- textColor: textColor,
104
- userId: userId,
105
- title: title,
106
- shortName: shortName,
107
- thumb: thumb,
108
- stickers: stickers,
109
- software: software,
110
- });
89
+ let software = (flags & (1 << 3)) ? await Primitive.String.read(_data) : undefined;
90
+ return new CreateStickerSet({ "masks": masks, "emojis": emojis, "textColor": textColor, "userId": userId, "title": title, "shortName": shortName, "thumb": thumb, "stickers": stickers, "software": software });
111
91
  }
112
92
  /**
113
- * Generate buffer from TLObject.
114
- */
93
+ * Generate buffer from TLObject.
94
+ */
115
95
  write() {
116
96
  const b = new BytesIO();
117
97
  b.write(Primitive.Int.write(this.constructorId, false));
118
98
  // @ts-ignore
119
99
  let flags = 0;
120
- flags |= this.masks ? 1 << 0 : 0;
121
- flags |= this.emojis ? 1 << 5 : 0;
122
- flags |= this.textColor ? 1 << 6 : 0;
123
- flags |= this.thumb !== undefined ? 1 << 2 : 0;
124
- flags |= this.software !== undefined ? 1 << 3 : 0;
125
- b.write(Primitive.Int.write(flags));
100
+ flags |= this.masks ? (1 << 0) : 0;
101
+ flags |= this.emojis ? (1 << 5) : 0;
102
+ flags |= this.textColor ? (1 << 6) : 0;
103
+ flags |= this.thumb !== undefined ? (1 << 2) : 0;
104
+ flags |= this.software !== undefined ? (1 << 3) : 0;
105
+ b.write((Primitive.Int.write(flags)));
126
106
  if (this.userId !== undefined) {
127
107
  b.write(this.userId.write());
128
108
  }
129
109
  if (this.title !== undefined) {
130
- b.write(Primitive.String.write(this.title));
110
+ b.write((Primitive.String.write(this.title)));
131
111
  }
132
112
  if (this.shortName !== undefined) {
133
- b.write(Primitive.String.write(this.shortName));
113
+ b.write((Primitive.String.write(this.shortName)));
134
114
  }
135
115
  if (this.thumb !== undefined) {
136
116
  b.write(this.thumb.write());
137
117
  }
138
118
  if (this.stickers) {
139
- b.write(Primitive.Vector.write(this.stickers));
119
+ b.write((Primitive.Vector.write(this.stickers)));
140
120
  }
141
121
  if (this.software !== undefined) {
142
- b.write(Primitive.String.write(this.software));
122
+ b.write((Primitive.String.write(this.software)));
143
123
  }
144
124
  return b.buffer;
145
125
  }
@@ -149,25 +129,25 @@ export class RemoveStickerFromSet extends TLObject {
149
129
  sticker;
150
130
  constructor(params) {
151
131
  super();
152
- this.classType = 'functions';
153
- this.className = 'stickers.RemoveStickerFromSet';
132
+ this.classType = "functions";
133
+ this.className = "stickers.RemoveStickerFromSet";
154
134
  this.constructorId = 0xf7760f51;
155
135
  this.subclassOfId = 0x9b704a5a;
156
- this._slots = ['sticker'];
136
+ this._slots = ["sticker"];
157
137
  this.sticker = params.sticker;
158
138
  }
159
139
  /**
160
- * Generate the TLObject from buffer.
161
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
162
- */
140
+ * Generate the TLObject from buffer.
141
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
142
+ */
163
143
  static async read(_data, ..._args) {
164
144
  // no flags
165
145
  let sticker = await TLObject.read(_data);
166
- return new RemoveStickerFromSet({ sticker: sticker });
146
+ return new RemoveStickerFromSet({ "sticker": sticker });
167
147
  }
168
148
  /**
169
- * Generate buffer from TLObject.
170
- */
149
+ * Generate buffer from TLObject.
150
+ */
171
151
  write() {
172
152
  const b = new BytesIO();
173
153
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -184,27 +164,27 @@ export class ChangeStickerPosition extends TLObject {
184
164
  position;
185
165
  constructor(params) {
186
166
  super();
187
- this.classType = 'functions';
188
- this.className = 'stickers.ChangeStickerPosition';
167
+ this.classType = "functions";
168
+ this.className = "stickers.ChangeStickerPosition";
189
169
  this.constructorId = 0xffb6d4ca;
190
170
  this.subclassOfId = 0x9b704a5a;
191
- this._slots = ['sticker', 'position'];
171
+ this._slots = ["sticker", "position"];
192
172
  this.sticker = params.sticker;
193
173
  this.position = params.position;
194
174
  }
195
175
  /**
196
- * Generate the TLObject from buffer.
197
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
198
- */
176
+ * Generate the TLObject from buffer.
177
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
178
+ */
199
179
  static async read(_data, ..._args) {
200
180
  // no flags
201
181
  let sticker = await TLObject.read(_data);
202
182
  let position = await Primitive.Int.read(_data);
203
- return new ChangeStickerPosition({ sticker: sticker, position: position });
183
+ return new ChangeStickerPosition({ "sticker": sticker, "position": position });
204
184
  }
205
185
  /**
206
- * Generate buffer from TLObject.
207
- */
186
+ * Generate buffer from TLObject.
187
+ */
208
188
  write() {
209
189
  const b = new BytesIO();
210
190
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -213,7 +193,7 @@ export class ChangeStickerPosition extends TLObject {
213
193
  b.write(this.sticker.write());
214
194
  }
215
195
  if (this.position !== undefined) {
216
- b.write(Primitive.Int.write(this.position));
196
+ b.write((Primitive.Int.write(this.position)));
217
197
  }
218
198
  return b.buffer;
219
199
  }
@@ -224,27 +204,27 @@ export class AddStickerToSet extends TLObject {
224
204
  sticker;
225
205
  constructor(params) {
226
206
  super();
227
- this.classType = 'functions';
228
- this.className = 'stickers.AddStickerToSet';
207
+ this.classType = "functions";
208
+ this.className = "stickers.AddStickerToSet";
229
209
  this.constructorId = 0x8653febe;
230
210
  this.subclassOfId = 0x9b704a5a;
231
- this._slots = ['stickerset', 'sticker'];
211
+ this._slots = ["stickerset", "sticker"];
232
212
  this.stickerset = params.stickerset;
233
213
  this.sticker = params.sticker;
234
214
  }
235
215
  /**
236
- * Generate the TLObject from buffer.
237
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
238
- */
216
+ * Generate the TLObject from buffer.
217
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
218
+ */
239
219
  static async read(_data, ..._args) {
240
220
  // no flags
241
221
  let stickerset = await TLObject.read(_data);
242
222
  let sticker = await TLObject.read(_data);
243
- return new AddStickerToSet({ stickerset: stickerset, sticker: sticker });
223
+ return new AddStickerToSet({ "stickerset": stickerset, "sticker": sticker });
244
224
  }
245
225
  /**
246
- * Generate buffer from TLObject.
247
- */
226
+ * Generate buffer from TLObject.
227
+ */
248
228
  write() {
249
229
  const b = new BytesIO();
250
230
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -265,42 +245,38 @@ export class SetStickerSetThumb extends TLObject {
265
245
  thumbDocumentId;
266
246
  constructor(params) {
267
247
  super();
268
- this.classType = 'functions';
269
- this.className = 'stickers.SetStickerSetThumb';
248
+ this.classType = "functions";
249
+ this.className = "stickers.SetStickerSetThumb";
270
250
  this.constructorId = 0xa76a5392;
271
251
  this.subclassOfId = 0x9b704a5a;
272
- this._slots = ['stickerset', 'thumb', 'thumbDocumentId'];
252
+ this._slots = ["stickerset", "thumb", "thumbDocumentId"];
273
253
  this.stickerset = params.stickerset;
274
254
  this.thumb = params.thumb;
275
255
  this.thumbDocumentId = params.thumbDocumentId;
276
256
  }
277
257
  /**
278
- * Generate the TLObject from buffer.
279
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
280
- */
258
+ * Generate the TLObject from buffer.
259
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
260
+ */
281
261
  static async read(_data, ..._args) {
282
262
  // @ts-ignore
283
263
  let flags = await Primitive.Int.read(_data);
284
264
  let stickerset = await TLObject.read(_data);
285
- let thumb = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
286
- let thumbDocumentId = flags & (1 << 1) ? await Primitive.Long.read(_data) : undefined;
287
- return new SetStickerSetThumb({
288
- stickerset: stickerset,
289
- thumb: thumb,
290
- thumbDocumentId: thumbDocumentId,
291
- });
265
+ let thumb = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
266
+ let thumbDocumentId = (flags & (1 << 1)) ? await Primitive.Long.read(_data) : undefined;
267
+ return new SetStickerSetThumb({ "stickerset": stickerset, "thumb": thumb, "thumbDocumentId": thumbDocumentId });
292
268
  }
293
269
  /**
294
- * Generate buffer from TLObject.
295
- */
270
+ * Generate buffer from TLObject.
271
+ */
296
272
  write() {
297
273
  const b = new BytesIO();
298
274
  b.write(Primitive.Int.write(this.constructorId, false));
299
275
  // @ts-ignore
300
276
  let flags = 0;
301
- flags |= this.thumb !== undefined ? 1 << 0 : 0;
302
- flags |= this.thumbDocumentId !== undefined ? 1 << 1 : 0;
303
- b.write(Primitive.Int.write(flags));
277
+ flags |= this.thumb !== undefined ? (1 << 0) : 0;
278
+ flags |= this.thumbDocumentId !== undefined ? (1 << 1) : 0;
279
+ b.write((Primitive.Int.write(flags)));
304
280
  if (this.stickerset !== undefined) {
305
281
  b.write(this.stickerset.write());
306
282
  }
@@ -308,7 +284,7 @@ export class SetStickerSetThumb extends TLObject {
308
284
  b.write(this.thumb.write());
309
285
  }
310
286
  if (this.thumbDocumentId !== undefined) {
311
- b.write(Primitive.Long.write(this.thumbDocumentId));
287
+ b.write((Primitive.Long.write(this.thumbDocumentId)));
312
288
  }
313
289
  return b.buffer;
314
290
  }
@@ -318,31 +294,31 @@ export class CheckShortName extends TLObject {
318
294
  shortName;
319
295
  constructor(params) {
320
296
  super();
321
- this.classType = 'functions';
322
- this.className = 'stickers.CheckShortName';
297
+ this.classType = "functions";
298
+ this.className = "stickers.CheckShortName";
323
299
  this.constructorId = 0x284b3639;
324
300
  this.subclassOfId = 0xf5b399ac;
325
- this._slots = ['shortName'];
301
+ this._slots = ["shortName"];
326
302
  this.shortName = params.shortName;
327
303
  }
328
304
  /**
329
- * Generate the TLObject from buffer.
330
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
331
- */
305
+ * Generate the TLObject from buffer.
306
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
307
+ */
332
308
  static async read(_data, ..._args) {
333
309
  // no flags
334
310
  let shortName = await Primitive.String.read(_data);
335
- return new CheckShortName({ shortName: shortName });
311
+ return new CheckShortName({ "shortName": shortName });
336
312
  }
337
313
  /**
338
- * Generate buffer from TLObject.
339
- */
314
+ * Generate buffer from TLObject.
315
+ */
340
316
  write() {
341
317
  const b = new BytesIO();
342
318
  b.write(Primitive.Int.write(this.constructorId, false));
343
319
  // no flags
344
320
  if (this.shortName !== undefined) {
345
- b.write(Primitive.String.write(this.shortName));
321
+ b.write((Primitive.String.write(this.shortName)));
346
322
  }
347
323
  return b.buffer;
348
324
  }
@@ -352,31 +328,31 @@ export class SuggestShortName extends TLObject {
352
328
  title;
353
329
  constructor(params) {
354
330
  super();
355
- this.classType = 'functions';
356
- this.className = 'stickers.SuggestShortName';
331
+ this.classType = "functions";
332
+ this.className = "stickers.SuggestShortName";
357
333
  this.constructorId = 0x4dafc503;
358
334
  this.subclassOfId = 0xc44a4b21;
359
- this._slots = ['title'];
335
+ this._slots = ["title"];
360
336
  this.title = params.title;
361
337
  }
362
338
  /**
363
- * Generate the TLObject from buffer.
364
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
365
- */
339
+ * Generate the TLObject from buffer.
340
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
341
+ */
366
342
  static async read(_data, ..._args) {
367
343
  // no flags
368
344
  let title = await Primitive.String.read(_data);
369
- return new SuggestShortName({ title: title });
345
+ return new SuggestShortName({ "title": title });
370
346
  }
371
347
  /**
372
- * Generate buffer from TLObject.
373
- */
348
+ * Generate buffer from TLObject.
349
+ */
374
350
  write() {
375
351
  const b = new BytesIO();
376
352
  b.write(Primitive.Int.write(this.constructorId, false));
377
353
  // no flags
378
354
  if (this.title !== undefined) {
379
- b.write(Primitive.String.write(this.title));
355
+ b.write((Primitive.String.write(this.title)));
380
356
  }
381
357
  return b.buffer;
382
358
  }
@@ -389,57 +365,52 @@ export class ChangeSticker extends TLObject {
389
365
  keywords;
390
366
  constructor(params) {
391
367
  super();
392
- this.classType = 'functions';
393
- this.className = 'stickers.ChangeSticker';
368
+ this.classType = "functions";
369
+ this.className = "stickers.ChangeSticker";
394
370
  this.constructorId = 0xf5537ebc;
395
371
  this.subclassOfId = 0x9b704a5a;
396
- this._slots = ['sticker', 'emoji', 'maskCoords', 'keywords'];
372
+ this._slots = ["sticker", "emoji", "maskCoords", "keywords"];
397
373
  this.sticker = params.sticker;
398
374
  this.emoji = params.emoji;
399
375
  this.maskCoords = params.maskCoords;
400
376
  this.keywords = params.keywords;
401
377
  }
402
378
  /**
403
- * Generate the TLObject from buffer.
404
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
405
- */
379
+ * Generate the TLObject from buffer.
380
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
381
+ */
406
382
  static async read(_data, ..._args) {
407
383
  // @ts-ignore
408
384
  let flags = await Primitive.Int.read(_data);
409
385
  let sticker = await TLObject.read(_data);
410
- let emoji = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
411
- let maskCoords = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
412
- let keywords = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
413
- return new ChangeSticker({
414
- sticker: sticker,
415
- emoji: emoji,
416
- maskCoords: maskCoords,
417
- keywords: keywords,
418
- });
386
+ let emoji = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
387
+ let maskCoords = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
388
+ let keywords = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
389
+ return new ChangeSticker({ "sticker": sticker, "emoji": emoji, "maskCoords": maskCoords, "keywords": keywords });
419
390
  }
420
391
  /**
421
- * Generate buffer from TLObject.
422
- */
392
+ * Generate buffer from TLObject.
393
+ */
423
394
  write() {
424
395
  const b = new BytesIO();
425
396
  b.write(Primitive.Int.write(this.constructorId, false));
426
397
  // @ts-ignore
427
398
  let flags = 0;
428
- flags |= this.emoji !== undefined ? 1 << 0 : 0;
429
- flags |= this.maskCoords !== undefined ? 1 << 1 : 0;
430
- flags |= this.keywords !== undefined ? 1 << 2 : 0;
431
- b.write(Primitive.Int.write(flags));
399
+ flags |= this.emoji !== undefined ? (1 << 0) : 0;
400
+ flags |= this.maskCoords !== undefined ? (1 << 1) : 0;
401
+ flags |= this.keywords !== undefined ? (1 << 2) : 0;
402
+ b.write((Primitive.Int.write(flags)));
432
403
  if (this.sticker !== undefined) {
433
404
  b.write(this.sticker.write());
434
405
  }
435
406
  if (this.emoji !== undefined) {
436
- b.write(Primitive.String.write(this.emoji));
407
+ b.write((Primitive.String.write(this.emoji)));
437
408
  }
438
409
  if (this.maskCoords !== undefined) {
439
410
  b.write(this.maskCoords.write());
440
411
  }
441
412
  if (this.keywords !== undefined) {
442
- b.write(Primitive.String.write(this.keywords));
413
+ b.write((Primitive.String.write(this.keywords)));
443
414
  }
444
415
  return b.buffer;
445
416
  }
@@ -450,27 +421,27 @@ export class RenameStickerSet extends TLObject {
450
421
  title;
451
422
  constructor(params) {
452
423
  super();
453
- this.classType = 'functions';
454
- this.className = 'stickers.RenameStickerSet';
424
+ this.classType = "functions";
425
+ this.className = "stickers.RenameStickerSet";
455
426
  this.constructorId = 0x124b1c00;
456
427
  this.subclassOfId = 0x9b704a5a;
457
- this._slots = ['stickerset', 'title'];
428
+ this._slots = ["stickerset", "title"];
458
429
  this.stickerset = params.stickerset;
459
430
  this.title = params.title;
460
431
  }
461
432
  /**
462
- * Generate the TLObject from buffer.
463
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
464
- */
433
+ * Generate the TLObject from buffer.
434
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
435
+ */
465
436
  static async read(_data, ..._args) {
466
437
  // no flags
467
438
  let stickerset = await TLObject.read(_data);
468
439
  let title = await Primitive.String.read(_data);
469
- return new RenameStickerSet({ stickerset: stickerset, title: title });
440
+ return new RenameStickerSet({ "stickerset": stickerset, "title": title });
470
441
  }
471
442
  /**
472
- * Generate buffer from TLObject.
473
- */
443
+ * Generate buffer from TLObject.
444
+ */
474
445
  write() {
475
446
  const b = new BytesIO();
476
447
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -479,7 +450,7 @@ export class RenameStickerSet extends TLObject {
479
450
  b.write(this.stickerset.write());
480
451
  }
481
452
  if (this.title !== undefined) {
482
- b.write(Primitive.String.write(this.title));
453
+ b.write((Primitive.String.write(this.title)));
483
454
  }
484
455
  return b.buffer;
485
456
  }
@@ -489,25 +460,25 @@ export class DeleteStickerSet extends TLObject {
489
460
  stickerset;
490
461
  constructor(params) {
491
462
  super();
492
- this.classType = 'functions';
493
- this.className = 'stickers.DeleteStickerSet';
463
+ this.classType = "functions";
464
+ this.className = "stickers.DeleteStickerSet";
494
465
  this.constructorId = 0x87704394;
495
466
  this.subclassOfId = 0xf5b399ac;
496
- this._slots = ['stickerset'];
467
+ this._slots = ["stickerset"];
497
468
  this.stickerset = params.stickerset;
498
469
  }
499
470
  /**
500
- * Generate the TLObject from buffer.
501
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
502
- */
471
+ * Generate the TLObject from buffer.
472
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
473
+ */
503
474
  static async read(_data, ..._args) {
504
475
  // no flags
505
476
  let stickerset = await TLObject.read(_data);
506
- return new DeleteStickerSet({ stickerset: stickerset });
477
+ return new DeleteStickerSet({ "stickerset": stickerset });
507
478
  }
508
479
  /**
509
- * Generate buffer from TLObject.
510
- */
480
+ * Generate buffer from TLObject.
481
+ */
511
482
  write() {
512
483
  const b = new BytesIO();
513
484
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -524,27 +495,27 @@ export class ReplaceSticker extends TLObject {
524
495
  newSticker;
525
496
  constructor(params) {
526
497
  super();
527
- this.classType = 'functions';
528
- this.className = 'stickers.ReplaceSticker';
498
+ this.classType = "functions";
499
+ this.className = "stickers.ReplaceSticker";
529
500
  this.constructorId = 0x4696459a;
530
501
  this.subclassOfId = 0x9b704a5a;
531
- this._slots = ['sticker', 'newSticker'];
502
+ this._slots = ["sticker", "newSticker"];
532
503
  this.sticker = params.sticker;
533
504
  this.newSticker = params.newSticker;
534
505
  }
535
506
  /**
536
- * Generate the TLObject from buffer.
537
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
538
- */
507
+ * Generate the TLObject from buffer.
508
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
509
+ */
539
510
  static async read(_data, ..._args) {
540
511
  // no flags
541
512
  let sticker = await TLObject.read(_data);
542
513
  let newSticker = await TLObject.read(_data);
543
- return new ReplaceSticker({ sticker: sticker, newSticker: newSticker });
514
+ return new ReplaceSticker({ "sticker": sticker, "newSticker": newSticker });
544
515
  }
545
516
  /**
546
- * Generate buffer from TLObject.
547
- */
517
+ * Generate buffer from TLObject.
518
+ */
548
519
  write() {
549
520
  const b = new BytesIO();
550
521
  b.write(Primitive.Int.write(this.constructorId, false));