@tgsnake/skema 2.2.0 → 2.3.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/README.md +1 -1
- package/dist/src/raw/All.d.ts +44 -5
- package/dist/src/raw/All.js +44 -5
- package/dist/src/raw/Raw.d.ts +823 -16
- package/dist/src/raw/Raw.js +2274 -96
- package/package.json +1 -1
package/dist/src/raw/Raw.js
CHANGED
|
@@ -23,7 +23,7 @@ export var Raw;
|
|
|
23
23
|
/**
|
|
24
24
|
* The Telegram layer we using.
|
|
25
25
|
*/
|
|
26
|
-
Raw.Layer =
|
|
26
|
+
Raw.Layer = 228;
|
|
27
27
|
/**
|
|
28
28
|
* The highest telegram secret chat schema layer.
|
|
29
29
|
*/
|
|
@@ -5114,11 +5114,12 @@ export var Raw;
|
|
|
5114
5114
|
botActiveUsers;
|
|
5115
5115
|
botVerificationIcon;
|
|
5116
5116
|
sendPaidMessagesStars;
|
|
5117
|
+
linkedCommunityId;
|
|
5117
5118
|
constructor(params) {
|
|
5118
5119
|
super();
|
|
5119
5120
|
this.classType = 'types';
|
|
5120
5121
|
this.className = 'User';
|
|
5121
|
-
this.constructorId =
|
|
5122
|
+
this.constructorId = 0xb1b8cc83;
|
|
5122
5123
|
this.subclassOfId = 0x2da17977;
|
|
5123
5124
|
this._slots = [
|
|
5124
5125
|
'self',
|
|
@@ -5171,6 +5172,7 @@ export var Raw;
|
|
|
5171
5172
|
'botActiveUsers',
|
|
5172
5173
|
'botVerificationIcon',
|
|
5173
5174
|
'sendPaidMessagesStars',
|
|
5175
|
+
'linkedCommunityId',
|
|
5174
5176
|
];
|
|
5175
5177
|
this.self = params.self;
|
|
5176
5178
|
this.contact = params.contact;
|
|
@@ -5222,6 +5224,7 @@ export var Raw;
|
|
|
5222
5224
|
this.botActiveUsers = params.botActiveUsers;
|
|
5223
5225
|
this.botVerificationIcon = params.botVerificationIcon;
|
|
5224
5226
|
this.sendPaidMessagesStars = params.sendPaidMessagesStars;
|
|
5227
|
+
this.linkedCommunityId = params.linkedCommunityId;
|
|
5225
5228
|
}
|
|
5226
5229
|
/**
|
|
5227
5230
|
* Generate the TLObject from buffer.
|
|
@@ -5282,6 +5285,7 @@ export var Raw;
|
|
|
5282
5285
|
let botActiveUsers = flags2 & (1 << 12) ? await Primitive.Int.read(_data) : undefined;
|
|
5283
5286
|
let botVerificationIcon = flags2 & (1 << 14) ? await Primitive.Long.read(_data) : undefined;
|
|
5284
5287
|
let sendPaidMessagesStars = flags2 & (1 << 15) ? await Primitive.Long.read(_data) : undefined;
|
|
5288
|
+
let linkedCommunityId = flags2 & (1 << 21) ? await Primitive.Long.read(_data) : undefined;
|
|
5285
5289
|
return new Raw.User({
|
|
5286
5290
|
self: self,
|
|
5287
5291
|
contact: contact,
|
|
@@ -5333,6 +5337,7 @@ export var Raw;
|
|
|
5333
5337
|
botActiveUsers: botActiveUsers,
|
|
5334
5338
|
botVerificationIcon: botVerificationIcon,
|
|
5335
5339
|
sendPaidMessagesStars: sendPaidMessagesStars,
|
|
5340
|
+
linkedCommunityId: linkedCommunityId,
|
|
5336
5341
|
});
|
|
5337
5342
|
}
|
|
5338
5343
|
/**
|
|
@@ -5395,6 +5400,7 @@ export var Raw;
|
|
|
5395
5400
|
flags2 |= this.botActiveUsers !== undefined ? 1 << 12 : 0;
|
|
5396
5401
|
flags2 |= this.botVerificationIcon !== undefined ? 1 << 14 : 0;
|
|
5397
5402
|
flags2 |= this.sendPaidMessagesStars !== undefined ? 1 << 15 : 0;
|
|
5403
|
+
flags2 |= this.linkedCommunityId !== undefined ? 1 << 21 : 0;
|
|
5398
5404
|
b.write(Primitive.Int.write(flags2));
|
|
5399
5405
|
if (this.id !== undefined) {
|
|
5400
5406
|
b.write(Primitive.Long.write(this.id));
|
|
@@ -5456,6 +5462,9 @@ export var Raw;
|
|
|
5456
5462
|
if (this.sendPaidMessagesStars !== undefined) {
|
|
5457
5463
|
b.write(Primitive.Long.write(this.sendPaidMessagesStars));
|
|
5458
5464
|
}
|
|
5465
|
+
if (this.linkedCommunityId !== undefined) {
|
|
5466
|
+
b.write(Primitive.Long.write(this.linkedCommunityId));
|
|
5467
|
+
}
|
|
5459
5468
|
return Buffer.from(b.buffer);
|
|
5460
5469
|
}
|
|
5461
5470
|
}
|
|
@@ -6021,11 +6030,12 @@ export var Raw;
|
|
|
6021
6030
|
botVerificationIcon;
|
|
6022
6031
|
sendPaidMessagesStars;
|
|
6023
6032
|
linkedMonoforumId;
|
|
6033
|
+
linkedCommunityId;
|
|
6024
6034
|
constructor(params) {
|
|
6025
6035
|
super();
|
|
6026
6036
|
this.classType = 'types';
|
|
6027
6037
|
this.className = 'Channel';
|
|
6028
|
-
this.constructorId =
|
|
6038
|
+
this.constructorId = 0xd49f34c6;
|
|
6029
6039
|
this.subclassOfId = 0xc5af5d94;
|
|
6030
6040
|
this._slots = [
|
|
6031
6041
|
'creator',
|
|
@@ -6077,6 +6087,7 @@ export var Raw;
|
|
|
6077
6087
|
'botVerificationIcon',
|
|
6078
6088
|
'sendPaidMessagesStars',
|
|
6079
6089
|
'linkedMonoforumId',
|
|
6090
|
+
'linkedCommunityId',
|
|
6080
6091
|
];
|
|
6081
6092
|
this.creator = params.creator;
|
|
6082
6093
|
this.left = params.left;
|
|
@@ -6127,6 +6138,7 @@ export var Raw;
|
|
|
6127
6138
|
this.botVerificationIcon = params.botVerificationIcon;
|
|
6128
6139
|
this.sendPaidMessagesStars = params.sendPaidMessagesStars;
|
|
6129
6140
|
this.linkedMonoforumId = params.linkedMonoforumId;
|
|
6141
|
+
this.linkedCommunityId = params.linkedCommunityId;
|
|
6130
6142
|
}
|
|
6131
6143
|
/**
|
|
6132
6144
|
* Generate the TLObject from buffer.
|
|
@@ -6186,6 +6198,7 @@ export var Raw;
|
|
|
6186
6198
|
let botVerificationIcon = flags2 & (1 << 13) ? await Primitive.Long.read(_data) : undefined;
|
|
6187
6199
|
let sendPaidMessagesStars = flags2 & (1 << 14) ? await Primitive.Long.read(_data) : undefined;
|
|
6188
6200
|
let linkedMonoforumId = flags2 & (1 << 18) ? await Primitive.Long.read(_data) : undefined;
|
|
6201
|
+
let linkedCommunityId = flags2 & (1 << 20) ? await Primitive.Long.read(_data) : undefined;
|
|
6189
6202
|
return new Raw.Channel({
|
|
6190
6203
|
creator: creator,
|
|
6191
6204
|
left: left,
|
|
@@ -6236,6 +6249,7 @@ export var Raw;
|
|
|
6236
6249
|
botVerificationIcon: botVerificationIcon,
|
|
6237
6250
|
sendPaidMessagesStars: sendPaidMessagesStars,
|
|
6238
6251
|
linkedMonoforumId: linkedMonoforumId,
|
|
6252
|
+
linkedCommunityId: linkedCommunityId,
|
|
6239
6253
|
});
|
|
6240
6254
|
}
|
|
6241
6255
|
/**
|
|
@@ -6294,6 +6308,7 @@ export var Raw;
|
|
|
6294
6308
|
flags2 |= this.botVerificationIcon !== undefined ? 1 << 13 : 0;
|
|
6295
6309
|
flags2 |= this.sendPaidMessagesStars !== undefined ? 1 << 14 : 0;
|
|
6296
6310
|
flags2 |= this.linkedMonoforumId !== undefined ? 1 << 18 : 0;
|
|
6311
|
+
flags2 |= this.linkedCommunityId !== undefined ? 1 << 20 : 0;
|
|
6297
6312
|
b.write(Primitive.Int.write(flags2));
|
|
6298
6313
|
if (this.id !== undefined) {
|
|
6299
6314
|
b.write(Primitive.Long.write(this.id));
|
|
@@ -6358,6 +6373,9 @@ export var Raw;
|
|
|
6358
6373
|
if (this.linkedMonoforumId !== undefined) {
|
|
6359
6374
|
b.write(Primitive.Long.write(this.linkedMonoforumId));
|
|
6360
6375
|
}
|
|
6376
|
+
if (this.linkedCommunityId !== undefined) {
|
|
6377
|
+
b.write(Primitive.Long.write(this.linkedCommunityId));
|
|
6378
|
+
}
|
|
6361
6379
|
return Buffer.from(b.buffer);
|
|
6362
6380
|
}
|
|
6363
6381
|
}
|
|
@@ -6446,6 +6464,177 @@ export var Raw;
|
|
|
6446
6464
|
}
|
|
6447
6465
|
}
|
|
6448
6466
|
Raw.ChannelForbidden = ChannelForbidden;
|
|
6467
|
+
class CommunityForbidden extends TLObject {
|
|
6468
|
+
id;
|
|
6469
|
+
accessHash;
|
|
6470
|
+
title;
|
|
6471
|
+
constructor(params) {
|
|
6472
|
+
super();
|
|
6473
|
+
this.classType = 'types';
|
|
6474
|
+
this.className = 'CommunityForbidden';
|
|
6475
|
+
this.constructorId = 0xfd3cdab8;
|
|
6476
|
+
this.subclassOfId = 0xc5af5d94;
|
|
6477
|
+
this._slots = ['id', 'accessHash', 'title'];
|
|
6478
|
+
this.id = params.id;
|
|
6479
|
+
this.accessHash = params.accessHash;
|
|
6480
|
+
this.title = params.title;
|
|
6481
|
+
}
|
|
6482
|
+
/**
|
|
6483
|
+
* Generate the TLObject from buffer.
|
|
6484
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
6485
|
+
*/
|
|
6486
|
+
static async read(_data, ..._args) {
|
|
6487
|
+
// @ts-ignore
|
|
6488
|
+
let flags = await Primitive.Int.read(_data);
|
|
6489
|
+
let id = await Primitive.Long.read(_data);
|
|
6490
|
+
let accessHash = flags & (1 << 13) ? await Primitive.Long.read(_data) : undefined;
|
|
6491
|
+
let title = await Primitive.String.read(_data);
|
|
6492
|
+
return new Raw.CommunityForbidden({ id: id, accessHash: accessHash, title: title });
|
|
6493
|
+
}
|
|
6494
|
+
/**
|
|
6495
|
+
* Generate buffer from TLObject.
|
|
6496
|
+
*/
|
|
6497
|
+
write() {
|
|
6498
|
+
const b = new BytesIO();
|
|
6499
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
6500
|
+
// @ts-ignore
|
|
6501
|
+
let flags = 0;
|
|
6502
|
+
flags |= this.accessHash !== undefined ? 1 << 13 : 0;
|
|
6503
|
+
b.write(Primitive.Int.write(flags));
|
|
6504
|
+
if (this.id !== undefined) {
|
|
6505
|
+
b.write(Primitive.Long.write(this.id));
|
|
6506
|
+
}
|
|
6507
|
+
if (this.accessHash !== undefined) {
|
|
6508
|
+
b.write(Primitive.Long.write(this.accessHash));
|
|
6509
|
+
}
|
|
6510
|
+
if (this.title !== undefined) {
|
|
6511
|
+
b.write(Primitive.String.write(this.title));
|
|
6512
|
+
}
|
|
6513
|
+
return Buffer.from(b.buffer);
|
|
6514
|
+
}
|
|
6515
|
+
}
|
|
6516
|
+
Raw.CommunityForbidden = CommunityForbidden;
|
|
6517
|
+
class Community extends TLObject {
|
|
6518
|
+
creator;
|
|
6519
|
+
left;
|
|
6520
|
+
min;
|
|
6521
|
+
collapsedInDialogs;
|
|
6522
|
+
id;
|
|
6523
|
+
accessHash;
|
|
6524
|
+
title;
|
|
6525
|
+
photo;
|
|
6526
|
+
date;
|
|
6527
|
+
adminRights;
|
|
6528
|
+
defaultBannedRights;
|
|
6529
|
+
constructor(params) {
|
|
6530
|
+
super();
|
|
6531
|
+
this.classType = 'types';
|
|
6532
|
+
this.className = 'Community';
|
|
6533
|
+
this.constructorId = 0x65efe954;
|
|
6534
|
+
this.subclassOfId = 0xc5af5d94;
|
|
6535
|
+
this._slots = [
|
|
6536
|
+
'creator',
|
|
6537
|
+
'left',
|
|
6538
|
+
'min',
|
|
6539
|
+
'collapsedInDialogs',
|
|
6540
|
+
'id',
|
|
6541
|
+
'accessHash',
|
|
6542
|
+
'title',
|
|
6543
|
+
'photo',
|
|
6544
|
+
'date',
|
|
6545
|
+
'adminRights',
|
|
6546
|
+
'defaultBannedRights',
|
|
6547
|
+
];
|
|
6548
|
+
this.creator = params.creator;
|
|
6549
|
+
this.left = params.left;
|
|
6550
|
+
this.min = params.min;
|
|
6551
|
+
this.collapsedInDialogs = params.collapsedInDialogs;
|
|
6552
|
+
this.id = params.id;
|
|
6553
|
+
this.accessHash = params.accessHash;
|
|
6554
|
+
this.title = params.title;
|
|
6555
|
+
this.photo = params.photo;
|
|
6556
|
+
this.date = params.date;
|
|
6557
|
+
this.adminRights = params.adminRights;
|
|
6558
|
+
this.defaultBannedRights = params.defaultBannedRights;
|
|
6559
|
+
}
|
|
6560
|
+
/**
|
|
6561
|
+
* Generate the TLObject from buffer.
|
|
6562
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
6563
|
+
*/
|
|
6564
|
+
static async read(_data, ..._args) {
|
|
6565
|
+
// @ts-ignore
|
|
6566
|
+
let flags = await Primitive.Int.read(_data);
|
|
6567
|
+
let creator = flags & (1 << 0) ? true : false;
|
|
6568
|
+
let left = flags & (1 << 2) ? true : false;
|
|
6569
|
+
let min = flags & (1 << 12) ? true : false;
|
|
6570
|
+
// @ts-ignore
|
|
6571
|
+
let flags2 = await Primitive.Int.read(_data);
|
|
6572
|
+
let collapsedInDialogs = flags2 & (1 << 20) ? true : false;
|
|
6573
|
+
let id = await Primitive.Long.read(_data);
|
|
6574
|
+
let accessHash = flags & (1 << 13) ? await Primitive.Long.read(_data) : undefined;
|
|
6575
|
+
let title = await Primitive.String.read(_data);
|
|
6576
|
+
let photo = await TLObject.read(_data);
|
|
6577
|
+
let date = await Primitive.Int.read(_data);
|
|
6578
|
+
let adminRights = flags & (1 << 14) ? await TLObject.read(_data) : undefined;
|
|
6579
|
+
let defaultBannedRights = flags & (1 << 18) ? await TLObject.read(_data) : undefined;
|
|
6580
|
+
return new Raw.Community({
|
|
6581
|
+
creator: creator,
|
|
6582
|
+
left: left,
|
|
6583
|
+
min: min,
|
|
6584
|
+
collapsedInDialogs: collapsedInDialogs,
|
|
6585
|
+
id: id,
|
|
6586
|
+
accessHash: accessHash,
|
|
6587
|
+
title: title,
|
|
6588
|
+
photo: photo,
|
|
6589
|
+
date: date,
|
|
6590
|
+
adminRights: adminRights,
|
|
6591
|
+
defaultBannedRights: defaultBannedRights,
|
|
6592
|
+
});
|
|
6593
|
+
}
|
|
6594
|
+
/**
|
|
6595
|
+
* Generate buffer from TLObject.
|
|
6596
|
+
*/
|
|
6597
|
+
write() {
|
|
6598
|
+
const b = new BytesIO();
|
|
6599
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
6600
|
+
// @ts-ignore
|
|
6601
|
+
let flags = 0;
|
|
6602
|
+
flags |= this.creator ? 1 << 0 : 0;
|
|
6603
|
+
flags |= this.left ? 1 << 2 : 0;
|
|
6604
|
+
flags |= this.min ? 1 << 12 : 0;
|
|
6605
|
+
flags |= this.accessHash !== undefined ? 1 << 13 : 0;
|
|
6606
|
+
flags |= this.adminRights !== undefined ? 1 << 14 : 0;
|
|
6607
|
+
flags |= this.defaultBannedRights !== undefined ? 1 << 18 : 0;
|
|
6608
|
+
b.write(Primitive.Int.write(flags));
|
|
6609
|
+
// @ts-ignore
|
|
6610
|
+
let flags2 = 0;
|
|
6611
|
+
flags2 |= this.collapsedInDialogs ? 1 << 20 : 0;
|
|
6612
|
+
b.write(Primitive.Int.write(flags2));
|
|
6613
|
+
if (this.id !== undefined) {
|
|
6614
|
+
b.write(Primitive.Long.write(this.id));
|
|
6615
|
+
}
|
|
6616
|
+
if (this.accessHash !== undefined) {
|
|
6617
|
+
b.write(Primitive.Long.write(this.accessHash));
|
|
6618
|
+
}
|
|
6619
|
+
if (this.title !== undefined) {
|
|
6620
|
+
b.write(Primitive.String.write(this.title));
|
|
6621
|
+
}
|
|
6622
|
+
if (this.photo !== undefined) {
|
|
6623
|
+
b.write(this.photo.write());
|
|
6624
|
+
}
|
|
6625
|
+
if (this.date !== undefined) {
|
|
6626
|
+
b.write(Primitive.Int.write(this.date));
|
|
6627
|
+
}
|
|
6628
|
+
if (this.adminRights !== undefined) {
|
|
6629
|
+
b.write(this.adminRights.write());
|
|
6630
|
+
}
|
|
6631
|
+
if (this.defaultBannedRights !== undefined) {
|
|
6632
|
+
b.write(this.defaultBannedRights.write());
|
|
6633
|
+
}
|
|
6634
|
+
return Buffer.from(b.buffer);
|
|
6635
|
+
}
|
|
6636
|
+
}
|
|
6637
|
+
Raw.Community = Community;
|
|
6449
6638
|
class ChatFull extends TLObject {
|
|
6450
6639
|
canSetUsername;
|
|
6451
6640
|
hasScheduled;
|
|
@@ -7215,22 +7404,36 @@ export var Raw;
|
|
|
7215
7404
|
}
|
|
7216
7405
|
}
|
|
7217
7406
|
Raw.ChannelFull = ChannelFull;
|
|
7218
|
-
class
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7407
|
+
class CommunityFull extends TLObject {
|
|
7408
|
+
id;
|
|
7409
|
+
about;
|
|
7410
|
+
chatPhoto;
|
|
7411
|
+
linkedPeers;
|
|
7412
|
+
adminsCount;
|
|
7413
|
+
kickedCount;
|
|
7414
|
+
peerLinkRequestsPending;
|
|
7223
7415
|
constructor(params) {
|
|
7224
7416
|
super();
|
|
7225
7417
|
this.classType = 'types';
|
|
7226
|
-
this.className = '
|
|
7227
|
-
this.constructorId =
|
|
7228
|
-
this.subclassOfId =
|
|
7229
|
-
this._slots = [
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7418
|
+
this.className = 'CommunityFull';
|
|
7419
|
+
this.constructorId = 0xcbb7a507;
|
|
7420
|
+
this.subclassOfId = 0xd49a2697;
|
|
7421
|
+
this._slots = [
|
|
7422
|
+
'id',
|
|
7423
|
+
'about',
|
|
7424
|
+
'chatPhoto',
|
|
7425
|
+
'linkedPeers',
|
|
7426
|
+
'adminsCount',
|
|
7427
|
+
'kickedCount',
|
|
7428
|
+
'peerLinkRequestsPending',
|
|
7429
|
+
];
|
|
7430
|
+
this.id = params.id;
|
|
7431
|
+
this.about = params.about;
|
|
7432
|
+
this.chatPhoto = params.chatPhoto;
|
|
7433
|
+
this.linkedPeers = params.linkedPeers;
|
|
7434
|
+
this.adminsCount = params.adminsCount;
|
|
7435
|
+
this.kickedCount = params.kickedCount;
|
|
7436
|
+
this.peerLinkRequestsPending = params.peerLinkRequestsPending;
|
|
7234
7437
|
}
|
|
7235
7438
|
/**
|
|
7236
7439
|
* Generate the TLObject from buffer.
|
|
@@ -7239,15 +7442,21 @@ export var Raw;
|
|
|
7239
7442
|
static async read(_data, ..._args) {
|
|
7240
7443
|
// @ts-ignore
|
|
7241
7444
|
let flags = await Primitive.Int.read(_data);
|
|
7242
|
-
let
|
|
7243
|
-
let
|
|
7244
|
-
let
|
|
7245
|
-
let
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7445
|
+
let id = await Primitive.Long.read(_data);
|
|
7446
|
+
let about = await Primitive.String.read(_data);
|
|
7447
|
+
let chatPhoto = await TLObject.read(_data);
|
|
7448
|
+
let linkedPeers = await TLObject.read(_data);
|
|
7449
|
+
let adminsCount = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
|
|
7450
|
+
let kickedCount = flags & (1 << 2) ? await Primitive.Int.read(_data) : undefined;
|
|
7451
|
+
let peerLinkRequestsPending = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
|
|
7452
|
+
return new Raw.CommunityFull({
|
|
7453
|
+
id: id,
|
|
7454
|
+
about: about,
|
|
7455
|
+
chatPhoto: chatPhoto,
|
|
7456
|
+
linkedPeers: linkedPeers,
|
|
7457
|
+
adminsCount: adminsCount,
|
|
7458
|
+
kickedCount: kickedCount,
|
|
7459
|
+
peerLinkRequestsPending: peerLinkRequestsPending,
|
|
7251
7460
|
});
|
|
7252
7461
|
}
|
|
7253
7462
|
/**
|
|
@@ -7258,69 +7467,36 @@ export var Raw;
|
|
|
7258
7467
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
7259
7468
|
// @ts-ignore
|
|
7260
7469
|
let flags = 0;
|
|
7261
|
-
flags |= this.
|
|
7470
|
+
flags |= this.adminsCount !== undefined ? 1 << 1 : 0;
|
|
7471
|
+
flags |= this.kickedCount !== undefined ? 1 << 2 : 0;
|
|
7472
|
+
flags |= this.peerLinkRequestsPending !== undefined ? 1 << 0 : 0;
|
|
7262
7473
|
b.write(Primitive.Int.write(flags));
|
|
7263
|
-
if (this.
|
|
7264
|
-
b.write(Primitive.Long.write(this.
|
|
7474
|
+
if (this.id !== undefined) {
|
|
7475
|
+
b.write(Primitive.Long.write(this.id));
|
|
7265
7476
|
}
|
|
7266
|
-
if (this.
|
|
7267
|
-
b.write(Primitive.
|
|
7477
|
+
if (this.about !== undefined) {
|
|
7478
|
+
b.write(Primitive.String.write(this.about));
|
|
7268
7479
|
}
|
|
7269
|
-
if (this.
|
|
7270
|
-
b.write(
|
|
7480
|
+
if (this.chatPhoto !== undefined) {
|
|
7481
|
+
b.write(this.chatPhoto.write());
|
|
7271
7482
|
}
|
|
7272
|
-
if (this.
|
|
7273
|
-
b.write(Primitive.
|
|
7483
|
+
if (this.linkedPeers) {
|
|
7484
|
+
b.write(Primitive.Vector.write(this.linkedPeers));
|
|
7274
7485
|
}
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
}
|
|
7278
|
-
Raw.ChatParticipant = ChatParticipant;
|
|
7279
|
-
class ChatParticipantCreator extends TLObject {
|
|
7280
|
-
userId;
|
|
7281
|
-
rank;
|
|
7282
|
-
constructor(params) {
|
|
7283
|
-
super();
|
|
7284
|
-
this.classType = 'types';
|
|
7285
|
-
this.className = 'ChatParticipantCreator';
|
|
7286
|
-
this.constructorId = 0xe1f867b8;
|
|
7287
|
-
this.subclassOfId = 0x7d7c6f86;
|
|
7288
|
-
this._slots = ['userId', 'rank'];
|
|
7289
|
-
this.userId = params.userId;
|
|
7290
|
-
this.rank = params.rank;
|
|
7291
|
-
}
|
|
7292
|
-
/**
|
|
7293
|
-
* Generate the TLObject from buffer.
|
|
7294
|
-
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
7295
|
-
*/
|
|
7296
|
-
static async read(_data, ..._args) {
|
|
7297
|
-
// @ts-ignore
|
|
7298
|
-
let flags = await Primitive.Int.read(_data);
|
|
7299
|
-
let userId = await Primitive.Long.read(_data);
|
|
7300
|
-
let rank = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
7301
|
-
return new Raw.ChatParticipantCreator({ userId: userId, rank: rank });
|
|
7302
|
-
}
|
|
7303
|
-
/**
|
|
7304
|
-
* Generate buffer from TLObject.
|
|
7305
|
-
*/
|
|
7306
|
-
write() {
|
|
7307
|
-
const b = new BytesIO();
|
|
7308
|
-
b.write(Primitive.Int.write(this.constructorId, false));
|
|
7309
|
-
// @ts-ignore
|
|
7310
|
-
let flags = 0;
|
|
7311
|
-
flags |= this.rank !== undefined ? 1 << 0 : 0;
|
|
7312
|
-
b.write(Primitive.Int.write(flags));
|
|
7313
|
-
if (this.userId !== undefined) {
|
|
7314
|
-
b.write(Primitive.Long.write(this.userId));
|
|
7486
|
+
if (this.adminsCount !== undefined) {
|
|
7487
|
+
b.write(Primitive.Int.write(this.adminsCount));
|
|
7315
7488
|
}
|
|
7316
|
-
if (this.
|
|
7317
|
-
b.write(Primitive.
|
|
7489
|
+
if (this.kickedCount !== undefined) {
|
|
7490
|
+
b.write(Primitive.Int.write(this.kickedCount));
|
|
7491
|
+
}
|
|
7492
|
+
if (this.peerLinkRequestsPending !== undefined) {
|
|
7493
|
+
b.write(Primitive.Int.write(this.peerLinkRequestsPending));
|
|
7318
7494
|
}
|
|
7319
7495
|
return Buffer.from(b.buffer);
|
|
7320
7496
|
}
|
|
7321
7497
|
}
|
|
7322
|
-
Raw.
|
|
7323
|
-
class
|
|
7498
|
+
Raw.CommunityFull = CommunityFull;
|
|
7499
|
+
class ChatParticipant extends TLObject {
|
|
7324
7500
|
userId;
|
|
7325
7501
|
inviterId;
|
|
7326
7502
|
date;
|
|
@@ -7328,8 +7504,8 @@ export var Raw;
|
|
|
7328
7504
|
constructor(params) {
|
|
7329
7505
|
super();
|
|
7330
7506
|
this.classType = 'types';
|
|
7331
|
-
this.className = '
|
|
7332
|
-
this.constructorId =
|
|
7507
|
+
this.className = 'ChatParticipant';
|
|
7508
|
+
this.constructorId = 0x38e79fde;
|
|
7333
7509
|
this.subclassOfId = 0x7d7c6f86;
|
|
7334
7510
|
this._slots = ['userId', 'inviterId', 'date', 'rank'];
|
|
7335
7511
|
this.userId = params.userId;
|
|
@@ -7348,7 +7524,112 @@ export var Raw;
|
|
|
7348
7524
|
let inviterId = await Primitive.Long.read(_data);
|
|
7349
7525
|
let date = await Primitive.Int.read(_data);
|
|
7350
7526
|
let rank = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
7351
|
-
return new Raw.
|
|
7527
|
+
return new Raw.ChatParticipant({
|
|
7528
|
+
userId: userId,
|
|
7529
|
+
inviterId: inviterId,
|
|
7530
|
+
date: date,
|
|
7531
|
+
rank: rank,
|
|
7532
|
+
});
|
|
7533
|
+
}
|
|
7534
|
+
/**
|
|
7535
|
+
* Generate buffer from TLObject.
|
|
7536
|
+
*/
|
|
7537
|
+
write() {
|
|
7538
|
+
const b = new BytesIO();
|
|
7539
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
7540
|
+
// @ts-ignore
|
|
7541
|
+
let flags = 0;
|
|
7542
|
+
flags |= this.rank !== undefined ? 1 << 0 : 0;
|
|
7543
|
+
b.write(Primitive.Int.write(flags));
|
|
7544
|
+
if (this.userId !== undefined) {
|
|
7545
|
+
b.write(Primitive.Long.write(this.userId));
|
|
7546
|
+
}
|
|
7547
|
+
if (this.inviterId !== undefined) {
|
|
7548
|
+
b.write(Primitive.Long.write(this.inviterId));
|
|
7549
|
+
}
|
|
7550
|
+
if (this.date !== undefined) {
|
|
7551
|
+
b.write(Primitive.Int.write(this.date));
|
|
7552
|
+
}
|
|
7553
|
+
if (this.rank !== undefined) {
|
|
7554
|
+
b.write(Primitive.String.write(this.rank));
|
|
7555
|
+
}
|
|
7556
|
+
return Buffer.from(b.buffer);
|
|
7557
|
+
}
|
|
7558
|
+
}
|
|
7559
|
+
Raw.ChatParticipant = ChatParticipant;
|
|
7560
|
+
class ChatParticipantCreator extends TLObject {
|
|
7561
|
+
userId;
|
|
7562
|
+
rank;
|
|
7563
|
+
constructor(params) {
|
|
7564
|
+
super();
|
|
7565
|
+
this.classType = 'types';
|
|
7566
|
+
this.className = 'ChatParticipantCreator';
|
|
7567
|
+
this.constructorId = 0xe1f867b8;
|
|
7568
|
+
this.subclassOfId = 0x7d7c6f86;
|
|
7569
|
+
this._slots = ['userId', 'rank'];
|
|
7570
|
+
this.userId = params.userId;
|
|
7571
|
+
this.rank = params.rank;
|
|
7572
|
+
}
|
|
7573
|
+
/**
|
|
7574
|
+
* Generate the TLObject from buffer.
|
|
7575
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
7576
|
+
*/
|
|
7577
|
+
static async read(_data, ..._args) {
|
|
7578
|
+
// @ts-ignore
|
|
7579
|
+
let flags = await Primitive.Int.read(_data);
|
|
7580
|
+
let userId = await Primitive.Long.read(_data);
|
|
7581
|
+
let rank = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
7582
|
+
return new Raw.ChatParticipantCreator({ userId: userId, rank: rank });
|
|
7583
|
+
}
|
|
7584
|
+
/**
|
|
7585
|
+
* Generate buffer from TLObject.
|
|
7586
|
+
*/
|
|
7587
|
+
write() {
|
|
7588
|
+
const b = new BytesIO();
|
|
7589
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
7590
|
+
// @ts-ignore
|
|
7591
|
+
let flags = 0;
|
|
7592
|
+
flags |= this.rank !== undefined ? 1 << 0 : 0;
|
|
7593
|
+
b.write(Primitive.Int.write(flags));
|
|
7594
|
+
if (this.userId !== undefined) {
|
|
7595
|
+
b.write(Primitive.Long.write(this.userId));
|
|
7596
|
+
}
|
|
7597
|
+
if (this.rank !== undefined) {
|
|
7598
|
+
b.write(Primitive.String.write(this.rank));
|
|
7599
|
+
}
|
|
7600
|
+
return Buffer.from(b.buffer);
|
|
7601
|
+
}
|
|
7602
|
+
}
|
|
7603
|
+
Raw.ChatParticipantCreator = ChatParticipantCreator;
|
|
7604
|
+
class ChatParticipantAdmin extends TLObject {
|
|
7605
|
+
userId;
|
|
7606
|
+
inviterId;
|
|
7607
|
+
date;
|
|
7608
|
+
rank;
|
|
7609
|
+
constructor(params) {
|
|
7610
|
+
super();
|
|
7611
|
+
this.classType = 'types';
|
|
7612
|
+
this.className = 'ChatParticipantAdmin';
|
|
7613
|
+
this.constructorId = 0x360d5d2;
|
|
7614
|
+
this.subclassOfId = 0x7d7c6f86;
|
|
7615
|
+
this._slots = ['userId', 'inviterId', 'date', 'rank'];
|
|
7616
|
+
this.userId = params.userId;
|
|
7617
|
+
this.inviterId = params.inviterId;
|
|
7618
|
+
this.date = params.date;
|
|
7619
|
+
this.rank = params.rank;
|
|
7620
|
+
}
|
|
7621
|
+
/**
|
|
7622
|
+
* Generate the TLObject from buffer.
|
|
7623
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
7624
|
+
*/
|
|
7625
|
+
static async read(_data, ..._args) {
|
|
7626
|
+
// @ts-ignore
|
|
7627
|
+
let flags = await Primitive.Int.read(_data);
|
|
7628
|
+
let userId = await Primitive.Long.read(_data);
|
|
7629
|
+
let inviterId = await Primitive.Long.read(_data);
|
|
7630
|
+
let date = await Primitive.Int.read(_data);
|
|
7631
|
+
let rank = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
7632
|
+
return new Raw.ChatParticipantAdmin({
|
|
7352
7633
|
userId: userId,
|
|
7353
7634
|
inviterId: inviterId,
|
|
7354
7635
|
date: date,
|
|
@@ -12712,6 +12993,44 @@ export var Raw;
|
|
|
12712
12993
|
}
|
|
12713
12994
|
}
|
|
12714
12995
|
Raw.MessageActionManagedBotCreated = MessageActionManagedBotCreated;
|
|
12996
|
+
class MessageActionChangeCommunity extends TLObject {
|
|
12997
|
+
communityId;
|
|
12998
|
+
constructor(params) {
|
|
12999
|
+
super();
|
|
13000
|
+
this.classType = 'types';
|
|
13001
|
+
this.className = 'MessageActionChangeCommunity';
|
|
13002
|
+
this.constructorId = 0x5d20bae8;
|
|
13003
|
+
this.subclassOfId = 0x8680d126;
|
|
13004
|
+
this._slots = ['communityId'];
|
|
13005
|
+
this.communityId = params.communityId;
|
|
13006
|
+
}
|
|
13007
|
+
/**
|
|
13008
|
+
* Generate the TLObject from buffer.
|
|
13009
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
13010
|
+
*/
|
|
13011
|
+
static async read(_data, ..._args) {
|
|
13012
|
+
// @ts-ignore
|
|
13013
|
+
let flags = await Primitive.Int.read(_data);
|
|
13014
|
+
let communityId = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
|
|
13015
|
+
return new Raw.MessageActionChangeCommunity({ communityId: communityId });
|
|
13016
|
+
}
|
|
13017
|
+
/**
|
|
13018
|
+
* Generate buffer from TLObject.
|
|
13019
|
+
*/
|
|
13020
|
+
write() {
|
|
13021
|
+
const b = new BytesIO();
|
|
13022
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
13023
|
+
// @ts-ignore
|
|
13024
|
+
let flags = 0;
|
|
13025
|
+
flags |= this.communityId !== undefined ? 1 << 0 : 0;
|
|
13026
|
+
b.write(Primitive.Int.write(flags));
|
|
13027
|
+
if (this.communityId !== undefined) {
|
|
13028
|
+
b.write(Primitive.Long.write(this.communityId));
|
|
13029
|
+
}
|
|
13030
|
+
return Buffer.from(b.buffer);
|
|
13031
|
+
}
|
|
13032
|
+
}
|
|
13033
|
+
Raw.MessageActionChangeCommunity = MessageActionChangeCommunity;
|
|
12715
13034
|
class Dialog extends TLObject {
|
|
12716
13035
|
pinned;
|
|
12717
13036
|
unreadMark;
|
|
@@ -12966,6 +13285,57 @@ export var Raw;
|
|
|
12966
13285
|
}
|
|
12967
13286
|
}
|
|
12968
13287
|
Raw.DialogFolder = DialogFolder;
|
|
13288
|
+
class DialogCommunity extends TLObject {
|
|
13289
|
+
pinned;
|
|
13290
|
+
communityId;
|
|
13291
|
+
notifySettings;
|
|
13292
|
+
constructor(params) {
|
|
13293
|
+
super();
|
|
13294
|
+
this.classType = 'types';
|
|
13295
|
+
this.className = 'DialogCommunity';
|
|
13296
|
+
this.constructorId = 0xf78a0973;
|
|
13297
|
+
this.subclassOfId = 0x42cddd54;
|
|
13298
|
+
this._slots = ['pinned', 'communityId', 'notifySettings'];
|
|
13299
|
+
this.pinned = params.pinned;
|
|
13300
|
+
this.communityId = params.communityId;
|
|
13301
|
+
this.notifySettings = params.notifySettings;
|
|
13302
|
+
}
|
|
13303
|
+
/**
|
|
13304
|
+
* Generate the TLObject from buffer.
|
|
13305
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
13306
|
+
*/
|
|
13307
|
+
static async read(_data, ..._args) {
|
|
13308
|
+
// @ts-ignore
|
|
13309
|
+
let flags = await Primitive.Int.read(_data);
|
|
13310
|
+
let pinned = flags & (1 << 2) ? true : false;
|
|
13311
|
+
let communityId = await Primitive.Long.read(_data);
|
|
13312
|
+
let notifySettings = await TLObject.read(_data);
|
|
13313
|
+
return new Raw.DialogCommunity({
|
|
13314
|
+
pinned: pinned,
|
|
13315
|
+
communityId: communityId,
|
|
13316
|
+
notifySettings: notifySettings,
|
|
13317
|
+
});
|
|
13318
|
+
}
|
|
13319
|
+
/**
|
|
13320
|
+
* Generate buffer from TLObject.
|
|
13321
|
+
*/
|
|
13322
|
+
write() {
|
|
13323
|
+
const b = new BytesIO();
|
|
13324
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
13325
|
+
// @ts-ignore
|
|
13326
|
+
let flags = 0;
|
|
13327
|
+
flags |= this.pinned ? 1 << 2 : 0;
|
|
13328
|
+
b.write(Primitive.Int.write(flags));
|
|
13329
|
+
if (this.communityId !== undefined) {
|
|
13330
|
+
b.write(Primitive.Long.write(this.communityId));
|
|
13331
|
+
}
|
|
13332
|
+
if (this.notifySettings !== undefined) {
|
|
13333
|
+
b.write(this.notifySettings.write());
|
|
13334
|
+
}
|
|
13335
|
+
return Buffer.from(b.buffer);
|
|
13336
|
+
}
|
|
13337
|
+
}
|
|
13338
|
+
Raw.DialogCommunity = DialogCommunity;
|
|
12969
13339
|
class PhotoEmpty extends TLObject {
|
|
12970
13340
|
id;
|
|
12971
13341
|
constructor(params) {
|
|
@@ -13613,6 +13983,40 @@ export var Raw;
|
|
|
13613
13983
|
}
|
|
13614
13984
|
}
|
|
13615
13985
|
Raw.InputNotifyForumTopic = InputNotifyForumTopic;
|
|
13986
|
+
class InputNotifyCommunity extends TLObject {
|
|
13987
|
+
community;
|
|
13988
|
+
constructor(params) {
|
|
13989
|
+
super();
|
|
13990
|
+
this.classType = 'types';
|
|
13991
|
+
this.className = 'InputNotifyCommunity';
|
|
13992
|
+
this.constructorId = 0x27bb1adc;
|
|
13993
|
+
this.subclassOfId = 0x58981615;
|
|
13994
|
+
this._slots = ['community'];
|
|
13995
|
+
this.community = params.community;
|
|
13996
|
+
}
|
|
13997
|
+
/**
|
|
13998
|
+
* Generate the TLObject from buffer.
|
|
13999
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
14000
|
+
*/
|
|
14001
|
+
static async read(_data, ..._args) {
|
|
14002
|
+
// no flags
|
|
14003
|
+
let community = await TLObject.read(_data);
|
|
14004
|
+
return new Raw.InputNotifyCommunity({ community: community });
|
|
14005
|
+
}
|
|
14006
|
+
/**
|
|
14007
|
+
* Generate buffer from TLObject.
|
|
14008
|
+
*/
|
|
14009
|
+
write() {
|
|
14010
|
+
const b = new BytesIO();
|
|
14011
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
14012
|
+
// no flags
|
|
14013
|
+
if (this.community !== undefined) {
|
|
14014
|
+
b.write(this.community.write());
|
|
14015
|
+
}
|
|
14016
|
+
return Buffer.from(b.buffer);
|
|
14017
|
+
}
|
|
14018
|
+
}
|
|
14019
|
+
Raw.InputNotifyCommunity = InputNotifyCommunity;
|
|
13616
14020
|
class InputPeerNotifySettings extends TLObject {
|
|
13617
14021
|
showPreviews;
|
|
13618
14022
|
silent;
|
|
@@ -23151,6 +23555,182 @@ export var Raw;
|
|
|
23151
23555
|
}
|
|
23152
23556
|
}
|
|
23153
23557
|
Raw.UpdateWebBrowserException = UpdateWebBrowserException;
|
|
23558
|
+
class UpdateNewEphemeralMessage extends TLObject {
|
|
23559
|
+
message;
|
|
23560
|
+
constructor(params) {
|
|
23561
|
+
super();
|
|
23562
|
+
this.classType = 'types';
|
|
23563
|
+
this.className = 'UpdateNewEphemeralMessage';
|
|
23564
|
+
this.constructorId = 0x20bcbba1;
|
|
23565
|
+
this.subclassOfId = 0x9f89304e;
|
|
23566
|
+
this._slots = ['message'];
|
|
23567
|
+
this.message = params.message;
|
|
23568
|
+
}
|
|
23569
|
+
/**
|
|
23570
|
+
* Generate the TLObject from buffer.
|
|
23571
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
23572
|
+
*/
|
|
23573
|
+
static async read(_data, ..._args) {
|
|
23574
|
+
// no flags
|
|
23575
|
+
let message = await TLObject.read(_data);
|
|
23576
|
+
return new Raw.UpdateNewEphemeralMessage({ message: message });
|
|
23577
|
+
}
|
|
23578
|
+
/**
|
|
23579
|
+
* Generate buffer from TLObject.
|
|
23580
|
+
*/
|
|
23581
|
+
write() {
|
|
23582
|
+
const b = new BytesIO();
|
|
23583
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
23584
|
+
// no flags
|
|
23585
|
+
if (this.message !== undefined) {
|
|
23586
|
+
b.write(this.message.write());
|
|
23587
|
+
}
|
|
23588
|
+
return Buffer.from(b.buffer);
|
|
23589
|
+
}
|
|
23590
|
+
}
|
|
23591
|
+
Raw.UpdateNewEphemeralMessage = UpdateNewEphemeralMessage;
|
|
23592
|
+
class UpdateDeleteEphemeralMessages extends TLObject {
|
|
23593
|
+
peer;
|
|
23594
|
+
ids;
|
|
23595
|
+
constructor(params) {
|
|
23596
|
+
super();
|
|
23597
|
+
this.classType = 'types';
|
|
23598
|
+
this.className = 'UpdateDeleteEphemeralMessages';
|
|
23599
|
+
this.constructorId = 0x56dbfcf8;
|
|
23600
|
+
this.subclassOfId = 0x9f89304e;
|
|
23601
|
+
this._slots = ['peer', 'ids'];
|
|
23602
|
+
this.peer = params.peer;
|
|
23603
|
+
this.ids = params.ids;
|
|
23604
|
+
}
|
|
23605
|
+
/**
|
|
23606
|
+
* Generate the TLObject from buffer.
|
|
23607
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
23608
|
+
*/
|
|
23609
|
+
static async read(_data, ..._args) {
|
|
23610
|
+
// no flags
|
|
23611
|
+
let peer = await TLObject.read(_data);
|
|
23612
|
+
let ids = await TLObject.read(_data, Primitive.Int);
|
|
23613
|
+
return new Raw.UpdateDeleteEphemeralMessages({ peer: peer, ids: ids });
|
|
23614
|
+
}
|
|
23615
|
+
/**
|
|
23616
|
+
* Generate buffer from TLObject.
|
|
23617
|
+
*/
|
|
23618
|
+
write() {
|
|
23619
|
+
const b = new BytesIO();
|
|
23620
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
23621
|
+
// no flags
|
|
23622
|
+
if (this.peer !== undefined) {
|
|
23623
|
+
b.write(this.peer.write());
|
|
23624
|
+
}
|
|
23625
|
+
if (this.ids) {
|
|
23626
|
+
b.write(Primitive.Vector.write(this.ids, Primitive.Int));
|
|
23627
|
+
}
|
|
23628
|
+
return Buffer.from(b.buffer);
|
|
23629
|
+
}
|
|
23630
|
+
}
|
|
23631
|
+
Raw.UpdateDeleteEphemeralMessages = UpdateDeleteEphemeralMessages;
|
|
23632
|
+
class UpdateEditEphemeralMessage extends TLObject {
|
|
23633
|
+
message;
|
|
23634
|
+
constructor(params) {
|
|
23635
|
+
super();
|
|
23636
|
+
this.classType = 'types';
|
|
23637
|
+
this.className = 'UpdateEditEphemeralMessage';
|
|
23638
|
+
this.constructorId = 0x4bbb8f01;
|
|
23639
|
+
this.subclassOfId = 0x9f89304e;
|
|
23640
|
+
this._slots = ['message'];
|
|
23641
|
+
this.message = params.message;
|
|
23642
|
+
}
|
|
23643
|
+
/**
|
|
23644
|
+
* Generate the TLObject from buffer.
|
|
23645
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
23646
|
+
*/
|
|
23647
|
+
static async read(_data, ..._args) {
|
|
23648
|
+
// no flags
|
|
23649
|
+
let message = await TLObject.read(_data);
|
|
23650
|
+
return new Raw.UpdateEditEphemeralMessage({ message: message });
|
|
23651
|
+
}
|
|
23652
|
+
/**
|
|
23653
|
+
* Generate buffer from TLObject.
|
|
23654
|
+
*/
|
|
23655
|
+
write() {
|
|
23656
|
+
const b = new BytesIO();
|
|
23657
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
23658
|
+
// no flags
|
|
23659
|
+
if (this.message !== undefined) {
|
|
23660
|
+
b.write(this.message.write());
|
|
23661
|
+
}
|
|
23662
|
+
return Buffer.from(b.buffer);
|
|
23663
|
+
}
|
|
23664
|
+
}
|
|
23665
|
+
Raw.UpdateEditEphemeralMessage = UpdateEditEphemeralMessage;
|
|
23666
|
+
class UpdateBotStarsSubscription extends TLObject {
|
|
23667
|
+
canceled;
|
|
23668
|
+
paymentFailed;
|
|
23669
|
+
restored;
|
|
23670
|
+
userId;
|
|
23671
|
+
payload;
|
|
23672
|
+
qts;
|
|
23673
|
+
constructor(params) {
|
|
23674
|
+
super();
|
|
23675
|
+
this.classType = 'types';
|
|
23676
|
+
this.className = 'UpdateBotStarsSubscription';
|
|
23677
|
+
this.constructorId = 0x6c0d8e23;
|
|
23678
|
+
this.subclassOfId = 0x9f89304e;
|
|
23679
|
+
this._slots = ['canceled', 'paymentFailed', 'restored', 'userId', 'payload', 'qts'];
|
|
23680
|
+
this.canceled = params.canceled;
|
|
23681
|
+
this.paymentFailed = params.paymentFailed;
|
|
23682
|
+
this.restored = params.restored;
|
|
23683
|
+
this.userId = params.userId;
|
|
23684
|
+
this.payload = params.payload;
|
|
23685
|
+
this.qts = params.qts;
|
|
23686
|
+
}
|
|
23687
|
+
/**
|
|
23688
|
+
* Generate the TLObject from buffer.
|
|
23689
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
23690
|
+
*/
|
|
23691
|
+
static async read(_data, ..._args) {
|
|
23692
|
+
// @ts-ignore
|
|
23693
|
+
let flags = await Primitive.Int.read(_data);
|
|
23694
|
+
let canceled = flags & (1 << 0) ? true : false;
|
|
23695
|
+
let paymentFailed = flags & (1 << 1) ? true : false;
|
|
23696
|
+
let restored = flags & (1 << 2) ? true : false;
|
|
23697
|
+
let userId = await Primitive.Long.read(_data);
|
|
23698
|
+
let payload = await Primitive.Bytes.read(_data);
|
|
23699
|
+
let qts = await Primitive.Int.read(_data);
|
|
23700
|
+
return new Raw.UpdateBotStarsSubscription({
|
|
23701
|
+
canceled: canceled,
|
|
23702
|
+
paymentFailed: paymentFailed,
|
|
23703
|
+
restored: restored,
|
|
23704
|
+
userId: userId,
|
|
23705
|
+
payload: payload,
|
|
23706
|
+
qts: qts,
|
|
23707
|
+
});
|
|
23708
|
+
}
|
|
23709
|
+
/**
|
|
23710
|
+
* Generate buffer from TLObject.
|
|
23711
|
+
*/
|
|
23712
|
+
write() {
|
|
23713
|
+
const b = new BytesIO();
|
|
23714
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
23715
|
+
// @ts-ignore
|
|
23716
|
+
let flags = 0;
|
|
23717
|
+
flags |= this.canceled ? 1 << 0 : 0;
|
|
23718
|
+
flags |= this.paymentFailed ? 1 << 1 : 0;
|
|
23719
|
+
flags |= this.restored ? 1 << 2 : 0;
|
|
23720
|
+
b.write(Primitive.Int.write(flags));
|
|
23721
|
+
if (this.userId !== undefined) {
|
|
23722
|
+
b.write(Primitive.Long.write(this.userId));
|
|
23723
|
+
}
|
|
23724
|
+
if (this.payload !== undefined) {
|
|
23725
|
+
b.write(Primitive.Bytes.write(this.payload));
|
|
23726
|
+
}
|
|
23727
|
+
if (this.qts !== undefined) {
|
|
23728
|
+
b.write(Primitive.Int.write(this.qts));
|
|
23729
|
+
}
|
|
23730
|
+
return Buffer.from(b.buffer);
|
|
23731
|
+
}
|
|
23732
|
+
}
|
|
23733
|
+
Raw.UpdateBotStarsSubscription = UpdateBotStarsSubscription;
|
|
23154
23734
|
class UpdatesTooLong extends TLObject {
|
|
23155
23735
|
constructor() {
|
|
23156
23736
|
super();
|
|
@@ -25429,6 +26009,40 @@ export var Raw;
|
|
|
25429
26009
|
}
|
|
25430
26010
|
}
|
|
25431
26011
|
Raw.NotifyForumTopic = NotifyForumTopic;
|
|
26012
|
+
class NotifyCommunity extends TLObject {
|
|
26013
|
+
communityId;
|
|
26014
|
+
constructor(params) {
|
|
26015
|
+
super();
|
|
26016
|
+
this.classType = 'types';
|
|
26017
|
+
this.className = 'NotifyCommunity';
|
|
26018
|
+
this.constructorId = 0xbe376999;
|
|
26019
|
+
this.subclassOfId = 0xdfe8602e;
|
|
26020
|
+
this._slots = ['communityId'];
|
|
26021
|
+
this.communityId = params.communityId;
|
|
26022
|
+
}
|
|
26023
|
+
/**
|
|
26024
|
+
* Generate the TLObject from buffer.
|
|
26025
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
26026
|
+
*/
|
|
26027
|
+
static async read(_data, ..._args) {
|
|
26028
|
+
// no flags
|
|
26029
|
+
let communityId = await Primitive.Long.read(_data);
|
|
26030
|
+
return new Raw.NotifyCommunity({ communityId: communityId });
|
|
26031
|
+
}
|
|
26032
|
+
/**
|
|
26033
|
+
* Generate buffer from TLObject.
|
|
26034
|
+
*/
|
|
26035
|
+
write() {
|
|
26036
|
+
const b = new BytesIO();
|
|
26037
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
26038
|
+
// no flags
|
|
26039
|
+
if (this.communityId !== undefined) {
|
|
26040
|
+
b.write(Primitive.Long.write(this.communityId));
|
|
26041
|
+
}
|
|
26042
|
+
return Buffer.from(b.buffer);
|
|
26043
|
+
}
|
|
26044
|
+
}
|
|
26045
|
+
Raw.NotifyCommunity = NotifyCommunity;
|
|
25432
26046
|
class SendMessageTypingAction extends TLObject {
|
|
25433
26047
|
constructor() {
|
|
25434
26048
|
super();
|
|
@@ -29598,15 +30212,17 @@ export var Raw;
|
|
|
29598
30212
|
}
|
|
29599
30213
|
Raw.StickerSet = StickerSet;
|
|
29600
30214
|
class BotCommand extends TLObject {
|
|
30215
|
+
ephemeral;
|
|
29601
30216
|
command;
|
|
29602
30217
|
description;
|
|
29603
30218
|
constructor(params) {
|
|
29604
30219
|
super();
|
|
29605
30220
|
this.classType = 'types';
|
|
29606
30221
|
this.className = 'BotCommand';
|
|
29607
|
-
this.constructorId =
|
|
30222
|
+
this.constructorId = 0x9852d6d2;
|
|
29608
30223
|
this.subclassOfId = 0xe1e62c2;
|
|
29609
|
-
this._slots = ['command', 'description'];
|
|
30224
|
+
this._slots = ['ephemeral', 'command', 'description'];
|
|
30225
|
+
this.ephemeral = params.ephemeral;
|
|
29610
30226
|
this.command = params.command;
|
|
29611
30227
|
this.description = params.description;
|
|
29612
30228
|
}
|
|
@@ -29615,10 +30231,16 @@ export var Raw;
|
|
|
29615
30231
|
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
29616
30232
|
*/
|
|
29617
30233
|
static async read(_data, ..._args) {
|
|
29618
|
-
//
|
|
30234
|
+
// @ts-ignore
|
|
30235
|
+
let flags = await Primitive.Int.read(_data);
|
|
30236
|
+
let ephemeral = flags & (1 << 0) ? true : false;
|
|
29619
30237
|
let command = await Primitive.String.read(_data);
|
|
29620
30238
|
let description = await Primitive.String.read(_data);
|
|
29621
|
-
return new Raw.BotCommand({
|
|
30239
|
+
return new Raw.BotCommand({
|
|
30240
|
+
ephemeral: ephemeral,
|
|
30241
|
+
command: command,
|
|
30242
|
+
description: description,
|
|
30243
|
+
});
|
|
29622
30244
|
}
|
|
29623
30245
|
/**
|
|
29624
30246
|
* Generate buffer from TLObject.
|
|
@@ -29626,7 +30248,10 @@ export var Raw;
|
|
|
29626
30248
|
write() {
|
|
29627
30249
|
const b = new BytesIO();
|
|
29628
30250
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
29629
|
-
//
|
|
30251
|
+
// @ts-ignore
|
|
30252
|
+
let flags = 0;
|
|
30253
|
+
flags |= this.ephemeral ? 1 << 0 : 0;
|
|
30254
|
+
b.write(Primitive.Int.write(flags));
|
|
29630
30255
|
if (this.command !== undefined) {
|
|
29631
30256
|
b.write(Primitive.String.write(this.command));
|
|
29632
30257
|
}
|
|
@@ -37083,6 +37708,46 @@ export var Raw;
|
|
|
37083
37708
|
}
|
|
37084
37709
|
}
|
|
37085
37710
|
Raw.TextDate = TextDate;
|
|
37711
|
+
class TextDiff extends TLObject {
|
|
37712
|
+
text;
|
|
37713
|
+
oldText;
|
|
37714
|
+
constructor(params) {
|
|
37715
|
+
super();
|
|
37716
|
+
this.classType = 'types';
|
|
37717
|
+
this.className = 'TextDiff';
|
|
37718
|
+
this.constructorId = 0x9686cb50;
|
|
37719
|
+
this.subclassOfId = 0xf1d0b479;
|
|
37720
|
+
this._slots = ['text', 'oldText'];
|
|
37721
|
+
this.text = params.text;
|
|
37722
|
+
this.oldText = params.oldText;
|
|
37723
|
+
}
|
|
37724
|
+
/**
|
|
37725
|
+
* Generate the TLObject from buffer.
|
|
37726
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
37727
|
+
*/
|
|
37728
|
+
static async read(_data, ..._args) {
|
|
37729
|
+
// no flags
|
|
37730
|
+
let text = await TLObject.read(_data);
|
|
37731
|
+
let oldText = await TLObject.read(_data);
|
|
37732
|
+
return new Raw.TextDiff({ text: text, oldText: oldText });
|
|
37733
|
+
}
|
|
37734
|
+
/**
|
|
37735
|
+
* Generate buffer from TLObject.
|
|
37736
|
+
*/
|
|
37737
|
+
write() {
|
|
37738
|
+
const b = new BytesIO();
|
|
37739
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
37740
|
+
// no flags
|
|
37741
|
+
if (this.text !== undefined) {
|
|
37742
|
+
b.write(this.text.write());
|
|
37743
|
+
}
|
|
37744
|
+
if (this.oldText !== undefined) {
|
|
37745
|
+
b.write(this.oldText.write());
|
|
37746
|
+
}
|
|
37747
|
+
return Buffer.from(b.buffer);
|
|
37748
|
+
}
|
|
37749
|
+
}
|
|
37750
|
+
Raw.TextDiff = TextDiff;
|
|
37086
37751
|
class PageBlockUnsupported extends TLObject {
|
|
37087
37752
|
constructor() {
|
|
37088
37753
|
super();
|
|
@@ -43931,6 +44596,40 @@ export var Raw;
|
|
|
43931
44596
|
}
|
|
43932
44597
|
}
|
|
43933
44598
|
Raw.InputDialogPeerFolder = InputDialogPeerFolder;
|
|
44599
|
+
class InputDialogPeerCommunity extends TLObject {
|
|
44600
|
+
community;
|
|
44601
|
+
constructor(params) {
|
|
44602
|
+
super();
|
|
44603
|
+
this.classType = 'types';
|
|
44604
|
+
this.className = 'InputDialogPeerCommunity';
|
|
44605
|
+
this.constructorId = 0x69ef72c4;
|
|
44606
|
+
this.subclassOfId = 0xa21c9795;
|
|
44607
|
+
this._slots = ['community'];
|
|
44608
|
+
this.community = params.community;
|
|
44609
|
+
}
|
|
44610
|
+
/**
|
|
44611
|
+
* Generate the TLObject from buffer.
|
|
44612
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
44613
|
+
*/
|
|
44614
|
+
static async read(_data, ..._args) {
|
|
44615
|
+
// no flags
|
|
44616
|
+
let community = await TLObject.read(_data);
|
|
44617
|
+
return new Raw.InputDialogPeerCommunity({ community: community });
|
|
44618
|
+
}
|
|
44619
|
+
/**
|
|
44620
|
+
* Generate buffer from TLObject.
|
|
44621
|
+
*/
|
|
44622
|
+
write() {
|
|
44623
|
+
const b = new BytesIO();
|
|
44624
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
44625
|
+
// no flags
|
|
44626
|
+
if (this.community !== undefined) {
|
|
44627
|
+
b.write(this.community.write());
|
|
44628
|
+
}
|
|
44629
|
+
return Buffer.from(b.buffer);
|
|
44630
|
+
}
|
|
44631
|
+
}
|
|
44632
|
+
Raw.InputDialogPeerCommunity = InputDialogPeerCommunity;
|
|
43934
44633
|
class DialogPeer extends TLObject {
|
|
43935
44634
|
peer;
|
|
43936
44635
|
constructor(params) {
|
|
@@ -43999,6 +44698,40 @@ export var Raw;
|
|
|
43999
44698
|
}
|
|
44000
44699
|
}
|
|
44001
44700
|
Raw.DialogPeerFolder = DialogPeerFolder;
|
|
44701
|
+
class DialogPeerCommunity extends TLObject {
|
|
44702
|
+
communityId;
|
|
44703
|
+
constructor(params) {
|
|
44704
|
+
super();
|
|
44705
|
+
this.classType = 'types';
|
|
44706
|
+
this.className = 'DialogPeerCommunity';
|
|
44707
|
+
this.constructorId = 0x2f65c8e4;
|
|
44708
|
+
this.subclassOfId = 0x256ce1ae;
|
|
44709
|
+
this._slots = ['communityId'];
|
|
44710
|
+
this.communityId = params.communityId;
|
|
44711
|
+
}
|
|
44712
|
+
/**
|
|
44713
|
+
* Generate the TLObject from buffer.
|
|
44714
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
44715
|
+
*/
|
|
44716
|
+
static async read(_data, ..._args) {
|
|
44717
|
+
// no flags
|
|
44718
|
+
let communityId = await Primitive.Long.read(_data);
|
|
44719
|
+
return new Raw.DialogPeerCommunity({ communityId: communityId });
|
|
44720
|
+
}
|
|
44721
|
+
/**
|
|
44722
|
+
* Generate buffer from TLObject.
|
|
44723
|
+
*/
|
|
44724
|
+
write() {
|
|
44725
|
+
const b = new BytesIO();
|
|
44726
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
44727
|
+
// no flags
|
|
44728
|
+
if (this.communityId !== undefined) {
|
|
44729
|
+
b.write(Primitive.Long.write(this.communityId));
|
|
44730
|
+
}
|
|
44731
|
+
return Buffer.from(b.buffer);
|
|
44732
|
+
}
|
|
44733
|
+
}
|
|
44734
|
+
Raw.DialogPeerCommunity = DialogPeerCommunity;
|
|
44002
44735
|
class FileHash extends TLObject {
|
|
44003
44736
|
offset;
|
|
44004
44737
|
limit;
|
|
@@ -47347,6 +48080,7 @@ export var Raw;
|
|
|
47347
48080
|
deleteStories;
|
|
47348
48081
|
manageDirectMessages;
|
|
47349
48082
|
manageRanks;
|
|
48083
|
+
manageLinkedPeers;
|
|
47350
48084
|
constructor(params) {
|
|
47351
48085
|
super();
|
|
47352
48086
|
this.classType = 'types';
|
|
@@ -47371,6 +48105,7 @@ export var Raw;
|
|
|
47371
48105
|
'deleteStories',
|
|
47372
48106
|
'manageDirectMessages',
|
|
47373
48107
|
'manageRanks',
|
|
48108
|
+
'manageLinkedPeers',
|
|
47374
48109
|
];
|
|
47375
48110
|
this.changeInfo = params.changeInfo;
|
|
47376
48111
|
this.postMessages = params.postMessages;
|
|
@@ -47389,6 +48124,7 @@ export var Raw;
|
|
|
47389
48124
|
this.deleteStories = params.deleteStories;
|
|
47390
48125
|
this.manageDirectMessages = params.manageDirectMessages;
|
|
47391
48126
|
this.manageRanks = params.manageRanks;
|
|
48127
|
+
this.manageLinkedPeers = params.manageLinkedPeers;
|
|
47392
48128
|
}
|
|
47393
48129
|
/**
|
|
47394
48130
|
* Generate the TLObject from buffer.
|
|
@@ -47414,6 +48150,7 @@ export var Raw;
|
|
|
47414
48150
|
let deleteStories = flags & (1 << 16) ? true : false;
|
|
47415
48151
|
let manageDirectMessages = flags & (1 << 17) ? true : false;
|
|
47416
48152
|
let manageRanks = flags & (1 << 18) ? true : false;
|
|
48153
|
+
let manageLinkedPeers = flags & (1 << 19) ? true : false;
|
|
47417
48154
|
return new Raw.ChatAdminRights({
|
|
47418
48155
|
changeInfo: changeInfo,
|
|
47419
48156
|
postMessages: postMessages,
|
|
@@ -47432,6 +48169,7 @@ export var Raw;
|
|
|
47432
48169
|
deleteStories: deleteStories,
|
|
47433
48170
|
manageDirectMessages: manageDirectMessages,
|
|
47434
48171
|
manageRanks: manageRanks,
|
|
48172
|
+
manageLinkedPeers: manageLinkedPeers,
|
|
47435
48173
|
});
|
|
47436
48174
|
}
|
|
47437
48175
|
/**
|
|
@@ -47459,6 +48197,7 @@ export var Raw;
|
|
|
47459
48197
|
flags |= this.deleteStories ? 1 << 16 : 0;
|
|
47460
48198
|
flags |= this.manageDirectMessages ? 1 << 17 : 0;
|
|
47461
48199
|
flags |= this.manageRanks ? 1 << 18 : 0;
|
|
48200
|
+
flags |= this.manageLinkedPeers ? 1 << 19 : 0;
|
|
47462
48201
|
b.write(Primitive.Int.write(flags));
|
|
47463
48202
|
return Buffer.from(b.buffer);
|
|
47464
48203
|
}
|
|
@@ -47487,6 +48226,7 @@ export var Raw;
|
|
|
47487
48226
|
sendPlain;
|
|
47488
48227
|
editRank;
|
|
47489
48228
|
sendReactions;
|
|
48229
|
+
manageLinkedPeers;
|
|
47490
48230
|
untilDate;
|
|
47491
48231
|
constructor(params) {
|
|
47492
48232
|
super();
|
|
@@ -47517,6 +48257,7 @@ export var Raw;
|
|
|
47517
48257
|
'sendPlain',
|
|
47518
48258
|
'editRank',
|
|
47519
48259
|
'sendReactions',
|
|
48260
|
+
'manageLinkedPeers',
|
|
47520
48261
|
'untilDate',
|
|
47521
48262
|
];
|
|
47522
48263
|
this.viewMessages = params.viewMessages;
|
|
@@ -47541,6 +48282,7 @@ export var Raw;
|
|
|
47541
48282
|
this.sendPlain = params.sendPlain;
|
|
47542
48283
|
this.editRank = params.editRank;
|
|
47543
48284
|
this.sendReactions = params.sendReactions;
|
|
48285
|
+
this.manageLinkedPeers = params.manageLinkedPeers;
|
|
47544
48286
|
this.untilDate = params.untilDate;
|
|
47545
48287
|
}
|
|
47546
48288
|
/**
|
|
@@ -47572,6 +48314,7 @@ export var Raw;
|
|
|
47572
48314
|
let sendPlain = flags & (1 << 25) ? true : false;
|
|
47573
48315
|
let editRank = flags & (1 << 26) ? true : false;
|
|
47574
48316
|
let sendReactions = flags & (1 << 27) ? true : false;
|
|
48317
|
+
let manageLinkedPeers = flags & (1 << 28) ? true : false;
|
|
47575
48318
|
let untilDate = await Primitive.Int.read(_data);
|
|
47576
48319
|
return new Raw.ChatBannedRights({
|
|
47577
48320
|
viewMessages: viewMessages,
|
|
@@ -47596,6 +48339,7 @@ export var Raw;
|
|
|
47596
48339
|
sendPlain: sendPlain,
|
|
47597
48340
|
editRank: editRank,
|
|
47598
48341
|
sendReactions: sendReactions,
|
|
48342
|
+
manageLinkedPeers: manageLinkedPeers,
|
|
47599
48343
|
untilDate: untilDate,
|
|
47600
48344
|
});
|
|
47601
48345
|
}
|
|
@@ -47629,6 +48373,7 @@ export var Raw;
|
|
|
47629
48373
|
flags |= this.sendPlain ? 1 << 25 : 0;
|
|
47630
48374
|
flags |= this.editRank ? 1 << 26 : 0;
|
|
47631
48375
|
flags |= this.sendReactions ? 1 << 27 : 0;
|
|
48376
|
+
flags |= this.manageLinkedPeers ? 1 << 28 : 0;
|
|
47632
48377
|
b.write(Primitive.Int.write(flags));
|
|
47633
48378
|
if (this.untilDate !== undefined) {
|
|
47634
48379
|
b.write(Primitive.Int.write(this.untilDate));
|
|
@@ -57968,6 +58713,40 @@ export var Raw;
|
|
|
57968
58713
|
}
|
|
57969
58714
|
}
|
|
57970
58715
|
Raw.InputReplyToMonoForum = InputReplyToMonoForum;
|
|
58716
|
+
class InputReplyToEphemeralMessage extends TLObject {
|
|
58717
|
+
id;
|
|
58718
|
+
constructor(params) {
|
|
58719
|
+
super();
|
|
58720
|
+
this.classType = 'types';
|
|
58721
|
+
this.className = 'InputReplyToEphemeralMessage';
|
|
58722
|
+
this.constructorId = 0x4119b95e;
|
|
58723
|
+
this.subclassOfId = 0x8c71131d;
|
|
58724
|
+
this._slots = ['id'];
|
|
58725
|
+
this.id = params.id;
|
|
58726
|
+
}
|
|
58727
|
+
/**
|
|
58728
|
+
* Generate the TLObject from buffer.
|
|
58729
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
58730
|
+
*/
|
|
58731
|
+
static async read(_data, ..._args) {
|
|
58732
|
+
// no flags
|
|
58733
|
+
let id = await Primitive.Int.read(_data);
|
|
58734
|
+
return new Raw.InputReplyToEphemeralMessage({ id: id });
|
|
58735
|
+
}
|
|
58736
|
+
/**
|
|
58737
|
+
* Generate buffer from TLObject.
|
|
58738
|
+
*/
|
|
58739
|
+
write() {
|
|
58740
|
+
const b = new BytesIO();
|
|
58741
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
58742
|
+
// no flags
|
|
58743
|
+
if (this.id !== undefined) {
|
|
58744
|
+
b.write(Primitive.Int.write(this.id));
|
|
58745
|
+
}
|
|
58746
|
+
return Buffer.from(b.buffer);
|
|
58747
|
+
}
|
|
58748
|
+
}
|
|
58749
|
+
Raw.InputReplyToEphemeralMessage = InputReplyToEphemeralMessage;
|
|
57971
58750
|
class ExportedStoryLink extends TLObject {
|
|
57972
58751
|
link;
|
|
57973
58752
|
constructor(params) {
|
|
@@ -67790,6 +68569,40 @@ export var Raw;
|
|
|
67790
68569
|
}
|
|
67791
68570
|
}
|
|
67792
68571
|
Raw.InputAiComposeToneSlug = InputAiComposeToneSlug;
|
|
68572
|
+
class InputAiComposeToneSingleUse extends TLObject {
|
|
68573
|
+
customPrompt;
|
|
68574
|
+
constructor(params) {
|
|
68575
|
+
super();
|
|
68576
|
+
this.classType = 'types';
|
|
68577
|
+
this.className = 'InputAiComposeToneSingleUse';
|
|
68578
|
+
this.constructorId = 0xe0c35af;
|
|
68579
|
+
this.subclassOfId = 0xd52856b7;
|
|
68580
|
+
this._slots = ['customPrompt'];
|
|
68581
|
+
this.customPrompt = params.customPrompt;
|
|
68582
|
+
}
|
|
68583
|
+
/**
|
|
68584
|
+
* Generate the TLObject from buffer.
|
|
68585
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
68586
|
+
*/
|
|
68587
|
+
static async read(_data, ..._args) {
|
|
68588
|
+
// no flags
|
|
68589
|
+
let customPrompt = await Primitive.String.read(_data);
|
|
68590
|
+
return new Raw.InputAiComposeToneSingleUse({ customPrompt: customPrompt });
|
|
68591
|
+
}
|
|
68592
|
+
/**
|
|
68593
|
+
* Generate buffer from TLObject.
|
|
68594
|
+
*/
|
|
68595
|
+
write() {
|
|
68596
|
+
const b = new BytesIO();
|
|
68597
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
68598
|
+
// no flags
|
|
68599
|
+
if (this.customPrompt !== undefined) {
|
|
68600
|
+
b.write(Primitive.String.write(this.customPrompt));
|
|
68601
|
+
}
|
|
68602
|
+
return Buffer.from(b.buffer);
|
|
68603
|
+
}
|
|
68604
|
+
}
|
|
68605
|
+
Raw.InputAiComposeToneSingleUse = InputAiComposeToneSingleUse;
|
|
67793
68606
|
class AiComposeTone extends TLObject {
|
|
67794
68607
|
creator;
|
|
67795
68608
|
id;
|
|
@@ -68501,6 +69314,248 @@ export var Raw;
|
|
|
68501
69314
|
}
|
|
68502
69315
|
}
|
|
68503
69316
|
Raw.RichMessage = RichMessage;
|
|
69317
|
+
class CommunityPeer extends TLObject {
|
|
69318
|
+
canViewHistory;
|
|
69319
|
+
visible;
|
|
69320
|
+
peer;
|
|
69321
|
+
constructor(params) {
|
|
69322
|
+
super();
|
|
69323
|
+
this.classType = 'types';
|
|
69324
|
+
this.className = 'CommunityPeer';
|
|
69325
|
+
this.constructorId = 0x76141ebd;
|
|
69326
|
+
this.subclassOfId = 0xcc3665b6;
|
|
69327
|
+
this._slots = ['canViewHistory', 'visible', 'peer'];
|
|
69328
|
+
this.canViewHistory = params.canViewHistory;
|
|
69329
|
+
this.visible = params.visible;
|
|
69330
|
+
this.peer = params.peer;
|
|
69331
|
+
}
|
|
69332
|
+
/**
|
|
69333
|
+
* Generate the TLObject from buffer.
|
|
69334
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
69335
|
+
*/
|
|
69336
|
+
static async read(_data, ..._args) {
|
|
69337
|
+
// @ts-ignore
|
|
69338
|
+
let flags = await Primitive.Int.read(_data);
|
|
69339
|
+
let canViewHistory = flags & (1 << 2) ? true : false;
|
|
69340
|
+
let visible = flags & (1 << 0) ? await Primitive.Bool.read(_data) : undefined;
|
|
69341
|
+
let peer = await TLObject.read(_data);
|
|
69342
|
+
return new Raw.CommunityPeer({
|
|
69343
|
+
canViewHistory: canViewHistory,
|
|
69344
|
+
visible: visible,
|
|
69345
|
+
peer: peer,
|
|
69346
|
+
});
|
|
69347
|
+
}
|
|
69348
|
+
/**
|
|
69349
|
+
* Generate buffer from TLObject.
|
|
69350
|
+
*/
|
|
69351
|
+
write() {
|
|
69352
|
+
const b = new BytesIO();
|
|
69353
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
69354
|
+
// @ts-ignore
|
|
69355
|
+
let flags = 0;
|
|
69356
|
+
flags |= this.canViewHistory ? 1 << 2 : 0;
|
|
69357
|
+
flags |= this.visible !== undefined ? 1 << 0 : 0;
|
|
69358
|
+
b.write(Primitive.Int.write(flags));
|
|
69359
|
+
if (this.visible !== undefined) {
|
|
69360
|
+
b.write(Primitive.Bool.write(this.visible));
|
|
69361
|
+
}
|
|
69362
|
+
if (this.peer !== undefined) {
|
|
69363
|
+
b.write(this.peer.write());
|
|
69364
|
+
}
|
|
69365
|
+
return Buffer.from(b.buffer);
|
|
69366
|
+
}
|
|
69367
|
+
}
|
|
69368
|
+
Raw.CommunityPeer = CommunityPeer;
|
|
69369
|
+
class CommunityPeerRequest extends TLObject {
|
|
69370
|
+
visible;
|
|
69371
|
+
peer;
|
|
69372
|
+
requestedBy;
|
|
69373
|
+
date;
|
|
69374
|
+
constructor(params) {
|
|
69375
|
+
super();
|
|
69376
|
+
this.classType = 'types';
|
|
69377
|
+
this.className = 'CommunityPeerRequest';
|
|
69378
|
+
this.constructorId = 0x7beafa85;
|
|
69379
|
+
this.subclassOfId = 0xfd4c4ee8;
|
|
69380
|
+
this._slots = ['visible', 'peer', 'requestedBy', 'date'];
|
|
69381
|
+
this.visible = params.visible;
|
|
69382
|
+
this.peer = params.peer;
|
|
69383
|
+
this.requestedBy = params.requestedBy;
|
|
69384
|
+
this.date = params.date;
|
|
69385
|
+
}
|
|
69386
|
+
/**
|
|
69387
|
+
* Generate the TLObject from buffer.
|
|
69388
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
69389
|
+
*/
|
|
69390
|
+
static async read(_data, ..._args) {
|
|
69391
|
+
// @ts-ignore
|
|
69392
|
+
let flags = await Primitive.Int.read(_data);
|
|
69393
|
+
let visible = flags & (1 << 0) ? true : false;
|
|
69394
|
+
let peer = await TLObject.read(_data);
|
|
69395
|
+
let requestedBy = await Primitive.Long.read(_data);
|
|
69396
|
+
let date = await Primitive.Int.read(_data);
|
|
69397
|
+
return new Raw.CommunityPeerRequest({
|
|
69398
|
+
visible: visible,
|
|
69399
|
+
peer: peer,
|
|
69400
|
+
requestedBy: requestedBy,
|
|
69401
|
+
date: date,
|
|
69402
|
+
});
|
|
69403
|
+
}
|
|
69404
|
+
/**
|
|
69405
|
+
* Generate buffer from TLObject.
|
|
69406
|
+
*/
|
|
69407
|
+
write() {
|
|
69408
|
+
const b = new BytesIO();
|
|
69409
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
69410
|
+
// @ts-ignore
|
|
69411
|
+
let flags = 0;
|
|
69412
|
+
flags |= this.visible ? 1 << 0 : 0;
|
|
69413
|
+
b.write(Primitive.Int.write(flags));
|
|
69414
|
+
if (this.peer !== undefined) {
|
|
69415
|
+
b.write(this.peer.write());
|
|
69416
|
+
}
|
|
69417
|
+
if (this.requestedBy !== undefined) {
|
|
69418
|
+
b.write(Primitive.Long.write(this.requestedBy));
|
|
69419
|
+
}
|
|
69420
|
+
if (this.date !== undefined) {
|
|
69421
|
+
b.write(Primitive.Int.write(this.date));
|
|
69422
|
+
}
|
|
69423
|
+
return Buffer.from(b.buffer);
|
|
69424
|
+
}
|
|
69425
|
+
}
|
|
69426
|
+
Raw.CommunityPeerRequest = CommunityPeerRequest;
|
|
69427
|
+
class EphemeralMessage extends TLObject {
|
|
69428
|
+
out;
|
|
69429
|
+
id;
|
|
69430
|
+
fromId;
|
|
69431
|
+
peerId;
|
|
69432
|
+
receiverId;
|
|
69433
|
+
topMsgId;
|
|
69434
|
+
date;
|
|
69435
|
+
message;
|
|
69436
|
+
entities;
|
|
69437
|
+
media;
|
|
69438
|
+
replyMarkup;
|
|
69439
|
+
replyTo;
|
|
69440
|
+
constructor(params) {
|
|
69441
|
+
super();
|
|
69442
|
+
this.classType = 'types';
|
|
69443
|
+
this.className = 'EphemeralMessage';
|
|
69444
|
+
this.constructorId = 0xd9c6dc1a;
|
|
69445
|
+
this.subclassOfId = 0x5f6ab6f0;
|
|
69446
|
+
this._slots = [
|
|
69447
|
+
'out',
|
|
69448
|
+
'id',
|
|
69449
|
+
'fromId',
|
|
69450
|
+
'peerId',
|
|
69451
|
+
'receiverId',
|
|
69452
|
+
'topMsgId',
|
|
69453
|
+
'date',
|
|
69454
|
+
'message',
|
|
69455
|
+
'entities',
|
|
69456
|
+
'media',
|
|
69457
|
+
'replyMarkup',
|
|
69458
|
+
'replyTo',
|
|
69459
|
+
];
|
|
69460
|
+
this.out = params.out;
|
|
69461
|
+
this.id = params.id;
|
|
69462
|
+
this.fromId = params.fromId;
|
|
69463
|
+
this.peerId = params.peerId;
|
|
69464
|
+
this.receiverId = params.receiverId;
|
|
69465
|
+
this.topMsgId = params.topMsgId;
|
|
69466
|
+
this.date = params.date;
|
|
69467
|
+
this.message = params.message;
|
|
69468
|
+
this.entities = params.entities;
|
|
69469
|
+
this.media = params.media;
|
|
69470
|
+
this.replyMarkup = params.replyMarkup;
|
|
69471
|
+
this.replyTo = params.replyTo;
|
|
69472
|
+
}
|
|
69473
|
+
/**
|
|
69474
|
+
* Generate the TLObject from buffer.
|
|
69475
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
69476
|
+
*/
|
|
69477
|
+
static async read(_data, ..._args) {
|
|
69478
|
+
// @ts-ignore
|
|
69479
|
+
let flags = await Primitive.Int.read(_data);
|
|
69480
|
+
let out = flags & (1 << 0) ? true : false;
|
|
69481
|
+
let id = await Primitive.Int.read(_data);
|
|
69482
|
+
let fromId = await TLObject.read(_data);
|
|
69483
|
+
let peerId = await TLObject.read(_data);
|
|
69484
|
+
let receiverId = await Primitive.Long.read(_data);
|
|
69485
|
+
let topMsgId = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
|
|
69486
|
+
let date = await Primitive.Int.read(_data);
|
|
69487
|
+
let message = await Primitive.String.read(_data);
|
|
69488
|
+
let entities = flags & (1 << 2) ? await TLObject.read(_data) : [];
|
|
69489
|
+
let media = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
|
|
69490
|
+
let replyMarkup = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
|
|
69491
|
+
let replyTo = flags & (1 << 6) ? await TLObject.read(_data) : undefined;
|
|
69492
|
+
return new Raw.EphemeralMessage({
|
|
69493
|
+
out: out,
|
|
69494
|
+
id: id,
|
|
69495
|
+
fromId: fromId,
|
|
69496
|
+
peerId: peerId,
|
|
69497
|
+
receiverId: receiverId,
|
|
69498
|
+
topMsgId: topMsgId,
|
|
69499
|
+
date: date,
|
|
69500
|
+
message: message,
|
|
69501
|
+
entities: entities,
|
|
69502
|
+
media: media,
|
|
69503
|
+
replyMarkup: replyMarkup,
|
|
69504
|
+
replyTo: replyTo,
|
|
69505
|
+
});
|
|
69506
|
+
}
|
|
69507
|
+
/**
|
|
69508
|
+
* Generate buffer from TLObject.
|
|
69509
|
+
*/
|
|
69510
|
+
write() {
|
|
69511
|
+
const b = new BytesIO();
|
|
69512
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
69513
|
+
// @ts-ignore
|
|
69514
|
+
let flags = 0;
|
|
69515
|
+
flags |= this.out ? 1 << 0 : 0;
|
|
69516
|
+
flags |= this.topMsgId !== undefined ? 1 << 1 : 0;
|
|
69517
|
+
flags |= this.entities ? 1 << 2 : 0;
|
|
69518
|
+
flags |= this.media !== undefined ? 1 << 3 : 0;
|
|
69519
|
+
flags |= this.replyMarkup !== undefined ? 1 << 4 : 0;
|
|
69520
|
+
flags |= this.replyTo !== undefined ? 1 << 6 : 0;
|
|
69521
|
+
b.write(Primitive.Int.write(flags));
|
|
69522
|
+
if (this.id !== undefined) {
|
|
69523
|
+
b.write(Primitive.Int.write(this.id));
|
|
69524
|
+
}
|
|
69525
|
+
if (this.fromId !== undefined) {
|
|
69526
|
+
b.write(this.fromId.write());
|
|
69527
|
+
}
|
|
69528
|
+
if (this.peerId !== undefined) {
|
|
69529
|
+
b.write(this.peerId.write());
|
|
69530
|
+
}
|
|
69531
|
+
if (this.receiverId !== undefined) {
|
|
69532
|
+
b.write(Primitive.Long.write(this.receiverId));
|
|
69533
|
+
}
|
|
69534
|
+
if (this.topMsgId !== undefined) {
|
|
69535
|
+
b.write(Primitive.Int.write(this.topMsgId));
|
|
69536
|
+
}
|
|
69537
|
+
if (this.date !== undefined) {
|
|
69538
|
+
b.write(Primitive.Int.write(this.date));
|
|
69539
|
+
}
|
|
69540
|
+
if (this.message !== undefined) {
|
|
69541
|
+
b.write(Primitive.String.write(this.message));
|
|
69542
|
+
}
|
|
69543
|
+
if (this.entities) {
|
|
69544
|
+
b.write(Primitive.Vector.write(this.entities));
|
|
69545
|
+
}
|
|
69546
|
+
if (this.media !== undefined) {
|
|
69547
|
+
b.write(this.media.write());
|
|
69548
|
+
}
|
|
69549
|
+
if (this.replyMarkup !== undefined) {
|
|
69550
|
+
b.write(this.replyMarkup.write());
|
|
69551
|
+
}
|
|
69552
|
+
if (this.replyTo !== undefined) {
|
|
69553
|
+
b.write(this.replyTo.write());
|
|
69554
|
+
}
|
|
69555
|
+
return Buffer.from(b.buffer);
|
|
69556
|
+
}
|
|
69557
|
+
}
|
|
69558
|
+
Raw.EphemeralMessage = EphemeralMessage;
|
|
68504
69559
|
class InvokeAfterMsg extends TLObject {
|
|
68505
69560
|
__response__;
|
|
68506
69561
|
msgId;
|
|
@@ -83024,17 +84079,17 @@ export var Raw;
|
|
|
83024
84079
|
messages_1.ChatInviteJoinResultOk = ChatInviteJoinResultOk;
|
|
83025
84080
|
class ChatInviteJoinResultWebView extends TLObject {
|
|
83026
84081
|
botId;
|
|
83027
|
-
|
|
84082
|
+
queryId;
|
|
83028
84083
|
users;
|
|
83029
84084
|
constructor(params) {
|
|
83030
84085
|
super();
|
|
83031
84086
|
this.classType = 'types';
|
|
83032
84087
|
this.className = 'messages.ChatInviteJoinResultWebView';
|
|
83033
|
-
this.constructorId =
|
|
84088
|
+
this.constructorId = 0x61ca29d3;
|
|
83034
84089
|
this.subclassOfId = 0x5d0ff992;
|
|
83035
|
-
this._slots = ['botId', '
|
|
84090
|
+
this._slots = ['botId', 'queryId', 'users'];
|
|
83036
84091
|
this.botId = params.botId;
|
|
83037
|
-
this.
|
|
84092
|
+
this.queryId = params.queryId;
|
|
83038
84093
|
this.users = params.users;
|
|
83039
84094
|
}
|
|
83040
84095
|
/**
|
|
@@ -83044,11 +84099,11 @@ export var Raw;
|
|
|
83044
84099
|
static async read(_data, ..._args) {
|
|
83045
84100
|
// no flags
|
|
83046
84101
|
let botId = await Primitive.Long.read(_data);
|
|
83047
|
-
let
|
|
84102
|
+
let queryId = await Primitive.Long.read(_data);
|
|
83048
84103
|
let users = await TLObject.read(_data);
|
|
83049
84104
|
return new Raw.messages.ChatInviteJoinResultWebView({
|
|
83050
84105
|
botId: botId,
|
|
83051
|
-
|
|
84106
|
+
queryId: queryId,
|
|
83052
84107
|
users: users,
|
|
83053
84108
|
});
|
|
83054
84109
|
}
|
|
@@ -83062,8 +84117,8 @@ export var Raw;
|
|
|
83062
84117
|
if (this.botId !== undefined) {
|
|
83063
84118
|
b.write(Primitive.Long.write(this.botId));
|
|
83064
84119
|
}
|
|
83065
|
-
if (this.
|
|
83066
|
-
b.write(
|
|
84120
|
+
if (this.queryId !== undefined) {
|
|
84121
|
+
b.write(Primitive.Long.write(this.queryId));
|
|
83067
84122
|
}
|
|
83068
84123
|
if (this.users) {
|
|
83069
84124
|
b.write(Primitive.Vector.write(this.users));
|
|
@@ -83072,6 +84127,74 @@ export var Raw;
|
|
|
83072
84127
|
}
|
|
83073
84128
|
}
|
|
83074
84129
|
messages_1.ChatInviteJoinResultWebView = ChatInviteJoinResultWebView;
|
|
84130
|
+
class TranslatedRichMessage extends TLObject {
|
|
84131
|
+
result;
|
|
84132
|
+
constructor(params) {
|
|
84133
|
+
super();
|
|
84134
|
+
this.classType = 'types';
|
|
84135
|
+
this.className = 'messages.TranslatedRichMessage';
|
|
84136
|
+
this.constructorId = 0x4203998f;
|
|
84137
|
+
this.subclassOfId = 0xbfb188f6;
|
|
84138
|
+
this._slots = ['result'];
|
|
84139
|
+
this.result = params.result;
|
|
84140
|
+
}
|
|
84141
|
+
/**
|
|
84142
|
+
* Generate the TLObject from buffer.
|
|
84143
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
84144
|
+
*/
|
|
84145
|
+
static async read(_data, ..._args) {
|
|
84146
|
+
// no flags
|
|
84147
|
+
let result = await TLObject.read(_data);
|
|
84148
|
+
return new Raw.messages.TranslatedRichMessage({ result: result });
|
|
84149
|
+
}
|
|
84150
|
+
/**
|
|
84151
|
+
* Generate buffer from TLObject.
|
|
84152
|
+
*/
|
|
84153
|
+
write() {
|
|
84154
|
+
const b = new BytesIO();
|
|
84155
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
84156
|
+
// no flags
|
|
84157
|
+
if (this.result) {
|
|
84158
|
+
b.write(Primitive.Vector.write(this.result));
|
|
84159
|
+
}
|
|
84160
|
+
return Buffer.from(b.buffer);
|
|
84161
|
+
}
|
|
84162
|
+
}
|
|
84163
|
+
messages_1.TranslatedRichMessage = TranslatedRichMessage;
|
|
84164
|
+
class ComposedRichMessageWithAI extends TLObject {
|
|
84165
|
+
result;
|
|
84166
|
+
constructor(params) {
|
|
84167
|
+
super();
|
|
84168
|
+
this.classType = 'types';
|
|
84169
|
+
this.className = 'messages.ComposedRichMessageWithAI';
|
|
84170
|
+
this.constructorId = 0x4c4537c8;
|
|
84171
|
+
this.subclassOfId = 0x29aba753;
|
|
84172
|
+
this._slots = ['result'];
|
|
84173
|
+
this.result = params.result;
|
|
84174
|
+
}
|
|
84175
|
+
/**
|
|
84176
|
+
* Generate the TLObject from buffer.
|
|
84177
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
84178
|
+
*/
|
|
84179
|
+
static async read(_data, ..._args) {
|
|
84180
|
+
// no flags
|
|
84181
|
+
let result = await TLObject.read(_data);
|
|
84182
|
+
return new Raw.messages.ComposedRichMessageWithAI({ result: result });
|
|
84183
|
+
}
|
|
84184
|
+
/**
|
|
84185
|
+
* Generate buffer from TLObject.
|
|
84186
|
+
*/
|
|
84187
|
+
write() {
|
|
84188
|
+
const b = new BytesIO();
|
|
84189
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
84190
|
+
// no flags
|
|
84191
|
+
if (this.result !== undefined) {
|
|
84192
|
+
b.write(this.result.write());
|
|
84193
|
+
}
|
|
84194
|
+
return Buffer.from(b.buffer);
|
|
84195
|
+
}
|
|
84196
|
+
}
|
|
84197
|
+
messages_1.ComposedRichMessageWithAI = ComposedRichMessageWithAI;
|
|
83075
84198
|
class GetMessages extends TLObject {
|
|
83076
84199
|
__response__;
|
|
83077
84200
|
id;
|
|
@@ -85852,6 +86975,7 @@ export var Raw;
|
|
|
85852
86975
|
groupsOnly;
|
|
85853
86976
|
usersOnly;
|
|
85854
86977
|
folderId;
|
|
86978
|
+
community;
|
|
85855
86979
|
q;
|
|
85856
86980
|
filter;
|
|
85857
86981
|
minDate;
|
|
@@ -85864,13 +86988,14 @@ export var Raw;
|
|
|
85864
86988
|
super();
|
|
85865
86989
|
this.classType = 'functions';
|
|
85866
86990
|
this.className = 'messages.SearchGlobal';
|
|
85867
|
-
this.constructorId =
|
|
86991
|
+
this.constructorId = 0x6126a43c;
|
|
85868
86992
|
this.subclassOfId = 0xd4b40b5e;
|
|
85869
86993
|
this._slots = [
|
|
85870
86994
|
'broadcastsOnly',
|
|
85871
86995
|
'groupsOnly',
|
|
85872
86996
|
'usersOnly',
|
|
85873
86997
|
'folderId',
|
|
86998
|
+
'community',
|
|
85874
86999
|
'q',
|
|
85875
87000
|
'filter',
|
|
85876
87001
|
'minDate',
|
|
@@ -85884,6 +87009,7 @@ export var Raw;
|
|
|
85884
87009
|
this.groupsOnly = params.groupsOnly;
|
|
85885
87010
|
this.usersOnly = params.usersOnly;
|
|
85886
87011
|
this.folderId = params.folderId;
|
|
87012
|
+
this.community = params.community;
|
|
85887
87013
|
this.q = params.q;
|
|
85888
87014
|
this.filter = params.filter;
|
|
85889
87015
|
this.minDate = params.minDate;
|
|
@@ -85904,6 +87030,7 @@ export var Raw;
|
|
|
85904
87030
|
let groupsOnly = flags & (1 << 2) ? true : false;
|
|
85905
87031
|
let usersOnly = flags & (1 << 3) ? true : false;
|
|
85906
87032
|
let folderId = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
|
|
87033
|
+
let community = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
|
|
85907
87034
|
let q = await Primitive.String.read(_data);
|
|
85908
87035
|
let filter = await TLObject.read(_data);
|
|
85909
87036
|
let minDate = await Primitive.Int.read(_data);
|
|
@@ -85917,6 +87044,7 @@ export var Raw;
|
|
|
85917
87044
|
groupsOnly: groupsOnly,
|
|
85918
87045
|
usersOnly: usersOnly,
|
|
85919
87046
|
folderId: folderId,
|
|
87047
|
+
community: community,
|
|
85920
87048
|
q: q,
|
|
85921
87049
|
filter: filter,
|
|
85922
87050
|
minDate: minDate,
|
|
@@ -85939,10 +87067,14 @@ export var Raw;
|
|
|
85939
87067
|
flags |= this.groupsOnly ? 1 << 2 : 0;
|
|
85940
87068
|
flags |= this.usersOnly ? 1 << 3 : 0;
|
|
85941
87069
|
flags |= this.folderId !== undefined ? 1 << 0 : 0;
|
|
87070
|
+
flags |= this.community !== undefined ? 1 << 4 : 0;
|
|
85942
87071
|
b.write(Primitive.Int.write(flags));
|
|
85943
87072
|
if (this.folderId !== undefined) {
|
|
85944
87073
|
b.write(Primitive.Int.write(this.folderId));
|
|
85945
87074
|
}
|
|
87075
|
+
if (this.community !== undefined) {
|
|
87076
|
+
b.write(this.community.write());
|
|
87077
|
+
}
|
|
85946
87078
|
if (this.q !== undefined) {
|
|
85947
87079
|
b.write(Primitive.String.write(this.q));
|
|
85948
87080
|
}
|
|
@@ -96735,6 +97867,200 @@ export var Raw;
|
|
|
96735
97867
|
}
|
|
96736
97868
|
}
|
|
96737
97869
|
messages_1.GetRichMessage = GetRichMessage;
|
|
97870
|
+
class TranslateRichMessage extends TLObject {
|
|
97871
|
+
__response__;
|
|
97872
|
+
peer;
|
|
97873
|
+
id;
|
|
97874
|
+
text;
|
|
97875
|
+
toLang;
|
|
97876
|
+
tone;
|
|
97877
|
+
constructor(params) {
|
|
97878
|
+
super();
|
|
97879
|
+
this.classType = 'functions';
|
|
97880
|
+
this.className = 'messages.TranslateRichMessage';
|
|
97881
|
+
this.constructorId = 0x1a542004;
|
|
97882
|
+
this.subclassOfId = 0xbfb188f6;
|
|
97883
|
+
this._slots = ['peer', 'id', 'text', 'toLang', 'tone'];
|
|
97884
|
+
this.peer = params.peer;
|
|
97885
|
+
this.id = params.id;
|
|
97886
|
+
this.text = params.text;
|
|
97887
|
+
this.toLang = params.toLang;
|
|
97888
|
+
this.tone = params.tone;
|
|
97889
|
+
}
|
|
97890
|
+
/**
|
|
97891
|
+
* Generate the TLObject from buffer.
|
|
97892
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
97893
|
+
*/
|
|
97894
|
+
static async read(_data, ..._args) {
|
|
97895
|
+
// @ts-ignore
|
|
97896
|
+
let flags = await Primitive.Int.read(_data);
|
|
97897
|
+
let peer = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
|
|
97898
|
+
let id = flags & (1 << 0) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
97899
|
+
let text = flags & (1 << 1) ? await TLObject.read(_data) : [];
|
|
97900
|
+
let toLang = await Primitive.String.read(_data);
|
|
97901
|
+
let tone = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
|
|
97902
|
+
return new Raw.messages.TranslateRichMessage({
|
|
97903
|
+
peer: peer,
|
|
97904
|
+
id: id,
|
|
97905
|
+
text: text,
|
|
97906
|
+
toLang: toLang,
|
|
97907
|
+
tone: tone,
|
|
97908
|
+
});
|
|
97909
|
+
}
|
|
97910
|
+
/**
|
|
97911
|
+
* Generate buffer from TLObject.
|
|
97912
|
+
*/
|
|
97913
|
+
write() {
|
|
97914
|
+
const b = new BytesIO();
|
|
97915
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
97916
|
+
// @ts-ignore
|
|
97917
|
+
let flags = 0;
|
|
97918
|
+
flags |= this.peer !== undefined ? 1 << 0 : 0;
|
|
97919
|
+
flags |= this.id ? 1 << 0 : 0;
|
|
97920
|
+
flags |= this.text ? 1 << 1 : 0;
|
|
97921
|
+
flags |= this.tone !== undefined ? 1 << 2 : 0;
|
|
97922
|
+
b.write(Primitive.Int.write(flags));
|
|
97923
|
+
if (this.peer !== undefined) {
|
|
97924
|
+
b.write(this.peer.write());
|
|
97925
|
+
}
|
|
97926
|
+
if (this.id) {
|
|
97927
|
+
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
97928
|
+
}
|
|
97929
|
+
if (this.text) {
|
|
97930
|
+
b.write(Primitive.Vector.write(this.text));
|
|
97931
|
+
}
|
|
97932
|
+
if (this.toLang !== undefined) {
|
|
97933
|
+
b.write(Primitive.String.write(this.toLang));
|
|
97934
|
+
}
|
|
97935
|
+
if (this.tone !== undefined) {
|
|
97936
|
+
b.write(Primitive.String.write(this.tone));
|
|
97937
|
+
}
|
|
97938
|
+
return Buffer.from(b.buffer);
|
|
97939
|
+
}
|
|
97940
|
+
}
|
|
97941
|
+
messages_1.TranslateRichMessage = TranslateRichMessage;
|
|
97942
|
+
class ComposeRichMessageWithAI extends TLObject {
|
|
97943
|
+
__response__;
|
|
97944
|
+
proofread;
|
|
97945
|
+
emojify;
|
|
97946
|
+
text;
|
|
97947
|
+
translateToLang;
|
|
97948
|
+
tone;
|
|
97949
|
+
constructor(params) {
|
|
97950
|
+
super();
|
|
97951
|
+
this.classType = 'functions';
|
|
97952
|
+
this.className = 'messages.ComposeRichMessageWithAI';
|
|
97953
|
+
this.constructorId = 0x8d7ae6af;
|
|
97954
|
+
this.subclassOfId = 0x29aba753;
|
|
97955
|
+
this._slots = ['proofread', 'emojify', 'text', 'translateToLang', 'tone'];
|
|
97956
|
+
this.proofread = params.proofread;
|
|
97957
|
+
this.emojify = params.emojify;
|
|
97958
|
+
this.text = params.text;
|
|
97959
|
+
this.translateToLang = params.translateToLang;
|
|
97960
|
+
this.tone = params.tone;
|
|
97961
|
+
}
|
|
97962
|
+
/**
|
|
97963
|
+
* Generate the TLObject from buffer.
|
|
97964
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
97965
|
+
*/
|
|
97966
|
+
static async read(_data, ..._args) {
|
|
97967
|
+
// @ts-ignore
|
|
97968
|
+
let flags = await Primitive.Int.read(_data);
|
|
97969
|
+
let proofread = flags & (1 << 0) ? true : false;
|
|
97970
|
+
let emojify = flags & (1 << 3) ? true : false;
|
|
97971
|
+
let text = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
|
|
97972
|
+
let translateToLang = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
97973
|
+
let tone = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
|
|
97974
|
+
return new Raw.messages.ComposeRichMessageWithAI({
|
|
97975
|
+
proofread: proofread,
|
|
97976
|
+
emojify: emojify,
|
|
97977
|
+
text: text,
|
|
97978
|
+
translateToLang: translateToLang,
|
|
97979
|
+
tone: tone,
|
|
97980
|
+
});
|
|
97981
|
+
}
|
|
97982
|
+
/**
|
|
97983
|
+
* Generate buffer from TLObject.
|
|
97984
|
+
*/
|
|
97985
|
+
write() {
|
|
97986
|
+
const b = new BytesIO();
|
|
97987
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
97988
|
+
// @ts-ignore
|
|
97989
|
+
let flags = 0;
|
|
97990
|
+
flags |= this.proofread ? 1 << 0 : 0;
|
|
97991
|
+
flags |= this.emojify ? 1 << 3 : 0;
|
|
97992
|
+
flags |= this.text !== undefined ? 1 << 4 : 0;
|
|
97993
|
+
flags |= this.translateToLang !== undefined ? 1 << 1 : 0;
|
|
97994
|
+
flags |= this.tone !== undefined ? 1 << 2 : 0;
|
|
97995
|
+
b.write(Primitive.Int.write(flags));
|
|
97996
|
+
if (this.text !== undefined) {
|
|
97997
|
+
b.write(this.text.write());
|
|
97998
|
+
}
|
|
97999
|
+
if (this.translateToLang !== undefined) {
|
|
98000
|
+
b.write(Primitive.String.write(this.translateToLang));
|
|
98001
|
+
}
|
|
98002
|
+
if (this.tone !== undefined) {
|
|
98003
|
+
b.write(this.tone.write());
|
|
98004
|
+
}
|
|
98005
|
+
return Buffer.from(b.buffer);
|
|
98006
|
+
}
|
|
98007
|
+
}
|
|
98008
|
+
messages_1.ComposeRichMessageWithAI = ComposeRichMessageWithAI;
|
|
98009
|
+
class RequestChatJoinWebView extends TLObject {
|
|
98010
|
+
__response__;
|
|
98011
|
+
queryId;
|
|
98012
|
+
themeParams;
|
|
98013
|
+
platform;
|
|
98014
|
+
constructor(params) {
|
|
98015
|
+
super();
|
|
98016
|
+
this.classType = 'functions';
|
|
98017
|
+
this.className = 'messages.RequestChatJoinWebView';
|
|
98018
|
+
this.constructorId = 0xba9ee679;
|
|
98019
|
+
this.subclassOfId = 0x93cea746;
|
|
98020
|
+
this._slots = ['queryId', 'themeParams', 'platform'];
|
|
98021
|
+
this.queryId = params.queryId;
|
|
98022
|
+
this.themeParams = params.themeParams;
|
|
98023
|
+
this.platform = params.platform;
|
|
98024
|
+
}
|
|
98025
|
+
/**
|
|
98026
|
+
* Generate the TLObject from buffer.
|
|
98027
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
98028
|
+
*/
|
|
98029
|
+
static async read(_data, ..._args) {
|
|
98030
|
+
// @ts-ignore
|
|
98031
|
+
let flags = await Primitive.Int.read(_data);
|
|
98032
|
+
let queryId = await Primitive.Long.read(_data);
|
|
98033
|
+
let themeParams = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
|
|
98034
|
+
let platform = await Primitive.String.read(_data);
|
|
98035
|
+
return new Raw.messages.RequestChatJoinWebView({
|
|
98036
|
+
queryId: queryId,
|
|
98037
|
+
themeParams: themeParams,
|
|
98038
|
+
platform: platform,
|
|
98039
|
+
});
|
|
98040
|
+
}
|
|
98041
|
+
/**
|
|
98042
|
+
* Generate buffer from TLObject.
|
|
98043
|
+
*/
|
|
98044
|
+
write() {
|
|
98045
|
+
const b = new BytesIO();
|
|
98046
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
98047
|
+
// @ts-ignore
|
|
98048
|
+
let flags = 0;
|
|
98049
|
+
flags |= this.themeParams !== undefined ? 1 << 0 : 0;
|
|
98050
|
+
b.write(Primitive.Int.write(flags));
|
|
98051
|
+
if (this.queryId !== undefined) {
|
|
98052
|
+
b.write(Primitive.Long.write(this.queryId));
|
|
98053
|
+
}
|
|
98054
|
+
if (this.themeParams !== undefined) {
|
|
98055
|
+
b.write(this.themeParams.write());
|
|
98056
|
+
}
|
|
98057
|
+
if (this.platform !== undefined) {
|
|
98058
|
+
b.write(Primitive.String.write(this.platform));
|
|
98059
|
+
}
|
|
98060
|
+
return Buffer.from(b.buffer);
|
|
98061
|
+
}
|
|
98062
|
+
}
|
|
98063
|
+
messages_1.RequestChatJoinWebView = RequestChatJoinWebView;
|
|
96738
98064
|
})(messages = Raw.messages || (Raw.messages = {}));
|
|
96739
98065
|
let updates;
|
|
96740
98066
|
(function (updates) {
|
|
@@ -106604,16 +107930,18 @@ export var Raw;
|
|
|
106604
107930
|
byLocation;
|
|
106605
107931
|
checkLimit;
|
|
106606
107932
|
forPersonal;
|
|
107933
|
+
forCommunityPeer;
|
|
106607
107934
|
constructor(params) {
|
|
106608
107935
|
super();
|
|
106609
107936
|
this.classType = 'functions';
|
|
106610
107937
|
this.className = 'channels.GetAdminedPublicChannels';
|
|
106611
107938
|
this.constructorId = 0xf8b036af;
|
|
106612
107939
|
this.subclassOfId = 0x99d5cb14;
|
|
106613
|
-
this._slots = ['byLocation', 'checkLimit', 'forPersonal'];
|
|
107940
|
+
this._slots = ['byLocation', 'checkLimit', 'forPersonal', 'forCommunityPeer'];
|
|
106614
107941
|
this.byLocation = params.byLocation;
|
|
106615
107942
|
this.checkLimit = params.checkLimit;
|
|
106616
107943
|
this.forPersonal = params.forPersonal;
|
|
107944
|
+
this.forCommunityPeer = params.forCommunityPeer;
|
|
106617
107945
|
}
|
|
106618
107946
|
/**
|
|
106619
107947
|
* Generate the TLObject from buffer.
|
|
@@ -106625,10 +107953,12 @@ export var Raw;
|
|
|
106625
107953
|
let byLocation = flags & (1 << 0) ? true : false;
|
|
106626
107954
|
let checkLimit = flags & (1 << 1) ? true : false;
|
|
106627
107955
|
let forPersonal = flags & (1 << 2) ? true : false;
|
|
107956
|
+
let forCommunityPeer = flags & (1 << 3) ? true : false;
|
|
106628
107957
|
return new Raw.channels.GetAdminedPublicChannels({
|
|
106629
107958
|
byLocation: byLocation,
|
|
106630
107959
|
checkLimit: checkLimit,
|
|
106631
107960
|
forPersonal: forPersonal,
|
|
107961
|
+
forCommunityPeer: forCommunityPeer,
|
|
106632
107962
|
});
|
|
106633
107963
|
}
|
|
106634
107964
|
/**
|
|
@@ -106642,6 +107972,7 @@ export var Raw;
|
|
|
106642
107972
|
flags |= this.byLocation ? 1 << 0 : 0;
|
|
106643
107973
|
flags |= this.checkLimit ? 1 << 1 : 0;
|
|
106644
107974
|
flags |= this.forPersonal ? 1 << 2 : 0;
|
|
107975
|
+
flags |= this.forCommunityPeer ? 1 << 3 : 0;
|
|
106645
107976
|
b.write(Primitive.Int.write(flags));
|
|
106646
107977
|
return Buffer.from(b.buffer);
|
|
106647
107978
|
}
|
|
@@ -124559,6 +125890,574 @@ export var Raw;
|
|
|
124559
125890
|
}
|
|
124560
125891
|
aicompose.GetToneExample = GetToneExample;
|
|
124561
125892
|
})(aicompose = Raw.aicompose || (Raw.aicompose = {}));
|
|
125893
|
+
let communities;
|
|
125894
|
+
(function (communities) {
|
|
125895
|
+
class PeerLinkRequests extends TLObject {
|
|
125896
|
+
totalCount;
|
|
125897
|
+
requests;
|
|
125898
|
+
nextOffset;
|
|
125899
|
+
chats;
|
|
125900
|
+
users;
|
|
125901
|
+
constructor(params) {
|
|
125902
|
+
super();
|
|
125903
|
+
this.classType = 'types';
|
|
125904
|
+
this.className = 'communities.PeerLinkRequests';
|
|
125905
|
+
this.constructorId = 0x2244afad;
|
|
125906
|
+
this.subclassOfId = 0x43aa06ef;
|
|
125907
|
+
this._slots = ['totalCount', 'requests', 'nextOffset', 'chats', 'users'];
|
|
125908
|
+
this.totalCount = params.totalCount;
|
|
125909
|
+
this.requests = params.requests;
|
|
125910
|
+
this.nextOffset = params.nextOffset;
|
|
125911
|
+
this.chats = params.chats;
|
|
125912
|
+
this.users = params.users;
|
|
125913
|
+
}
|
|
125914
|
+
/**
|
|
125915
|
+
* Generate the TLObject from buffer.
|
|
125916
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
125917
|
+
*/
|
|
125918
|
+
static async read(_data, ..._args) {
|
|
125919
|
+
// @ts-ignore
|
|
125920
|
+
let flags = await Primitive.Int.read(_data);
|
|
125921
|
+
let totalCount = await Primitive.Int.read(_data);
|
|
125922
|
+
let requests = await TLObject.read(_data);
|
|
125923
|
+
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
125924
|
+
let chats = await TLObject.read(_data);
|
|
125925
|
+
let users = await TLObject.read(_data);
|
|
125926
|
+
return new Raw.communities.PeerLinkRequests({
|
|
125927
|
+
totalCount: totalCount,
|
|
125928
|
+
requests: requests,
|
|
125929
|
+
nextOffset: nextOffset,
|
|
125930
|
+
chats: chats,
|
|
125931
|
+
users: users,
|
|
125932
|
+
});
|
|
125933
|
+
}
|
|
125934
|
+
/**
|
|
125935
|
+
* Generate buffer from TLObject.
|
|
125936
|
+
*/
|
|
125937
|
+
write() {
|
|
125938
|
+
const b = new BytesIO();
|
|
125939
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
125940
|
+
// @ts-ignore
|
|
125941
|
+
let flags = 0;
|
|
125942
|
+
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
125943
|
+
b.write(Primitive.Int.write(flags));
|
|
125944
|
+
if (this.totalCount !== undefined) {
|
|
125945
|
+
b.write(Primitive.Int.write(this.totalCount));
|
|
125946
|
+
}
|
|
125947
|
+
if (this.requests) {
|
|
125948
|
+
b.write(Primitive.Vector.write(this.requests));
|
|
125949
|
+
}
|
|
125950
|
+
if (this.nextOffset !== undefined) {
|
|
125951
|
+
b.write(Primitive.String.write(this.nextOffset));
|
|
125952
|
+
}
|
|
125953
|
+
if (this.chats) {
|
|
125954
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
125955
|
+
}
|
|
125956
|
+
if (this.users) {
|
|
125957
|
+
b.write(Primitive.Vector.write(this.users));
|
|
125958
|
+
}
|
|
125959
|
+
return Buffer.from(b.buffer);
|
|
125960
|
+
}
|
|
125961
|
+
}
|
|
125962
|
+
communities.PeerLinkRequests = PeerLinkRequests;
|
|
125963
|
+
class ParticipantJoinedChats extends TLObject {
|
|
125964
|
+
creatorChatIds;
|
|
125965
|
+
joinedChatIds;
|
|
125966
|
+
chats;
|
|
125967
|
+
users;
|
|
125968
|
+
constructor(params) {
|
|
125969
|
+
super();
|
|
125970
|
+
this.classType = 'types';
|
|
125971
|
+
this.className = 'communities.ParticipantJoinedChats';
|
|
125972
|
+
this.constructorId = 0x8d78512a;
|
|
125973
|
+
this.subclassOfId = 0x86dab595;
|
|
125974
|
+
this._slots = ['creatorChatIds', 'joinedChatIds', 'chats', 'users'];
|
|
125975
|
+
this.creatorChatIds = params.creatorChatIds;
|
|
125976
|
+
this.joinedChatIds = params.joinedChatIds;
|
|
125977
|
+
this.chats = params.chats;
|
|
125978
|
+
this.users = params.users;
|
|
125979
|
+
}
|
|
125980
|
+
/**
|
|
125981
|
+
* Generate the TLObject from buffer.
|
|
125982
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
125983
|
+
*/
|
|
125984
|
+
static async read(_data, ..._args) {
|
|
125985
|
+
// no flags
|
|
125986
|
+
let creatorChatIds = await TLObject.read(_data, Primitive.Long);
|
|
125987
|
+
let joinedChatIds = await TLObject.read(_data, Primitive.Long);
|
|
125988
|
+
let chats = await TLObject.read(_data);
|
|
125989
|
+
let users = await TLObject.read(_data);
|
|
125990
|
+
return new Raw.communities.ParticipantJoinedChats({
|
|
125991
|
+
creatorChatIds: creatorChatIds,
|
|
125992
|
+
joinedChatIds: joinedChatIds,
|
|
125993
|
+
chats: chats,
|
|
125994
|
+
users: users,
|
|
125995
|
+
});
|
|
125996
|
+
}
|
|
125997
|
+
/**
|
|
125998
|
+
* Generate buffer from TLObject.
|
|
125999
|
+
*/
|
|
126000
|
+
write() {
|
|
126001
|
+
const b = new BytesIO();
|
|
126002
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126003
|
+
// no flags
|
|
126004
|
+
if (this.creatorChatIds) {
|
|
126005
|
+
b.write(Primitive.Vector.write(this.creatorChatIds, Primitive.Long));
|
|
126006
|
+
}
|
|
126007
|
+
if (this.joinedChatIds) {
|
|
126008
|
+
b.write(Primitive.Vector.write(this.joinedChatIds, Primitive.Long));
|
|
126009
|
+
}
|
|
126010
|
+
if (this.chats) {
|
|
126011
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
126012
|
+
}
|
|
126013
|
+
if (this.users) {
|
|
126014
|
+
b.write(Primitive.Vector.write(this.users));
|
|
126015
|
+
}
|
|
126016
|
+
return Buffer.from(b.buffer);
|
|
126017
|
+
}
|
|
126018
|
+
}
|
|
126019
|
+
communities.ParticipantJoinedChats = ParticipantJoinedChats;
|
|
126020
|
+
class Create extends TLObject {
|
|
126021
|
+
__response__;
|
|
126022
|
+
hidden;
|
|
126023
|
+
title;
|
|
126024
|
+
about;
|
|
126025
|
+
peer;
|
|
126026
|
+
constructor(params) {
|
|
126027
|
+
super();
|
|
126028
|
+
this.classType = 'functions';
|
|
126029
|
+
this.className = 'communities.Create';
|
|
126030
|
+
this.constructorId = 0xa63859ec;
|
|
126031
|
+
this.subclassOfId = 0x8af52aac;
|
|
126032
|
+
this._slots = ['hidden', 'title', 'about', 'peer'];
|
|
126033
|
+
this.hidden = params.hidden;
|
|
126034
|
+
this.title = params.title;
|
|
126035
|
+
this.about = params.about;
|
|
126036
|
+
this.peer = params.peer;
|
|
126037
|
+
}
|
|
126038
|
+
/**
|
|
126039
|
+
* Generate the TLObject from buffer.
|
|
126040
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126041
|
+
*/
|
|
126042
|
+
static async read(_data, ..._args) {
|
|
126043
|
+
// @ts-ignore
|
|
126044
|
+
let flags = await Primitive.Int.read(_data);
|
|
126045
|
+
let hidden = flags & (1 << 1) ? true : false;
|
|
126046
|
+
let title = await Primitive.String.read(_data);
|
|
126047
|
+
let about = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
126048
|
+
let peer = await TLObject.read(_data);
|
|
126049
|
+
return new Raw.communities.Create({
|
|
126050
|
+
hidden: hidden,
|
|
126051
|
+
title: title,
|
|
126052
|
+
about: about,
|
|
126053
|
+
peer: peer,
|
|
126054
|
+
});
|
|
126055
|
+
}
|
|
126056
|
+
/**
|
|
126057
|
+
* Generate buffer from TLObject.
|
|
126058
|
+
*/
|
|
126059
|
+
write() {
|
|
126060
|
+
const b = new BytesIO();
|
|
126061
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126062
|
+
// @ts-ignore
|
|
126063
|
+
let flags = 0;
|
|
126064
|
+
flags |= this.hidden ? 1 << 1 : 0;
|
|
126065
|
+
flags |= this.about !== undefined ? 1 << 0 : 0;
|
|
126066
|
+
b.write(Primitive.Int.write(flags));
|
|
126067
|
+
if (this.title !== undefined) {
|
|
126068
|
+
b.write(Primitive.String.write(this.title));
|
|
126069
|
+
}
|
|
126070
|
+
if (this.about !== undefined) {
|
|
126071
|
+
b.write(Primitive.String.write(this.about));
|
|
126072
|
+
}
|
|
126073
|
+
if (this.peer !== undefined) {
|
|
126074
|
+
b.write(this.peer.write());
|
|
126075
|
+
}
|
|
126076
|
+
return Buffer.from(b.buffer);
|
|
126077
|
+
}
|
|
126078
|
+
}
|
|
126079
|
+
communities.Create = Create;
|
|
126080
|
+
class TogglePeerLink extends TLObject {
|
|
126081
|
+
__response__;
|
|
126082
|
+
visible;
|
|
126083
|
+
hidden;
|
|
126084
|
+
deleted;
|
|
126085
|
+
community;
|
|
126086
|
+
peer;
|
|
126087
|
+
constructor(params) {
|
|
126088
|
+
super();
|
|
126089
|
+
this.classType = 'functions';
|
|
126090
|
+
this.className = 'communities.TogglePeerLink';
|
|
126091
|
+
this.constructorId = 0x736dcfea;
|
|
126092
|
+
this.subclassOfId = 0xf5b399ac;
|
|
126093
|
+
this._slots = ['visible', 'hidden', 'deleted', 'community', 'peer'];
|
|
126094
|
+
this.visible = params.visible;
|
|
126095
|
+
this.hidden = params.hidden;
|
|
126096
|
+
this.deleted = params.deleted;
|
|
126097
|
+
this.community = params.community;
|
|
126098
|
+
this.peer = params.peer;
|
|
126099
|
+
}
|
|
126100
|
+
/**
|
|
126101
|
+
* Generate the TLObject from buffer.
|
|
126102
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126103
|
+
*/
|
|
126104
|
+
static async read(_data, ..._args) {
|
|
126105
|
+
// @ts-ignore
|
|
126106
|
+
let flags = await Primitive.Int.read(_data);
|
|
126107
|
+
let visible = flags & (1 << 0) ? true : false;
|
|
126108
|
+
let hidden = flags & (1 << 1) ? true : false;
|
|
126109
|
+
let deleted = flags & (1 << 2) ? true : false;
|
|
126110
|
+
let community = await TLObject.read(_data);
|
|
126111
|
+
let peer = await TLObject.read(_data);
|
|
126112
|
+
return new Raw.communities.TogglePeerLink({
|
|
126113
|
+
visible: visible,
|
|
126114
|
+
hidden: hidden,
|
|
126115
|
+
deleted: deleted,
|
|
126116
|
+
community: community,
|
|
126117
|
+
peer: peer,
|
|
126118
|
+
});
|
|
126119
|
+
}
|
|
126120
|
+
/**
|
|
126121
|
+
* Generate buffer from TLObject.
|
|
126122
|
+
*/
|
|
126123
|
+
write() {
|
|
126124
|
+
const b = new BytesIO();
|
|
126125
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126126
|
+
// @ts-ignore
|
|
126127
|
+
let flags = 0;
|
|
126128
|
+
flags |= this.visible ? 1 << 0 : 0;
|
|
126129
|
+
flags |= this.hidden ? 1 << 1 : 0;
|
|
126130
|
+
flags |= this.deleted ? 1 << 2 : 0;
|
|
126131
|
+
b.write(Primitive.Int.write(flags));
|
|
126132
|
+
if (this.community !== undefined) {
|
|
126133
|
+
b.write(this.community.write());
|
|
126134
|
+
}
|
|
126135
|
+
if (this.peer !== undefined) {
|
|
126136
|
+
b.write(this.peer.write());
|
|
126137
|
+
}
|
|
126138
|
+
return Buffer.from(b.buffer);
|
|
126139
|
+
}
|
|
126140
|
+
}
|
|
126141
|
+
communities.TogglePeerLink = TogglePeerLink;
|
|
126142
|
+
class GetJoinedCommunities extends TLObject {
|
|
126143
|
+
__response__;
|
|
126144
|
+
constructor() {
|
|
126145
|
+
super();
|
|
126146
|
+
this.classType = 'functions';
|
|
126147
|
+
this.className = 'communities.GetJoinedCommunities';
|
|
126148
|
+
this.constructorId = 0xa663e830;
|
|
126149
|
+
this.subclassOfId = 0x99d5cb14;
|
|
126150
|
+
this._slots = [];
|
|
126151
|
+
}
|
|
126152
|
+
/**
|
|
126153
|
+
* Generate the TLObject from buffer.
|
|
126154
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126155
|
+
*/
|
|
126156
|
+
static async read(_data, ..._args) {
|
|
126157
|
+
// no flags
|
|
126158
|
+
return new Raw.communities.GetJoinedCommunities();
|
|
126159
|
+
}
|
|
126160
|
+
/**
|
|
126161
|
+
* Generate buffer from TLObject.
|
|
126162
|
+
*/
|
|
126163
|
+
write() {
|
|
126164
|
+
const b = new BytesIO();
|
|
126165
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126166
|
+
// no flags
|
|
126167
|
+
return Buffer.from(b.buffer);
|
|
126168
|
+
}
|
|
126169
|
+
}
|
|
126170
|
+
communities.GetJoinedCommunities = GetJoinedCommunities;
|
|
126171
|
+
class ToggleCommunityCollapsedInDialogs extends TLObject {
|
|
126172
|
+
__response__;
|
|
126173
|
+
collapsed;
|
|
126174
|
+
community;
|
|
126175
|
+
constructor(params) {
|
|
126176
|
+
super();
|
|
126177
|
+
this.classType = 'functions';
|
|
126178
|
+
this.className = 'communities.ToggleCommunityCollapsedInDialogs';
|
|
126179
|
+
this.constructorId = 0xd766e3ea;
|
|
126180
|
+
this.subclassOfId = 0x8af52aac;
|
|
126181
|
+
this._slots = ['collapsed', 'community'];
|
|
126182
|
+
this.collapsed = params.collapsed;
|
|
126183
|
+
this.community = params.community;
|
|
126184
|
+
}
|
|
126185
|
+
/**
|
|
126186
|
+
* Generate the TLObject from buffer.
|
|
126187
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126188
|
+
*/
|
|
126189
|
+
static async read(_data, ..._args) {
|
|
126190
|
+
// @ts-ignore
|
|
126191
|
+
let flags = await Primitive.Int.read(_data);
|
|
126192
|
+
let collapsed = flags & (1 << 0) ? true : false;
|
|
126193
|
+
let community = await TLObject.read(_data);
|
|
126194
|
+
return new Raw.communities.ToggleCommunityCollapsedInDialogs({
|
|
126195
|
+
collapsed: collapsed,
|
|
126196
|
+
community: community,
|
|
126197
|
+
});
|
|
126198
|
+
}
|
|
126199
|
+
/**
|
|
126200
|
+
* Generate buffer from TLObject.
|
|
126201
|
+
*/
|
|
126202
|
+
write() {
|
|
126203
|
+
const b = new BytesIO();
|
|
126204
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126205
|
+
// @ts-ignore
|
|
126206
|
+
let flags = 0;
|
|
126207
|
+
flags |= this.collapsed ? 1 << 0 : 0;
|
|
126208
|
+
b.write(Primitive.Int.write(flags));
|
|
126209
|
+
if (this.community !== undefined) {
|
|
126210
|
+
b.write(this.community.write());
|
|
126211
|
+
}
|
|
126212
|
+
return Buffer.from(b.buffer);
|
|
126213
|
+
}
|
|
126214
|
+
}
|
|
126215
|
+
communities.ToggleCommunityCollapsedInDialogs = ToggleCommunityCollapsedInDialogs;
|
|
126216
|
+
class GetPeerLinkRequests extends TLObject {
|
|
126217
|
+
__response__;
|
|
126218
|
+
community;
|
|
126219
|
+
offset;
|
|
126220
|
+
limit;
|
|
126221
|
+
constructor(params) {
|
|
126222
|
+
super();
|
|
126223
|
+
this.classType = 'functions';
|
|
126224
|
+
this.className = 'communities.GetPeerLinkRequests';
|
|
126225
|
+
this.constructorId = 0x93773344;
|
|
126226
|
+
this.subclassOfId = 0x43aa06ef;
|
|
126227
|
+
this._slots = ['community', 'offset', 'limit'];
|
|
126228
|
+
this.community = params.community;
|
|
126229
|
+
this.offset = params.offset;
|
|
126230
|
+
this.limit = params.limit;
|
|
126231
|
+
}
|
|
126232
|
+
/**
|
|
126233
|
+
* Generate the TLObject from buffer.
|
|
126234
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126235
|
+
*/
|
|
126236
|
+
static async read(_data, ..._args) {
|
|
126237
|
+
// no flags
|
|
126238
|
+
let community = await TLObject.read(_data);
|
|
126239
|
+
let offset = await Primitive.String.read(_data);
|
|
126240
|
+
let limit = await Primitive.Int.read(_data);
|
|
126241
|
+
return new Raw.communities.GetPeerLinkRequests({
|
|
126242
|
+
community: community,
|
|
126243
|
+
offset: offset,
|
|
126244
|
+
limit: limit,
|
|
126245
|
+
});
|
|
126246
|
+
}
|
|
126247
|
+
/**
|
|
126248
|
+
* Generate buffer from TLObject.
|
|
126249
|
+
*/
|
|
126250
|
+
write() {
|
|
126251
|
+
const b = new BytesIO();
|
|
126252
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126253
|
+
// no flags
|
|
126254
|
+
if (this.community !== undefined) {
|
|
126255
|
+
b.write(this.community.write());
|
|
126256
|
+
}
|
|
126257
|
+
if (this.offset !== undefined) {
|
|
126258
|
+
b.write(Primitive.String.write(this.offset));
|
|
126259
|
+
}
|
|
126260
|
+
if (this.limit !== undefined) {
|
|
126261
|
+
b.write(Primitive.Int.write(this.limit));
|
|
126262
|
+
}
|
|
126263
|
+
return Buffer.from(b.buffer);
|
|
126264
|
+
}
|
|
126265
|
+
}
|
|
126266
|
+
communities.GetPeerLinkRequests = GetPeerLinkRequests;
|
|
126267
|
+
class TogglePeerLinkRequestApproval extends TLObject {
|
|
126268
|
+
__response__;
|
|
126269
|
+
reject;
|
|
126270
|
+
community;
|
|
126271
|
+
peer;
|
|
126272
|
+
constructor(params) {
|
|
126273
|
+
super();
|
|
126274
|
+
this.classType = 'functions';
|
|
126275
|
+
this.className = 'communities.TogglePeerLinkRequestApproval';
|
|
126276
|
+
this.constructorId = 0x8c8219a8;
|
|
126277
|
+
this.subclassOfId = 0xf5b399ac;
|
|
126278
|
+
this._slots = ['reject', 'community', 'peer'];
|
|
126279
|
+
this.reject = params.reject;
|
|
126280
|
+
this.community = params.community;
|
|
126281
|
+
this.peer = params.peer;
|
|
126282
|
+
}
|
|
126283
|
+
/**
|
|
126284
|
+
* Generate the TLObject from buffer.
|
|
126285
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126286
|
+
*/
|
|
126287
|
+
static async read(_data, ..._args) {
|
|
126288
|
+
// @ts-ignore
|
|
126289
|
+
let flags = await Primitive.Int.read(_data);
|
|
126290
|
+
let reject = flags & (1 << 0) ? true : false;
|
|
126291
|
+
let community = await TLObject.read(_data);
|
|
126292
|
+
let peer = await TLObject.read(_data);
|
|
126293
|
+
return new Raw.communities.TogglePeerLinkRequestApproval({
|
|
126294
|
+
reject: reject,
|
|
126295
|
+
community: community,
|
|
126296
|
+
peer: peer,
|
|
126297
|
+
});
|
|
126298
|
+
}
|
|
126299
|
+
/**
|
|
126300
|
+
* Generate buffer from TLObject.
|
|
126301
|
+
*/
|
|
126302
|
+
write() {
|
|
126303
|
+
const b = new BytesIO();
|
|
126304
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126305
|
+
// @ts-ignore
|
|
126306
|
+
let flags = 0;
|
|
126307
|
+
flags |= this.reject ? 1 << 0 : 0;
|
|
126308
|
+
b.write(Primitive.Int.write(flags));
|
|
126309
|
+
if (this.community !== undefined) {
|
|
126310
|
+
b.write(this.community.write());
|
|
126311
|
+
}
|
|
126312
|
+
if (this.peer !== undefined) {
|
|
126313
|
+
b.write(this.peer.write());
|
|
126314
|
+
}
|
|
126315
|
+
return Buffer.from(b.buffer);
|
|
126316
|
+
}
|
|
126317
|
+
}
|
|
126318
|
+
communities.TogglePeerLinkRequestApproval = TogglePeerLinkRequestApproval;
|
|
126319
|
+
class ToggleAllPeerLinkRequestApproval extends TLObject {
|
|
126320
|
+
__response__;
|
|
126321
|
+
reject;
|
|
126322
|
+
community;
|
|
126323
|
+
constructor(params) {
|
|
126324
|
+
super();
|
|
126325
|
+
this.classType = 'functions';
|
|
126326
|
+
this.className = 'communities.ToggleAllPeerLinkRequestApproval';
|
|
126327
|
+
this.constructorId = 0xbfe3dd3d;
|
|
126328
|
+
this.subclassOfId = 0xf5b399ac;
|
|
126329
|
+
this._slots = ['reject', 'community'];
|
|
126330
|
+
this.reject = params.reject;
|
|
126331
|
+
this.community = params.community;
|
|
126332
|
+
}
|
|
126333
|
+
/**
|
|
126334
|
+
* Generate the TLObject from buffer.
|
|
126335
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126336
|
+
*/
|
|
126337
|
+
static async read(_data, ..._args) {
|
|
126338
|
+
// @ts-ignore
|
|
126339
|
+
let flags = await Primitive.Int.read(_data);
|
|
126340
|
+
let reject = flags & (1 << 0) ? true : false;
|
|
126341
|
+
let community = await TLObject.read(_data);
|
|
126342
|
+
return new Raw.communities.ToggleAllPeerLinkRequestApproval({
|
|
126343
|
+
reject: reject,
|
|
126344
|
+
community: community,
|
|
126345
|
+
});
|
|
126346
|
+
}
|
|
126347
|
+
/**
|
|
126348
|
+
* Generate buffer from TLObject.
|
|
126349
|
+
*/
|
|
126350
|
+
write() {
|
|
126351
|
+
const b = new BytesIO();
|
|
126352
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126353
|
+
// @ts-ignore
|
|
126354
|
+
let flags = 0;
|
|
126355
|
+
flags |= this.reject ? 1 << 0 : 0;
|
|
126356
|
+
b.write(Primitive.Int.write(flags));
|
|
126357
|
+
if (this.community !== undefined) {
|
|
126358
|
+
b.write(this.community.write());
|
|
126359
|
+
}
|
|
126360
|
+
return Buffer.from(b.buffer);
|
|
126361
|
+
}
|
|
126362
|
+
}
|
|
126363
|
+
communities.ToggleAllPeerLinkRequestApproval = ToggleAllPeerLinkRequestApproval;
|
|
126364
|
+
class ToggleParticipantBanned extends TLObject {
|
|
126365
|
+
__response__;
|
|
126366
|
+
unban;
|
|
126367
|
+
community;
|
|
126368
|
+
participant;
|
|
126369
|
+
constructor(params) {
|
|
126370
|
+
super();
|
|
126371
|
+
this.classType = 'functions';
|
|
126372
|
+
this.className = 'communities.ToggleParticipantBanned';
|
|
126373
|
+
this.constructorId = 0x9967ad0f;
|
|
126374
|
+
this.subclassOfId = 0xf5b399ac;
|
|
126375
|
+
this._slots = ['unban', 'community', 'participant'];
|
|
126376
|
+
this.unban = params.unban;
|
|
126377
|
+
this.community = params.community;
|
|
126378
|
+
this.participant = params.participant;
|
|
126379
|
+
}
|
|
126380
|
+
/**
|
|
126381
|
+
* Generate the TLObject from buffer.
|
|
126382
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126383
|
+
*/
|
|
126384
|
+
static async read(_data, ..._args) {
|
|
126385
|
+
// @ts-ignore
|
|
126386
|
+
let flags = await Primitive.Int.read(_data);
|
|
126387
|
+
let unban = flags & (1 << 0) ? true : false;
|
|
126388
|
+
let community = await TLObject.read(_data);
|
|
126389
|
+
let participant = await TLObject.read(_data);
|
|
126390
|
+
return new Raw.communities.ToggleParticipantBanned({
|
|
126391
|
+
unban: unban,
|
|
126392
|
+
community: community,
|
|
126393
|
+
participant: participant,
|
|
126394
|
+
});
|
|
126395
|
+
}
|
|
126396
|
+
/**
|
|
126397
|
+
* Generate buffer from TLObject.
|
|
126398
|
+
*/
|
|
126399
|
+
write() {
|
|
126400
|
+
const b = new BytesIO();
|
|
126401
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126402
|
+
// @ts-ignore
|
|
126403
|
+
let flags = 0;
|
|
126404
|
+
flags |= this.unban ? 1 << 0 : 0;
|
|
126405
|
+
b.write(Primitive.Int.write(flags));
|
|
126406
|
+
if (this.community !== undefined) {
|
|
126407
|
+
b.write(this.community.write());
|
|
126408
|
+
}
|
|
126409
|
+
if (this.participant !== undefined) {
|
|
126410
|
+
b.write(this.participant.write());
|
|
126411
|
+
}
|
|
126412
|
+
return Buffer.from(b.buffer);
|
|
126413
|
+
}
|
|
126414
|
+
}
|
|
126415
|
+
communities.ToggleParticipantBanned = ToggleParticipantBanned;
|
|
126416
|
+
class GetParticipantJoinedChats extends TLObject {
|
|
126417
|
+
__response__;
|
|
126418
|
+
community;
|
|
126419
|
+
participant;
|
|
126420
|
+
constructor(params) {
|
|
126421
|
+
super();
|
|
126422
|
+
this.classType = 'functions';
|
|
126423
|
+
this.className = 'communities.GetParticipantJoinedChats';
|
|
126424
|
+
this.constructorId = 0xf87eabab;
|
|
126425
|
+
this.subclassOfId = 0x86dab595;
|
|
126426
|
+
this._slots = ['community', 'participant'];
|
|
126427
|
+
this.community = params.community;
|
|
126428
|
+
this.participant = params.participant;
|
|
126429
|
+
}
|
|
126430
|
+
/**
|
|
126431
|
+
* Generate the TLObject from buffer.
|
|
126432
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126433
|
+
*/
|
|
126434
|
+
static async read(_data, ..._args) {
|
|
126435
|
+
// no flags
|
|
126436
|
+
let community = await TLObject.read(_data);
|
|
126437
|
+
let participant = await TLObject.read(_data);
|
|
126438
|
+
return new Raw.communities.GetParticipantJoinedChats({
|
|
126439
|
+
community: community,
|
|
126440
|
+
participant: participant,
|
|
126441
|
+
});
|
|
126442
|
+
}
|
|
126443
|
+
/**
|
|
126444
|
+
* Generate buffer from TLObject.
|
|
126445
|
+
*/
|
|
126446
|
+
write() {
|
|
126447
|
+
const b = new BytesIO();
|
|
126448
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126449
|
+
// no flags
|
|
126450
|
+
if (this.community !== undefined) {
|
|
126451
|
+
b.write(this.community.write());
|
|
126452
|
+
}
|
|
126453
|
+
if (this.participant !== undefined) {
|
|
126454
|
+
b.write(this.participant.write());
|
|
126455
|
+
}
|
|
126456
|
+
return Buffer.from(b.buffer);
|
|
126457
|
+
}
|
|
126458
|
+
}
|
|
126459
|
+
communities.GetParticipantJoinedChats = GetParticipantJoinedChats;
|
|
126460
|
+
})(communities = Raw.communities || (Raw.communities = {}));
|
|
124562
126461
|
let langpack;
|
|
124563
126462
|
(function (langpack) {
|
|
124564
126463
|
class GetLangPack extends TLObject {
|
|
@@ -124815,5 +126714,284 @@ export var Raw;
|
|
|
124815
126714
|
}
|
|
124816
126715
|
folders.EditPeerFolders = EditPeerFolders;
|
|
124817
126716
|
})(folders = Raw.folders || (Raw.folders = {}));
|
|
126717
|
+
let ephemeral;
|
|
126718
|
+
(function (ephemeral) {
|
|
126719
|
+
class SendMessage extends TLObject {
|
|
126720
|
+
__response__;
|
|
126721
|
+
peer;
|
|
126722
|
+
receiverId;
|
|
126723
|
+
queryId;
|
|
126724
|
+
message;
|
|
126725
|
+
entities;
|
|
126726
|
+
media;
|
|
126727
|
+
replyMarkup;
|
|
126728
|
+
richMessage;
|
|
126729
|
+
randomId;
|
|
126730
|
+
replyTo;
|
|
126731
|
+
constructor(params) {
|
|
126732
|
+
super();
|
|
126733
|
+
this.classType = 'functions';
|
|
126734
|
+
this.className = 'ephemeral.SendMessage';
|
|
126735
|
+
this.constructorId = 0x68cbd09f;
|
|
126736
|
+
this.subclassOfId = 0x8af52aac;
|
|
126737
|
+
this._slots = [
|
|
126738
|
+
'peer',
|
|
126739
|
+
'receiverId',
|
|
126740
|
+
'queryId',
|
|
126741
|
+
'message',
|
|
126742
|
+
'entities',
|
|
126743
|
+
'media',
|
|
126744
|
+
'replyMarkup',
|
|
126745
|
+
'richMessage',
|
|
126746
|
+
'randomId',
|
|
126747
|
+
'replyTo',
|
|
126748
|
+
];
|
|
126749
|
+
this.peer = params.peer;
|
|
126750
|
+
this.receiverId = params.receiverId;
|
|
126751
|
+
this.queryId = params.queryId;
|
|
126752
|
+
this.message = params.message;
|
|
126753
|
+
this.entities = params.entities;
|
|
126754
|
+
this.media = params.media;
|
|
126755
|
+
this.replyMarkup = params.replyMarkup;
|
|
126756
|
+
this.richMessage = params.richMessage;
|
|
126757
|
+
this.randomId = params.randomId;
|
|
126758
|
+
this.replyTo = params.replyTo;
|
|
126759
|
+
}
|
|
126760
|
+
/**
|
|
126761
|
+
* Generate the TLObject from buffer.
|
|
126762
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126763
|
+
*/
|
|
126764
|
+
static async read(_data, ..._args) {
|
|
126765
|
+
// @ts-ignore
|
|
126766
|
+
let flags = await Primitive.Int.read(_data);
|
|
126767
|
+
let peer = await TLObject.read(_data);
|
|
126768
|
+
let receiverId = await TLObject.read(_data);
|
|
126769
|
+
let queryId = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
|
|
126770
|
+
let message = await Primitive.String.read(_data);
|
|
126771
|
+
let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
|
|
126772
|
+
let media = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
|
|
126773
|
+
let replyMarkup = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
|
|
126774
|
+
let richMessage = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
|
|
126775
|
+
let randomId = await Primitive.Long.read(_data);
|
|
126776
|
+
let replyTo = flags & (1 << 5) ? await TLObject.read(_data) : undefined;
|
|
126777
|
+
return new Raw.ephemeral.SendMessage({
|
|
126778
|
+
peer: peer,
|
|
126779
|
+
receiverId: receiverId,
|
|
126780
|
+
queryId: queryId,
|
|
126781
|
+
message: message,
|
|
126782
|
+
entities: entities,
|
|
126783
|
+
media: media,
|
|
126784
|
+
replyMarkup: replyMarkup,
|
|
126785
|
+
richMessage: richMessage,
|
|
126786
|
+
randomId: randomId,
|
|
126787
|
+
replyTo: replyTo,
|
|
126788
|
+
});
|
|
126789
|
+
}
|
|
126790
|
+
/**
|
|
126791
|
+
* Generate buffer from TLObject.
|
|
126792
|
+
*/
|
|
126793
|
+
write() {
|
|
126794
|
+
const b = new BytesIO();
|
|
126795
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126796
|
+
// @ts-ignore
|
|
126797
|
+
let flags = 0;
|
|
126798
|
+
flags |= this.queryId !== undefined ? 1 << 0 : 0;
|
|
126799
|
+
flags |= this.entities ? 1 << 1 : 0;
|
|
126800
|
+
flags |= this.media !== undefined ? 1 << 2 : 0;
|
|
126801
|
+
flags |= this.replyMarkup !== undefined ? 1 << 3 : 0;
|
|
126802
|
+
flags |= this.richMessage !== undefined ? 1 << 4 : 0;
|
|
126803
|
+
flags |= this.replyTo !== undefined ? 1 << 5 : 0;
|
|
126804
|
+
b.write(Primitive.Int.write(flags));
|
|
126805
|
+
if (this.peer !== undefined) {
|
|
126806
|
+
b.write(this.peer.write());
|
|
126807
|
+
}
|
|
126808
|
+
if (this.receiverId !== undefined) {
|
|
126809
|
+
b.write(this.receiverId.write());
|
|
126810
|
+
}
|
|
126811
|
+
if (this.queryId !== undefined) {
|
|
126812
|
+
b.write(Primitive.Long.write(this.queryId));
|
|
126813
|
+
}
|
|
126814
|
+
if (this.message !== undefined) {
|
|
126815
|
+
b.write(Primitive.String.write(this.message));
|
|
126816
|
+
}
|
|
126817
|
+
if (this.entities) {
|
|
126818
|
+
b.write(Primitive.Vector.write(this.entities));
|
|
126819
|
+
}
|
|
126820
|
+
if (this.media !== undefined) {
|
|
126821
|
+
b.write(this.media.write());
|
|
126822
|
+
}
|
|
126823
|
+
if (this.replyMarkup !== undefined) {
|
|
126824
|
+
b.write(this.replyMarkup.write());
|
|
126825
|
+
}
|
|
126826
|
+
if (this.richMessage !== undefined) {
|
|
126827
|
+
b.write(this.richMessage.write());
|
|
126828
|
+
}
|
|
126829
|
+
if (this.randomId !== undefined) {
|
|
126830
|
+
b.write(Primitive.Long.write(this.randomId));
|
|
126831
|
+
}
|
|
126832
|
+
if (this.replyTo !== undefined) {
|
|
126833
|
+
b.write(this.replyTo.write());
|
|
126834
|
+
}
|
|
126835
|
+
return Buffer.from(b.buffer);
|
|
126836
|
+
}
|
|
126837
|
+
}
|
|
126838
|
+
ephemeral.SendMessage = SendMessage;
|
|
126839
|
+
class DeleteMessage extends TLObject {
|
|
126840
|
+
__response__;
|
|
126841
|
+
peer;
|
|
126842
|
+
receiverId;
|
|
126843
|
+
id;
|
|
126844
|
+
constructor(params) {
|
|
126845
|
+
super();
|
|
126846
|
+
this.classType = 'functions';
|
|
126847
|
+
this.className = 'ephemeral.DeleteMessage';
|
|
126848
|
+
this.constructorId = 0xa3c0d511;
|
|
126849
|
+
this.subclassOfId = 0xf5b399ac;
|
|
126850
|
+
this._slots = ['peer', 'receiverId', 'id'];
|
|
126851
|
+
this.peer = params.peer;
|
|
126852
|
+
this.receiverId = params.receiverId;
|
|
126853
|
+
this.id = params.id;
|
|
126854
|
+
}
|
|
126855
|
+
/**
|
|
126856
|
+
* Generate the TLObject from buffer.
|
|
126857
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126858
|
+
*/
|
|
126859
|
+
static async read(_data, ..._args) {
|
|
126860
|
+
// no flags
|
|
126861
|
+
let peer = await TLObject.read(_data);
|
|
126862
|
+
let receiverId = await TLObject.read(_data);
|
|
126863
|
+
let id = await Primitive.Int.read(_data);
|
|
126864
|
+
return new Raw.ephemeral.DeleteMessage({ peer: peer, receiverId: receiverId, id: id });
|
|
126865
|
+
}
|
|
126866
|
+
/**
|
|
126867
|
+
* Generate buffer from TLObject.
|
|
126868
|
+
*/
|
|
126869
|
+
write() {
|
|
126870
|
+
const b = new BytesIO();
|
|
126871
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126872
|
+
// no flags
|
|
126873
|
+
if (this.peer !== undefined) {
|
|
126874
|
+
b.write(this.peer.write());
|
|
126875
|
+
}
|
|
126876
|
+
if (this.receiverId !== undefined) {
|
|
126877
|
+
b.write(this.receiverId.write());
|
|
126878
|
+
}
|
|
126879
|
+
if (this.id !== undefined) {
|
|
126880
|
+
b.write(Primitive.Int.write(this.id));
|
|
126881
|
+
}
|
|
126882
|
+
return Buffer.from(b.buffer);
|
|
126883
|
+
}
|
|
126884
|
+
}
|
|
126885
|
+
ephemeral.DeleteMessage = DeleteMessage;
|
|
126886
|
+
class ReportMessage extends TLObject {
|
|
126887
|
+
__response__;
|
|
126888
|
+
peer;
|
|
126889
|
+
id;
|
|
126890
|
+
option;
|
|
126891
|
+
message;
|
|
126892
|
+
constructor(params) {
|
|
126893
|
+
super();
|
|
126894
|
+
this.classType = 'functions';
|
|
126895
|
+
this.className = 'ephemeral.ReportMessage';
|
|
126896
|
+
this.constructorId = 0x8704f2bf;
|
|
126897
|
+
this.subclassOfId = 0xacd3f438;
|
|
126898
|
+
this._slots = ['peer', 'id', 'option', 'message'];
|
|
126899
|
+
this.peer = params.peer;
|
|
126900
|
+
this.id = params.id;
|
|
126901
|
+
this.option = params.option;
|
|
126902
|
+
this.message = params.message;
|
|
126903
|
+
}
|
|
126904
|
+
/**
|
|
126905
|
+
* Generate the TLObject from buffer.
|
|
126906
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126907
|
+
*/
|
|
126908
|
+
static async read(_data, ..._args) {
|
|
126909
|
+
// no flags
|
|
126910
|
+
let peer = await TLObject.read(_data);
|
|
126911
|
+
let id = await Primitive.Int.read(_data);
|
|
126912
|
+
let option = await Primitive.Bytes.read(_data);
|
|
126913
|
+
let message = await Primitive.String.read(_data);
|
|
126914
|
+
return new Raw.ephemeral.ReportMessage({
|
|
126915
|
+
peer: peer,
|
|
126916
|
+
id: id,
|
|
126917
|
+
option: option,
|
|
126918
|
+
message: message,
|
|
126919
|
+
});
|
|
126920
|
+
}
|
|
126921
|
+
/**
|
|
126922
|
+
* Generate buffer from TLObject.
|
|
126923
|
+
*/
|
|
126924
|
+
write() {
|
|
126925
|
+
const b = new BytesIO();
|
|
126926
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126927
|
+
// no flags
|
|
126928
|
+
if (this.peer !== undefined) {
|
|
126929
|
+
b.write(this.peer.write());
|
|
126930
|
+
}
|
|
126931
|
+
if (this.id !== undefined) {
|
|
126932
|
+
b.write(Primitive.Int.write(this.id));
|
|
126933
|
+
}
|
|
126934
|
+
if (this.option !== undefined) {
|
|
126935
|
+
b.write(Primitive.Bytes.write(this.option));
|
|
126936
|
+
}
|
|
126937
|
+
if (this.message !== undefined) {
|
|
126938
|
+
b.write(Primitive.String.write(this.message));
|
|
126939
|
+
}
|
|
126940
|
+
return Buffer.from(b.buffer);
|
|
126941
|
+
}
|
|
126942
|
+
}
|
|
126943
|
+
ephemeral.ReportMessage = ReportMessage;
|
|
126944
|
+
class GetCallbackAnswer extends TLObject {
|
|
126945
|
+
__response__;
|
|
126946
|
+
peer;
|
|
126947
|
+
id;
|
|
126948
|
+
data;
|
|
126949
|
+
constructor(params) {
|
|
126950
|
+
super();
|
|
126951
|
+
this.classType = 'functions';
|
|
126952
|
+
this.className = 'ephemeral.GetCallbackAnswer';
|
|
126953
|
+
this.constructorId = 0x3fa464c8;
|
|
126954
|
+
this.subclassOfId = 0x6c4dd18c;
|
|
126955
|
+
this._slots = ['peer', 'id', 'data'];
|
|
126956
|
+
this.peer = params.peer;
|
|
126957
|
+
this.id = params.id;
|
|
126958
|
+
this.data = params.data;
|
|
126959
|
+
}
|
|
126960
|
+
/**
|
|
126961
|
+
* Generate the TLObject from buffer.
|
|
126962
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
126963
|
+
*/
|
|
126964
|
+
static async read(_data, ..._args) {
|
|
126965
|
+
// @ts-ignore
|
|
126966
|
+
let flags = await Primitive.Int.read(_data);
|
|
126967
|
+
let peer = await TLObject.read(_data);
|
|
126968
|
+
let id = await Primitive.Int.read(_data);
|
|
126969
|
+
let data = flags & (1 << 1) ? await Primitive.Bytes.read(_data) : undefined;
|
|
126970
|
+
return new Raw.ephemeral.GetCallbackAnswer({ peer: peer, id: id, data: data });
|
|
126971
|
+
}
|
|
126972
|
+
/**
|
|
126973
|
+
* Generate buffer from TLObject.
|
|
126974
|
+
*/
|
|
126975
|
+
write() {
|
|
126976
|
+
const b = new BytesIO();
|
|
126977
|
+
b.write(Primitive.Int.write(this.constructorId, false));
|
|
126978
|
+
// @ts-ignore
|
|
126979
|
+
let flags = 0;
|
|
126980
|
+
flags |= this.data !== undefined ? 1 << 1 : 0;
|
|
126981
|
+
b.write(Primitive.Int.write(flags));
|
|
126982
|
+
if (this.peer !== undefined) {
|
|
126983
|
+
b.write(this.peer.write());
|
|
126984
|
+
}
|
|
126985
|
+
if (this.id !== undefined) {
|
|
126986
|
+
b.write(Primitive.Int.write(this.id));
|
|
126987
|
+
}
|
|
126988
|
+
if (this.data !== undefined) {
|
|
126989
|
+
b.write(Primitive.Bytes.write(this.data));
|
|
126990
|
+
}
|
|
126991
|
+
return Buffer.from(b.buffer);
|
|
126992
|
+
}
|
|
126993
|
+
}
|
|
126994
|
+
ephemeral.GetCallbackAnswer = GetCallbackAnswer;
|
|
126995
|
+
})(ephemeral = Raw.ephemeral || (Raw.ephemeral = {}));
|
|
124818
126996
|
// End telegram schema
|
|
124819
126997
|
})(Raw || (Raw = {}));
|