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