-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathTL_td.tl
More file actions
2558 lines (1716 loc) · 181 KB
/
TL_td.tl
File metadata and controls
2558 lines (1716 loc) · 181 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//@description Object of this type may be returned on every function call in case of the error
//@code Error code, maybe changed in the future. If code == 406, error message should not be processed in any way and shouldn't be showed to the user
//@message Error message, may be changed in the future
error code:int message:string = Error;
//@description Object of this type returns on successful function call for some functions
ok = Ok;
//@class AuthCodeType @description Provides information about the way an authentication code is delivered to the user
//@description Code is delivered through private Telegram message, which can be viewed in the other client @length Length of the code
authCodeTypeMessage length:int = AuthCodeType;
//@description Code is delivered by SMS to the specified phone number @length Length of the code
authCodeTypeSms length:int = AuthCodeType;
//@description Code is delivered by phone call to the specified phone number @length Length of the code
authCodeTypeCall length:int = AuthCodeType;
//@description Code is delivered by the immediately cancelled call to the specified phone number. Number from which the call was done is the code @pattern Pattern of the phone number from which the call will be done
authCodeTypeFlashCall pattern:string = AuthCodeType;
//@class AuthState @description Represents current authorization state of the Client
//@description TDLib needs user's phone number to authorize
authStateWaitPhoneNumber = AuthState;
//@description TDLib needs user authentication code to finish authorization @is_registered True, if user is already registered @code_type Describes the way, code was sent to the user @next_code_type Describes the way, next code will be sent to the user, nullable @timeout Timeout in seconds before code should be resent by calling resendAuthCode
authStateWaitCode is_registered:Bool code_type:AuthCodeType next_code_type:AuthCodeType timeout:int = AuthState;
//@description User is authorized but he needs to enter its password to begin to use application @password_hint Hint on password, can be empty @has_recovery_email Is recovery email set up
//@recovery_email_pattern Pattern of email to which recovery mail was sent, empty before recovery email was sent
authStateWaitPassword password_hint:string has_recovery_email:Bool recovery_email_pattern:string = AuthState;
//@description User is successfully authorized. TDLib can answer queries
authStateOk = AuthState;
//@description User is currently logging out
authStateLoggingOut = AuthState;
//@description Represents current state of the two-step verification @has_password Is password set up @password_hint Hint on password, can be empty @has_recovery_email Is recovery email set up @unconfirmed_recovery_email_pattern Pattern of email to which confirmation mail was sent
passwordState has_password:Bool password_hint:string has_recovery_email:Bool unconfirmed_recovery_email_pattern:string = PasswordState;
//@description Contains information available to the user after requesting password recovery @recovery_email_pattern Pattern of email to which recovery mail was sent
passwordRecoveryInfo recovery_email_pattern:string = PasswordRecoveryInfo;
//@description Contains information about set up recovery email @recovery_email Recovery email
recoveryEmail recovery_email:string = RecoveryEmail;
//@description Returns information about availability of temporary password, which should be used for payments @has_password True, if we have temporary password @valid_for Time left before temporary password expires, seconds
temporaryPasswordState has_password:Bool valid_for:int = TemporaryPasswordState;
//@description Represents a file
//@id Unique file identifier
//@persistent_id Persistent file identifier, if exists. Can be used across application restarts or even other devices for current logged user. If begins with "http://" or "https://", it is HTTP URL of the file. Currently, TDLib is unable to download files if only they URL is known.-If downloadFile is called on a such file or it is sended to a secret chat TDLib starts file generation process by sending to the client updateFileGenerationStart with HTTP URL in the original_path and "#url#" as conversion string. Client supposed to generate the file by downloading it to the specified location
//@size File size, 0 if unknown
//@is_being_downloaded True, if the file is currently being downloaded
//@local_size Size of locally available part of the file. If size != 0 && local_size == size, full file is available locally
//@is_being_uploaded True, if the file is currently being uploaded
//@remote_size Size of remotely available part of the file. If size != 0 && remote_size == size, the file is available remotely
//@path Local path to the available file part, may be empty
file id:int persistent_id:string size:int is_being_downloaded:Bool local_size:int is_being_uploaded:Bool remote_size:int path:string = File;
//@class InputFile @description Points to some file
//@description File defined by its id @id Unique file identifier
inputFileId id:int = InputFile;
//@description File defined by its persistent id @persistent_id Persistent file identifier
inputFilePersistentId persistent_id:string = InputFile;
//@description File deifned by local path @path Local path to the file
inputFileLocal path:string = InputFile;
//@description File generated by the client @original_path Local path to a file from which the file is generated, may be empty if there is no such file @conversion String specifying conversion applied to the original file, should be persistent across application restart @expected_size Expected size of the generated file, 0 if unknown
inputFileGenerated original_path:string conversion:string expected_size:int = InputFile;
//@description Photo description @type Thumbnail type (see https://core.telegram.org/constructor/photoSize) @photo Information about photo file @width Photo width @height Photo height
photoSize type:string photo:file width:int height:int = PhotoSize;
//@description Position on a photo where a mask should be placed @point Part of a face relative to which the mask should be placed. 0 - forehead, 1 - eyes, 2 - mouth, 3 - chin
//@x_shift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position
//@y_shift Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
//@scale Mask scaling coefficient. For example, 2.0 means double size
maskPosition point:int x_shift:double y_shift:double scale:double = MaskPosition;
//@description Represent part of the text which needs to be formatted in some unusual way @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points @type Type of the entity
textEntity offset:int length:int type:TextEntityType = TextEntity;
//@description Describes animation file. Animation should be encoded in gif or mp4 format @duration Duration of the animation in seconds as defined by sender @width Width of the animation @height Height of the animation
//@file_name Original name of a file as defined by sender @mime_type MIME type of a file, usually "image/gif" or "video/mp4" @thumb Animation thumb, nullable @animation File with the animation
animation duration:int width:int height:int file_name:string mime_type:string thumb:photoSize animation:file = Animation;
//@description Describes audio file. Audio is usually in mp3 format @duration Duration of the audio in seconds as defined by sender @title Title of the audio as defined by sender @performer Performer of the audio as defined by sender
//@file_name Original name of a file as defined by sender @mime_type MIME type of a file as defined by sender @album_cover_thumb Thumb of the album's cover as defined by sender. Full size thumb should be extracted from the downloaded file, nullable @audio File with the audio
audio duration:int title:string performer:string file_name:string mime_type:string album_cover_thumb:photoSize audio:file = Audio;
//@description Describes document of any type @file_name Original name of a file as defined by sender @mime_type MIME type of file as defined by sender
//@thumb Document thumb as defined by sender, nullable @document File with document
document file_name:string mime_type:string thumb:photoSize document:file = Document;
//@description Describes photo @id Photo identifier, 0 for deleted photo @has_stickers True, if some stickers was added to the photo @sizes Available variants of photo of different sizes
photo id:int64 has_stickers:Bool sizes:vector<photoSize> = Photo;
//@description Describes sticker @set_id Identifier of sticker set to which the sticker belongs or 0 if none @width Sticker width as defined by sender @height Sticker height as defined by sender
//@emoji Emoji corresponding to the sticker @is_mask True, if the sticker is a mask @mask_position Position where the mask should be placed, nullable @thumb Sticker thumb in webp or jpeg format, nullable @sticker File with sticker
sticker set_id:int64 width:int height:int emoji:string is_mask:Bool mask_position:maskPosition thumb:photoSize sticker:file = Sticker;
//@description Describes video file @duration Duration of the video in seconds as defined by sender @width Video width as defined by sender @height Video height as defined by sender
//@file_name Original name of a file as defined by sender @mime_type MIME type of a file as defined by sender @has_stickers True, if some stickers was added to the photo @thumb Video thumb as defined by sender, nullable @video File with the video
video duration:int width:int height:int file_name:string mime_type:string has_stickers:Bool thumb:photoSize video:file = Video;
//@description Describes video note. Video must have equal width and height, cropped to circle and stored in mpeg4 format @duration Duration of the video in seconds as defined by sender @length Video width and height as defined by sender @thumb Video thumb as defined by sender, nullable @video File with the video
videoNote duration:int length:int thumb:photoSize video:file = VideoNote;
//@description Describes voice note. Voice must be encoded with Opus codec and must be stored inside Ogg container @duration Duration of the voice record in seconds as defined by sender
//@waveform Waveform representation of the voice in 5-bit format @mime_type MIME type of a file as defined by sender @voice File with the voice record
voice duration:int waveform:bytes mime_type:string voice:file = Voice;
//@description Describes user contact @phone_number User's phone number @first_name User first name, 1-255 characters @last_name User last name @user_id User identifier if known, 0 otherwise
contact phone_number:string first_name:string last_name:string user_id:int = Contact;
//@description Describes location on Earth @latitude Latitude of location in degrees as defined by sender @longitude Longitude of location in degrees as defined by sender
location latitude:double longitude:double = Location;
//@description Describes venue @location Venue location as defined by sender @title Venue name as defined by sender @address Venue address as defined by sender @provider Provider of venue database as defined by sender. Only "foursquare" need to be supported currently
//@id Identifier of the venue in provider database as defined by sender
venue location:location title:string address:string provider:string id:string = Venue;
//@description Describes a game @id Game id @short_name Game short name, to share a game use a URL https://t.me/{bot_username}?game={game_short_name} @title Game title @text Game text, usually containing game scoreboards
//@text_entities Entities contained in the text @param_description Game description @photo Game photo @animation Game animation, nullable
game id:int64 short_name:string title:string text:string text_entities:vector<textEntity> description:string photo:photo animation:animation = Game;
//@description Describes user profile photo @id Photo identifier, 0 for empty photo. Can be used to find photo in list of userProfilePhotos
//@small Small (160x160) user profile photo @big Big (640x640) user profile photo
profilePhoto id:int64 small:file big:file = ProfilePhoto;
//@description Describes chat photo @small Small (160x160) chat photo @big Big (640x640) chat photo
chatPhoto small:file big:file = ChatPhoto;
//@class LinkState @description Represents ordered relationship between two users
//@description Other user's phone number doesn't known
linkStateNone = LinkState;
//@description Other user's phone number is known but user not in contacts list
linkStateKnowsPhoneNumber = LinkState;
//@description Other user is in contacts list, particularly its phone number is known
linkStateContact = LinkState;
//@class UserType @description Allows to distinguish different kinds of users: general users, deleted users and bots
//@description General user
userTypeGeneral = UserType;
//@description Deleted user or deleted bot. There is no any information about it except user_id. None of active action can be performed with deleted user
userTypeDeleted = UserType;
//@description Bot (see https://core.telegram.org/bots) @can_join_group_chats If true, bot can be invited to group and supergroup chats
//@can_read_all_group_chat_messages If true, bot can read all group or supergroup chat messages, not only addressed to him. In private chats bot always can read all messages
//@is_inline True, if bot supports inline queries @inline_query_placeholder Placeholder for inline query @need_location If true, user location should be sent with every inline query to this bot
userTypeBot can_join_group_chats:Bool can_read_all_group_chat_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool = UserType;
//@description Currently there is no any information about the user except user_id. It can happens very-very rarely. None of active action can be performed with unknown user
userTypeUnknown = UserType;
//@description Represents command supported by bot @command Text of the bot command @param_description Description of the bot command
botCommand command:string description:string = BotCommand;
//@description Provides information about bot and command supported by him @param_description Big description shown in user info page @commands List of commands cupported by bot
botInfo description:string commands:vector<botCommand> = BotInfo;
//@description Represents user @id User identifier @first_name User first name @last_name User last name @username User username
//@phone_number User's phone number @status User's online status @profile_photo User profile photo, nullable
//@my_link Relationships from me to other user @foreign_link Relationships from other user to me @is_verified True, if user is verified @restriction_reason If non-empty, contains the reason, why access to this user must be restricted. Format of the string is "{type}: {description}". -{type} contains type of the restriction and at least one of the suffixes "-all", "-ios", "-android", "-wp", which describes platforms on which access should be restricted. For example, "terms-ios-android". {description} contains human-readable description of the restriction, which can be showed to the user
//@have_access If false, the user is inaccessible and the only known information about it is inside this class. It can't be passed to any method except GetUser. Currently it can be false only for inaccessible authors of the channel posts @type Type of the user @language_code Bots only. IETF language tag of users language
user id:int first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto my_link:LinkState foreign_link:LinkState is_verified:Bool restriction_reason:string have_access:Bool type:UserType language_code:string = User;
//@description Gives full information about a user (except full list of profile photos) @is_blocked Is user blacklisted by the current user @can_be_called True, if the user can be called @has_private_calls True, if the user can't be called only because of his privacy settings
//@about Short user bio or bot share text @common_chat_count Number of common chats between the user and current user, 0 for the current user @bot_info Information about bot if user is a bot, nullable
userFull is_blocked:Bool can_be_called:Bool has_private_calls:Bool about:string common_chat_count:int bot_info:botInfo = UserFull;
//@description Contains part of the list of user photos @total_count Total number of user profile photos @photos List of photos
userProfilePhotos total_count:int photos:vector<photo> = UserProfilePhotos;
//@description Represents list of users @total_count Approximate total count of found users @user_ids List of user identifiers
users total_count:int user_ids:vector<int> = Users;
//@class ChatMemberStatus @description Provides information about status of a member in the chat
//@description User is creator of the chat which has all administrator priviledges
chatMemberStatusCreator = ChatMemberStatus;
//@description User is a chat member with some additional priviledges. In groups, administrators can edit and delete other messages, add new members and ban unpriviledged members
//@can_be_edited True, if current user has rights to edit administrator privileges of that user
//@can_change_info True, if the administrator can change chat title, photo and other settings
//@can_post_messages True, if the administrator can create channel posts, broadcast channels only
//@can_edit_messages True, if the administrator can edit messages of other users, broadcast channels only
//@can_delete_messages True, if the administrator can delete messages of other users
//@can_invite_users True, if the administrator can invite new users to the chat
//@can_restrict_members True, if the administrator can restrict, ban or unban chat members
//@can_pin_messages True, if the administrator can pin messages, supergroup channels only
//@can_promote_members True, if the administrator can add new administrators with a subset of his own privileges or demote administrators directly or indirectly promoted by him
chatMemberStatusAdministrator can_be_edited:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool = ChatMemberStatus;
//@description User is a member of the chat, but have no any additional privileges or restrictions
chatMemberStatusMember = ChatMemberStatus;
//@description User has some additional restrictions in the chat. Unsupported in group chats and broadcast channels
//@is_member True, if user is chat member
//@restricted_until_date Date when the user will be unrestricted, 0 if never. Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time it considered to be restricted forever
//@can_send_messages True, if the user can send text messages, contacts, locations and venues
//@can_send_media_messages True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
//@can_send_other_messages True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages
//@can_add_web_page_previews True, if user may add web page preview to his messages, implies can_send_messages
chatMemberStatusRestricted is_member:Bool restricted_until_date:int can_send_messages:Bool can_send_media_messages:Bool can_send_other_messages:Bool can_add_web_page_previews:Bool = ChatMemberStatus;
//@description User is not a chat member
chatMemberStatusLeft = ChatMemberStatus;
//@description User was banned (and obviously is not a chat member) and can't return to the chat or view messages
//@banned_until_date Date when the user will be unbanned, 0 if never. Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time it considered to be banned forever
chatMemberStatusBanned banned_until_date:int = ChatMemberStatus;
//@description User with information about its chat joining/leaving @user_id User identifier of the chat member @inviter_user_id Identifier of a user invited/promoted/banned this member in the chat, 0 if unknown
//@join_date Date the user has joined a chat, unix time @status Status of the member in the chat @bot_info Information about bot if user is a bot, nullable. Can be null even for bot if bot is not a chat member
chatMember user_id:int inviter_user_id:int join_date:int status:ChatMemberStatus bot_info:botInfo = ChatMember;
//@description Contains list of chat members @total_count Approximate total count of found chat members @members List of members
chatMembers total_count:int members:vector<chatMember> = ChatMembers;
//@class ChannelMembersFilter @description Specifies kind of chat users to return in getChannelMembers
//@description Return recently active users in reverse chronological order
channelMembersFilterRecent = ChannelMembersFilter;
//@description Return creator and administrators
channelMembersFilterAdministrators = ChannelMembersFilter;
//@description Searches for channel members using specified query @query Query to search for
channelMembersFilterSearch query:string = ChannelMembersFilter;
//@description Return restricted channel members, administrators only @query Query to search for
channelMembersFilterRestricted query:string = ChannelMembersFilter;
//@description Return banned from the channel users, administrators only @query Query to search for
channelMembersFilterBanned query:string = ChannelMembersFilter;
//@description Return bot members of the channel
channelMembersFilterBots = ChannelMembersFilter;
//@description Represents a group of zero or more other users @id Group identifier
//@member_count Group member count
//@status Status of the current user in the group
//@everyone_is_administrator True, if all members granted administrator rights in the group
//@is_active True, if group is active
//@migrated_to_channel_id Identifier of channel (supergroup) to which this group was migrated or 0 if none
group id:int member_count:int status:ChatMemberStatus everyone_is_administrator:Bool is_active:Bool migrated_to_channel_id:int = Group;
//@description Gives full information about a group @creator_user_id User identifier of the group creator, 0 if unknown @members Group members @invite_link Invite link for this group, available only for group creator and only after it is generated at least once
groupFull creator_user_id:int members:vector<chatMember> invite_link:string = GroupFull;
//@description Represents a channel with zero or more subscribers. There two different kinds of channels: supergroups and broadcast channels
//@id Channel identifier
//@username Channel username, empty for private channels
//@date Date when current user has joined the channel or date when channel was created, if user is not a member. Unix time
//@status Status of the current user in the channel
//@anyone_can_invite True, if any member of the supergroup can invite other members. If the channel is not a supergroup, the field is meaningless
//@sign_messages True, if messages sent to the channel should content information about the sender. If the channel is a supergroup, the field is meaningless
//@is_supergroup True, if channel is a supergroup and is not a broadcast
//@is_verified True, if the channel is verified
//@restriction_reason If non-empty, contains the reason, why access to this channel must be restricted. Format of the string is "{type}: {description}". {type} contains type of the restriction and at least one of the suffixes "-all", "-ios", "-android", "-wp", which describes platforms on which access should be restricted. For example, "terms-ios-android". {description} contains human-readable description of the restriction, which can be showed to the user
channel id:int username:string date:int status:ChatMemberStatus anyone_can_invite:Bool sign_messages:Bool is_supergroup:Bool is_verified:Bool restriction_reason:string = Channel;
//@description Gives full information about a channel
//@param_description Channel description
//@member_count Channel member count, 0 if unknown
//@administrator_count Number of privileged users in the channel, 0 if unknown
//@restricted_count Number of restricted users in the channel, 0 if unknown
//@banned_count Number of users banned from the channel, 0 if unknown
//@can_get_members True, if members of the channel can be retrieved
//@can_set_username True, if the channel can be made public
//@can_set_sticker_set True, if the channel sticker set can be changed
//@sticker_set_id Identifier of channel sticker set, or 0 if none
//@invite_link Invite link for this channel
//@pinned_message_id Identifier of the pinned message in the channel chat, or 0 if none
//@migrated_from_group_id Identifier of the group, this supergroup migrated from, or 0 if none
//@migrated_from_max_message_id Identifier of last message in the group chat migrated from, or 0 if none
channelFull description:string member_count:int administrator_count:int restricted_count:int banned_count:int can_get_members:Bool can_set_username:Bool can_set_sticker_set:Bool sticker_set_id:int64 invite_link:string pinned_message_id:int53 migrated_from_group_id:int migrated_from_max_message_id:int53 = ChannelFull;
//@description Represents a secret chat
//@id Secret chat identifier
//@user_id Identifier of the interlocutor
//@state State of the secret chat, 0 - yet not created, 1 - active, 2 - closed
//@is_outbound True if chat was created by the current logged in user, false otherwise
//@ttl Current message TTL setting for the chat in seconds
//@key_hash Hash of the current used key for comparison with the hash of the interlocutor's key. String of 36 bytes, which should be used to make a 12x12 square image with a color depth of 4. First 16 bytes should be used to make a central 8 * 8 square, left 20 bytes should be used to construct a border of width 2 around that square. Alternatively first 32 bytes of the hash can be converted to hex and printed as 32 2-digit hex numbers
//@layer Secret chat layer, determining features supported by other client. Video notes are supported if layer >= 66
secretChat id:int user_id:int state:int is_outbound:Bool ttl:int key_hash:bytes layer:int = SecretChat;
//@description Contains chat invite link @invite_link Chat invite link
chatInviteLink invite_link:string = ChatInviteLink;
//@description Contains information about chat invite link @chat_id Chat identifier of the invite link or 0 if user is not a member of this chat @title Title of the chat @photo Chat photo, nullable @member_count Total member count @member_user_ids User identifiers of some chat members that may be known to the current user
//@is_group True, if the chat is a group chat @is_channel True, if the chat is a channel chat @is_public_channel True, if the chat is a channel chat with set up username @is_supergroup_channel True, if the chat is a supergroup channel chat
chatInviteLinkInfo chat_id:int53 title:string photo:chatPhoto member_count:int member_user_ids:vector<int> is_group:Bool is_channel:Bool is_public_channel:Bool is_supergroup_channel:Bool = ChatInviteLinkInfo;
//@class MessageForwardInfo @description Contains information about initial sender of forwarded message
//@description Message is originally written by known user @sender_user_id Identifier of a user, who originally sent this message @date Date when message was originally sent
messageForwardedFromUser sender_user_id:int date:int = MessageForwardInfo;
//@description Message is orifinally a channel post @chat_id Identifier of a chat from which message is forwarded @author_signature Post author signature
//@date Date when message was originally sent @message_id Message identifier of the message from which the message is forwarded, 0 if unknown
messageForwardedPost chat_id:int53 author_signature:string date:int message_id:int53 = MessageForwardInfo;
//@class MessageSendState @description Contains information about sending state of the message
//@description Message is incoming
messageIsIncoming = MessageSendState;
//@description Message is outgoing but is yet not delivered to the server
messageIsBeingSent = MessageSendState;
//@description Message was synchronized with the server
messageIsSuccessfullySent = MessageSendState;
//@description Message is failed to send
messageIsFailedToSend = MessageSendState;
//@description Describes message
//@id Unique message identifier
//@sender_user_id Identifier of the user who sent the message, 0 if unknown. It is unknown for channel posts
//@chat_id Chat identifier
//@send_state Information about sending state of the message
//@can_be_edited True, if message can be edited
//@can_be_forwarded True, if message can be forwarded
//@can_be_deleted_only_for_self True, if message can be deleted only for self, other users will continue to see it
//@can_be_deleted_for_everyone True, if message can be deleted for everyone
//@is_post True, if message is channel post. All messages to broadcast channels are posts, all other messages are not posts
//@contains_unread_mention True, if message contains unread mention of the current user
//@date Date when message was sent, unix time
//@edit_date Date when message was edited last time, unix time
//@forward_info Information about initial message sender, nullable
//@reply_to_message_id If non-zero, identifier of the message this message replies to, can be identifier of deleted message
//@ttl Message TTL in seconds, 0 if none. TDLib will send updateDeleteMessages or updateMessageContent when TTL expires
//@ttl_expires_in Time left for message TTL to expire in seconds
//@via_bot_user_id If non-zero, user identifier of the bot this message is sent via
//@author_signature For channel posts, optional author signature
//@views Number of times this message was viewed
//@content Content of the message
//@reply_markup Reply markup for the message, nullable
message id:int53 sender_user_id:int chat_id:int53 send_state:MessageSendState can_be_edited:Bool can_be_forwarded:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_everyone:Bool is_post:Bool contains_unread_mention:Bool date:int edit_date:int forward_info:MessageForwardInfo reply_to_message_id:int53 ttl:int ttl_expires_in:double via_bot_user_id:int author_signature:string views:int content:MessageContent reply_markup:ReplyMarkup = Message;
//@description Contains list of messages @total_count Approximate total count of found messages @messages List of messages
messages total_count:int messages:vector<message> = Messages;
//@description Contains list of found by search messages @messages List of messages @next_from_search_id Value to pass as from_search_id to get more results
foundMessages messages:vector<message> next_from_search_id:int64 = FoundMessages;
//@class NotificationSettingsScope @description Describes kinds of chat for which notification settings are applied
//@description Notification settings applied to particular chat @chat_id Chat identifier
notificationSettingsScopeChat chat_id:int53 = NotificationSettingsScope;
//@description Notification settings applied to all private chats
notificationSettingsScopePrivateChats = NotificationSettingsScope;
//@description Notification settings applied to all group and broadcast channel chats (supergroup channels have no common settings)
notificationSettingsScopeGroupChats = NotificationSettingsScope;
//@description Notification settings applied to all chats
notificationSettingsScopeAllChats = NotificationSettingsScope;
//@description Contains information about notification settings for chat or chats @mute_for Time left before notifications will be unmuted, seconds @sound Audio file name for notifications, iPhone apps only @show_preview Display message text/media in notification
notificationSettings mute_for:int sound:string show_preview:Bool = NotificationSettings;
//@description Contains information about draft of a message @reply_to_message_id Identifier of a message to reply to or 0 @input_message_text Content of a draft message, always should be of a type inputMessageText
draftMessage reply_to_message_id:int53 input_message_text:InputMessageContent = DraftMessage;
//@class ChatType @description Describes type of a chat
//@description Ordinary chat with a user @user_id User identifier
chatTypePrivate user_id:int = ChatType;
//@description Chat with zero or more other users @group_id Group identifier
chatTypeGroup group_id:int = ChatType;
//@description Chat with unlimited number of members @channel_id Channel identifier @is_supergroup True, if the channel is a supergroup and is not a broadcast
chatTypeChannel channel_id:int is_supergroup:Bool = ChatType;
//@description Secret chat with a user @secret_chat_id Secret chat identifier @user_id User identifier of the peer
chatTypeSecret secret_chat_id:int user_id:int = ChatType;
//@description Chat (private chat or group chat or channel chat)
//@id Chat unique identifier
//@type Information about type of the chat
//@title Chat title
//@photo Chat photo, nullable
//@top_message Last message in the chat, nullable
//@order Parameter by descending of which chats are sorted in the chat list. If order of two chats is equal, then they need to be sorted by id also in descending order. If order == 0, position of the chat in the list is undetermined
//@is_pinned True, if the chat is pinned
//@unread_count Count of unread messages in the chat
//@last_read_inbox_message_id Identifier of last read incoming message
//@last_read_outbox_message_id Identifier of last read outgoing message
//@unread_mention_count Count of unread messages with mention/reply in the chat
//@notification_settings Notification settings for this chat
//@reply_markup_message_id Identifier of the message from which reply markup need to be used or 0 if there is no default custom reply markup in the chat
//@draft_message Draft of a message in the chat, nullable. parse_mode in input_message_text always will be null
//@client_data Client specified data, associated with the chat. For example, chat position or local chat notification settings may be stored here. Persistent if message db is used
chat id:int53 type:ChatType title:string photo:chatPhoto top_message:message order:int64 is_pinned:Bool unread_count:int last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int notification_settings:notificationSettings reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
//@description Represents list of chats @chat_ids List of chat identifiers
chats chat_ids:vector<int53> = Chats;
//@class KeyboardButtonType @description Describes type of the keyboard button
//@description Simple button with a text, which should be sent when the button is pressed
keyboardButtonTypeText = KeyboardButtonType;
//@description A button which sends user's phone number when pressed, available only in private chats
keyboardButtonTypeRequestPhoneNumber = KeyboardButtonType;
//@description A button which sends user location when pressed, available only in private chats
keyboardButtonTypeRequestLocation = KeyboardButtonType;
//@description Represents one button of the bot keyboard @text Text of the button @type Type of the button
keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
//@class InlineKeyboardButtonType @description Describes type of the inline keyboard button
//@description A button which opens the specified URL @url URL to open
inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType;
//@description A button which sends to the bot special callback query @data Data to be sent to the bot through a callack query
inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType;
//@description A button with a game which sends to the bot special callback query, must be in the first column and row of the keyboard, can be attached only to a message with content of the type messageGame
inlineKeyboardButtonTypeCallbackGame = InlineKeyboardButtonType;
//@description A button which forces inline query to the bot to be substitued in the input field @query Inline query to be sent to the bot @in_current_chat True, if the inline query should be sent from the current chat
inlineKeyboardButtonTypeSwitchInline query:string in_current_chat:Bool = InlineKeyboardButtonType;
//@description A button for buying, must be in the first column and row of the keyboard, can be attached only to a message with content of the type messageInvoice
inlineKeyboardButtonTypeBuy = InlineKeyboardButtonType;
//@description Represents one button of the inline keyboard @text Text of the button @type Type of the button
inlineKeyboardButton text:string type:InlineKeyboardButtonType = InlineKeyboardButton;
//@class ReplyMarkup @description Contains description of custom keyboard and actions with it for fast reply to bots
//@description Instruct clients to remove keyboard after receiving this message. This kind of keyboard can't be received. Instead UpdateChatReplyMarkup with message_id == 0 will be send
//@personal Keyboard is removed only for mentioned users or replied to user
replyMarkupRemoveKeyboard personal:Bool = ReplyMarkup;
//@description Instruct clients to force reply to this message @personal Forced reply is used automatically only for mentioned users or replied to chat user, for incoming messages it is true if and only if forced reply needs to be automatically showed to the current user
replyMarkupForceReply personal:Bool = ReplyMarkup;
//@description Contains custom keyboard layout for fast reply to bot
//@rows List of rows of bot keyboard buttons
//@resize_keyboard Do clients need to resize keyboard vertically
//@one_time Do clients need to hide keyboard after use
//@personal Keyboard is showed automatically only for mentioned users or replied to user, for incoming messages it is true if and only if keyboard needs to be automatically showed to current user
replyMarkupShowKeyboard rows:vector<vector<keyboardButton>> resize_keyboard:Bool one_time:Bool personal:Bool = ReplyMarkup;
//@description Contains inline keyboard layout
//@rows List of rows of inline keyboard buttons
replyMarkupInlineKeyboard rows:vector<vector<inlineKeyboardButton>> = ReplyMarkup;
//@class RichText @description Describes a text inside web page instant view
//@description Plain text @text The text
richTextPlain text:string = RichText;
//@description Bold rich text @text The text
richTextBold text:RichText = RichText;
//@description Italicized rich text @text The text
richTextItalic text:RichText = RichText;
//@description Underlined rich text @text The text
richTextUnderline text:RichText = RichText;
//@description Striked through rich text @text The text
richTextStrikethrough text:RichText = RichText;
//@description Fixed width rich text @text The text
richTextFixed text:RichText = RichText;
//@description Rich text URL link @text The text @url The URL
richTextUrl text:RichText url:string = RichText;
//@description Rich text email link @text The text @email The email
richTextEmail text:RichText email:string = RichText;
//@description Concatenation of rich texts @texts The texts
richTextConcatenation texts:vector<RichText> = RichText;
//@class PageBlock @description Describes a block of web page instant view
//@description Title of a page @title The title
pageBlockTitle title:RichText = PageBlock;
//@description Subtitle of a page @subtitle The subtitle
pageBlockSubtitle subtitle:RichText = PageBlock;
//@description Author and publish date of a page @author The author @publish_date Date of article publish, unix time. 0 if unknown
pageBlockAuthorDate author:RichText publish_date:int = PageBlock;
//@description A header @header The header
pageBlockHeader header:RichText = PageBlock;
//@description A subheader @subheader The subheader
pageBlockSubheader subheader:RichText = PageBlock;
//@description A text paragraph @text Paragraph text
pageBlockParagraph text:RichText = PageBlock;
//@description Preformatted text paragraph @text Paragraph text @language Programming language for which the text should be formatted
pageBlockPreformatted text:RichText language:string = PageBlock;
//@description Footer of a page @footer The footer
pageBlockFooter footer:RichText = PageBlock;
//@description An empty block separating parts of a page
pageBlockDivider = PageBlock;
//@description Invisible anchor on a page which can be used in a URL to open a page from the specified anchor @name Name of the anchor
pageBlockAnchor name:string = PageBlock;
//@description List of texts @items Texts @is_ordered True, if items should be marked with numbers
pageBlockList items:vector<RichText> is_ordered:Bool = PageBlock;
//@description Block quote @text Quote text @caption Quote caption
pageBlockBlockQuote text:RichText caption:RichText = PageBlock;
//@description Pull quote @text Quote text @caption Quote caption
pageBlockPullQuote text:RichText caption:RichText = PageBlock;
//@description An animation @animation The animation, nullable @caption Animation caption @need_autoplay True, if the animation should be autoplayed
pageBlockAnimation animation:animation caption:RichText need_autoplay:Bool = PageBlock;
//@description An audio @audio The audio, nullable @caption Audio caption
pageBlockAudio audio:audio caption:RichText = PageBlock;
//@description A photo @photo The photo, nullable @caption Photo caption
pageBlockPhoto photo:photo caption:RichText = PageBlock;
//@description A video @video The video, nullable @caption Video caption @need_autoplay True, if the video should be autoplayed @is_looped True, if the video is looped
pageBlockVideo video:video caption:RichText need_autoplay:Bool is_looped:Bool = PageBlock;
//@description Page cover @cover The cover
pageBlockCover cover:PageBlock = PageBlock;
//@description Embedded web page @url Web page URL, if available @html HTML-markup of the embedded page @poster_photo Poster photo if available, nullable @width Block width @height Block height @caption Block caption @is_full_width True, if the block should be full width @allow_scrolling True, if scrolling should be allowed
pageBlockEmbedded url:string html:string poster_photo:photo width:int height:int caption:RichText is_full_width:Bool allow_scrolling:Bool = PageBlock;
//@description Embedded post @url Web page URL @author Post author @author_photo Post author photo @date Post date, unix time. 0 if unknown @page_blocks Post content @caption Post caption
pageBlockEmbeddedPost url:string author:string author_photo:photo date:int page_blocks:vector<PageBlock> caption:RichText = PageBlock;
//@description A collage @page_blocks Collage item contents @caption Block caption
pageBlockCollage page_blocks:vector<PageBlock> caption:RichText = PageBlock;
//@description A slideshow @page_blocks Slideshow item contents @caption Block caption
pageBlockSlideshow page_blocks:vector<PageBlock> caption:RichText = PageBlock;
//@description A link to a chat @title Chat title @photo Chat photo, nullable @username Chat username by which all other information about the chat should be resolved
pageBlockChatLink title:string photo:chatPhoto username:string = PageBlock;
//@description Describes instant view of a web page @page_blocks Content of the web page @is_full True, if instant view contains full page. Network request may be needed to get full web page instant view
webPageInstantView page_blocks:vector<PageBlock> is_full:Bool = WebPageInstantView;
//@description Describes web page preview @url Original URL of link @display_url URL to display
//@type Type of web page: article, photo, audio, video, document, profile, app or something other
//@site_name Short name of the site (i.e. Google Docs or App Store) @title Title of the content @param_description Description of the content
//@photo Image representing the content, nullable
//@embed_url Url to show embedded preview
//@embed_type MIME type of embedded preview, i.e. text/html or video/mp4
//@embed_width Width of embedded preview
//@embed_height Height of embedded preview
//@duration Duration of the content in seconds
//@author Author of the content
//@animation Preview as an Animation if available, nullable
//@audio Preview as an Audio if available, nullable
//@document Preview as a Document if available (currently only for small pdf files and zip archives), nullable
//@sticker Preview as a Sticker for small .webp files if available, nullable
//@video Preview as a Video if available, nullable
//@video_note Preview as a VideoNote if available, nullable
//@voice Preview as a Voice if available, nullable
//@has_instant_view True if web page has instant view
webPage url:string display_url:string type:string site_name:string title:string description:string photo:photo embed_url:string embed_type:string embed_width:int embed_height:int duration:int author:string animation:animation audio:audio document:document sticker:sticker video:video video_note:videoNote voice:voice has_instant_view:Bool = WebPage;
//@description Goods price portion @label Portion label @amount Currency amount in minimal quantity of the currency
labeledPrice label:string amount:int53 = LabeledPrice;
//@description Goods invoice @currency ISO 4217 currency code @prices List of objects used to calculate total price @is_test True, if payment is test @need_name True, if user's name is needed for payment @need_phone_number True, if user's phone number is needed for payment @need_email True, if user's email is needed for payment
//@need_shipping_address True, if user's shipping address is needed for payment @is_flexible True, if total price depends on shipping method
invoice currency:string prices:vector<labeledPrice> is_test:Bool need_name:Bool need_phone_number:Bool need_email:Bool need_shipping_address:Bool is_flexible:Bool = Invoice;
//@description Describes shipping address @country_code Two letter ISO 3166-1 alpha-2 country code @state State if applicable @city City @street_line1 First line for the address @street_line2 Second line for the address @post_code Address post code
shippingAddress country_code:string state:string city:string street_line1:string street_line2:string post_code:string = ShippingAddress;
//@description Order information @name User name @phone_number User's phone number @email User email @shipping_address User shipping address, nullable
orderInfo name:string phone_number:string email:string shipping_address:shippingAddress = OrderInfo;
//@description One shipping option @id Shipping option identifier @title Option title @prices List of objects used to calculate total shipping price
shippingOption id:string title:string prices:vector<labeledPrice> = ShippingOption;
//@description Information about saved card credentials @id Unique identifier of the saved credentials @title Title of the saved credentials
savedCredentials id:string title:string = SavedCredentials;
//@class InputCredentials @description Contains information about payment method chosen by user
//@description User chooses previosly saved payment credentials. To use previously saved credentials user should have valid temporary password @saved_credentials_id Identifier of saved credentials
inputCredentialsSaved saved_credentials_id:string = InputCredentials;
//@description User enters new credentials on payment provider web site @data JSON-encoded data with credentials identifier from the payment provider @allow_save True, if credentials identifier can be saved server-side
inputCredentialsNew data:string allow_save:Bool = InputCredentials;
//@description Stripe payments provider @publishable_key Stripe API publishable key @need_country True, if user country should be entered @need_zip True, if user zip code should be entered @need_cardholder_name True, if cardholder name should be entered
paymentsProviderStripe publishable_key:string need_country:Bool need_zip:Bool need_cardholder_name:Bool = PaymentsProviderStripe;
//@description Information about invoice payment form @invoice Full information about the invoice @url Payment form URL @payments_provider Information about payment provider if available, to support it natively without opening the URL, nullable
//@saved_order_info Saved server-side order information, nullable @saved_credentials Information about saved card credentials, nullable @can_save_credentials True, if the user can choose to save credentials @need_password True, if the user will be able to save credentials if he set up a password
paymentForm invoice:invoice url:string payments_provider:paymentsProviderStripe saved_order_info:orderInfo saved_credentials:savedCredentials can_save_credentials:Bool need_password:Bool = PaymentForm;
//@description Contains temporary identifier of validated order information stored for an hour and available shipping options @order_info_id Temporary identifier of order information @shipping_options Available shipping options
validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo;
//@description Contains result of a payment query @success True, if payment request was successful. If false, verification_url will be not empty @verification_url Url for additional payments credentials verification
paymentResult success:Bool verification_url:string = PaymentResult;
//@description Contains information about successful payment @date Payment date, unix time @payments_provider_user_id User identifier of payments provider bot @invoice Information about the invoice
//@order_info Order information, nullable @shipping_option Chosen shipping option, nullable @credentials_title Title of the saved credentials
paymentReceipt date:int payments_provider_user_id:int invoice:invoice order_info:orderInfo shipping_option:shippingOption credentials_title:string = PaymentReceipt;
//@class MessageContent @description Content of a message
//@description Text message @text Text of the message @entities Entities contained in the text @web_page Preview of a web page mentioned in the text, nullable
messageText text:string entities:vector<textEntity> web_page:webPage = MessageContent;
//@description Animation message @animation Message content @caption Animation caption
messageAnimation animation:animation caption:string = MessageContent;
//@description Audio message @audio Message content @caption Audio caption
messageAudio audio:audio caption:string = MessageContent;
//@description Document message @document Message content @caption Document caption
messageDocument document:document caption:string = MessageContent;
//@description Photo message @photo Message content @caption Photo caption
messagePhoto photo:photo caption:string = MessageContent;
//@description Photo message expired by TTL
messageExpiredPhoto = MessageContent;
//@description Sticker message @sticker Message content
messageSticker sticker:sticker = MessageContent;
//@description Video message @video Message content @caption Video caption
messageVideo video:video caption:string = MessageContent;
//@description Video message expired by TTL
messageExpiredVideo = MessageContent;
//@description Video note message @video_note Message content @is_viewed True, if the video note message was viewed
messageVideoNote video_note:videoNote is_viewed:Bool = MessageContent;
//@description Voice message @voice Message content @caption Voice caption @is_listened True, if the voice message was listened to
messageVoice voice:voice caption:string is_listened:Bool = MessageContent;
//@description Message with location @location Message content
messageLocation location:location = MessageContent;
//@description Message with information about venue @venue Message content
messageVenue venue:venue = MessageContent;
//@description User contact message @contact Message content
messageContact contact:contact = MessageContent;
//@description Message with a game @game The game
messageGame game:game = MessageContent;
//@description Message with an invoice from a bot @title Goods title @param_description Goods description @photo Goods photo, nullable @currency Currency for goods price @total_amount Goods total price in minimal quantity of the currency
//@start_parameter Unique invoice bot start_parameter. To share an invoice use a URL https://t.me/{bot_username}?start={start_parameter} @is_test True, if invoice is test
//@need_shipping_address True, if shipping address should be specified @receipt_message_id Identifier of message with receipt after the goods are paid
messageInvoice title:string description:string photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 = MessageContent;
//@description Message with an information about ended call @discard_reason Call discard reason @duration Call duration in seconds
messageCall discard_reason:CallDiscardReason duration:int = MessageContent;
//@description New group chat created @title Title of created group chat @member_user_ids User identifiers of members of created group chat
messageGroupChatCreate title:string member_user_ids:vector<int> = MessageContent;
//@description New channel chat created @title Title of created channel chat
messageChannelChatCreate title:string = MessageContent;
//@description Chat title changed @title New chat title
messageChatChangeTitle title:string = MessageContent;
//@description Chat photo changed @photo New chat photo
messageChatChangePhoto photo:photo = MessageContent;
//@description Chat photo deleted
messageChatDeletePhoto = MessageContent;
//@description Chat members added @member_user_ids User identifiers of new chat members
messageChatAddMembers member_user_ids:vector<int> = MessageContent;
//@description Chat member joined by invite link
messageChatJoinByLink = MessageContent;
//@description Chat member deleted @user_id User identifier of deleted chat memeber
messageChatDeleteMember user_id:int = MessageContent;
//@description Group chat is migrated to supergroup channel and deactivated @channel_id Identifier of the channel it is migrated to
messageChatMigrateTo channel_id:int = MessageContent;
//@description Supergroup channel is created from group chat @title Title of created channel chat @group_id Identifier of the group it is migrated from
messageChatMigrateFrom title:string group_id:int = MessageContent;
//@description Some message was pinned @message_id Identifier of the pinned message, can be identifier of the deleted message
messagePinMessage message_id:int53 = MessageContent;
//@description Screenshot of messages in the chat was taken
messageScreenshotTaken = MessageContent;
//@description Messages ttl setting in secret chat has changed @ttl New ttl
messageChatSetTtl ttl:int = MessageContent;
//@description New high score was achieved in a game @game_message_id Identifier of the message with the game, can be identifier of the deleted message @game_id Identifier of the game, may be different from the games presented in the message with the game @score New score
messageGameScore game_message_id:int53 game_id:int64 score:int = MessageContent;
//@description Payment completed @currency Currency for goods price @total_amount Goods total price in minimal quantity of the currency
messagePaymentSuccessful currency:string total_amount:int53 = MessageContent;
//@description Bots only. Payment completed @currency Currency for goods price @total_amount Goods total price in minimal quantity of the currency @invoice_payload Invoice payload @shipping_option_id Identifier of a choosed by user shipping option, may be empty if not applicable @order_info Information about the order, nullable
//@telegram_payment_charge_id Telegram payment identifier @provider_payment_charge_id Provider payment identifier
messagePaymentSuccessfulBot currency:string total_amount:int53 invoice_payload:bytes shipping_option_id:string order_info:orderInfo telegram_payment_charge_id:string provider_payment_charge_id:string = MessageContent;
//@description Contact has registered
messageContactRegistered = MessageContent;
//@description Unsupported message content
messageUnsupported = MessageContent;
//@class TextEntityType @description Represent part of the text which needs to be formatted in some unusual way
//@description Mention of the user by his username
textEntityTypeMention = TextEntityType;
//@description Hashtag beginning with #
textEntityTypeHashtag = TextEntityType;
//@description Bot command beginning with /. It shouldn't be highlighted if there is no bots in the chat
textEntityTypeBotCommand = TextEntityType;
//@description Url beginning with http
textEntityTypeUrl = TextEntityType;
//@description Email
textEntityTypeEmail = TextEntityType;
//@description Bold text
textEntityTypeBold = TextEntityType;
//@description Italic text
textEntityTypeItalic = TextEntityType;
//@description Text needs to be formatted as inside of code HTML tag
textEntityTypeCode = TextEntityType;
//@description Text needs to be formatted as inside of pre HTML tag
textEntityTypePre = TextEntityType;
//@description Text needs to be formatted as inside of pre and code HTML tags @language Language of code as defined by sender
textEntityTypePreCode language:string = TextEntityType;
//@description Text description showed instead of the url @url Url to be opened after link will be clicked
textEntityTypeTextUrl url:string = TextEntityType;
//@description Mention of the user by some text @user_id Identifier of the mentioned user
textEntityTypeMentionName user_id:int = TextEntityType;
//@class TextParseMode @description Describes a way text should be parsed for MessageEntities, by default text is treated as is
//@description Text should be parsed in markdown-style way
textParseModeMarkdown = TextParseMode;
//@description Text should be parsed in the HTML-style way
textParseModeHTML = TextParseMode;
//@description Contains a list ot text entities @entities The entities
textEntities entities:vector<textEntity> = TextEntities;
//@description Thumb to send along with a file, should be in jpeg format or webp format for stickers and less than 200KB in size @thumb Thumb file to send, sending thumbs by file_id is currently not supported
//@width Thumb width, usually shouldn't excceed 90. Use 0 if unknown @height Thumb height, usually shouldn't excceed 90. Use 0 if unknown
inputThumb thumb:InputFile width:int height:int = InputThumb;
//@class InputMessageContent @description Content of a message to send
//@description Text message @text Text to send @disable_web_page_preview Pass true to disable rich preview for link in the message text @clear_draft Pass true if chat draft message should be deleted
//@entities Bold, Italic, Code, Pre, PreCode and TextUrl entities contained in the text. Non-bot users can't use TextUrl entities. Can't be used with non-null parse_mode @parse_mode Text parse mode, nullable. Can't be used along with enitities
inputMessageText text:string disable_web_page_preview:Bool clear_draft:Bool entities:vector<textEntity> parse_mode:TextParseMode = InputMessageContent;
//@description Animation message @animation Animation file to send @thumb Animation thumb, if available @duration Duration of the animation in seconds @width Width of the animation, may be replaced by the server @height Height of the animation, may be replaced by the server @caption Animation caption, 0-200 characters
inputMessageAnimation animation:InputFile thumb:inputThumb duration:int width:int height:int caption:string = InputMessageContent;
//@description Audio message @audio Audio file to send @album_cover_thumb Thumb of the album's cover, if available @duration Duration of the audio in seconds, may be replaced by the server @title Title of the audio, 0-64 characters, may be replaced by the server
//@performer Performer of the audio, 0-64 characters, may be replaced by the server @caption Audio caption, 0-200 characters
inputMessageAudio audio:InputFile album_cover_thumb:inputThumb duration:int title:string performer:string caption:string = InputMessageContent;
//@description Document message @document Document to send @thumb Document thumb, if available @caption Document caption, 0-200 characters
inputMessageDocument document:InputFile thumb:inputThumb caption:string = InputMessageContent;
//@description Photo message @photo Photo to send @thumb Photo thumb to send, is sent to the other party in secret chats only @added_sticker_file_ids File identifiers of stickers added onto the photo @width Photo width @height Photo height @caption Photo caption, 0-200 characters
//@ttl Photo TTL in seconds, 0-60. Non-zero TTL can be only specified in private chats
inputMessagePhoto photo:InputFile thumb:inputThumb added_sticker_file_ids:vector<int> width:int height:int caption:string ttl:int = InputMessageContent;
//@description Sticker message @sticker Sticker to send @thumb Sticker thumb, if available @width Sticker width @height Sticker height
inputMessageSticker sticker:InputFile thumb:inputThumb width:int height:int = InputMessageContent;
//@description Video message @video Video to send @thumb Video thumb, if available @added_sticker_file_ids File identifiers of stickers added onto the video @duration Duration of the video in seconds @width Video width @height Video height @caption Video caption, 0-200 characters
//@ttl Video TTL in seconds, 0-60. Non-zero TTL can be only specified in private chats
inputMessageVideo video:InputFile thumb:inputThumb added_sticker_file_ids:vector<int> duration:int width:int height:int caption:string ttl:int = InputMessageContent;
//@description Video note message @video_note Video note to send @thumb Video thumb, if available @duration Duration of the video in seconds @length Video width and height, should be positive and not greater than 640
inputMessageVideoNote video_note:InputFile thumb:inputThumb duration:int length:int = InputMessageContent;
//@description Voice message @voice Voice file to send @duration Duration of the voice in seconds @waveform Waveform representation of the voice in 5-bit format @caption Voice caption, 0-200 characters
inputMessageVoice voice:InputFile duration:int waveform:bytes caption:string = InputMessageContent;
//@description Message with location @location Location to send
inputMessageLocation location:location = InputMessageContent;
//@description Message with information about venue @venue Venue to send
inputMessageVenue venue:venue = InputMessageContent;
//@description User contact message @contact Contact to send
inputMessageContact contact:contact = InputMessageContent;
//@description Message with a game, can't be used in broadcast channels and secret chats @bot_user_id User identifier of a bot owned the game @game_short_name Game short name
inputMessageGame bot_user_id:int game_short_name:string = InputMessageContent;
//@description Message with an invoice, can be used only by bots and in private chats only @invoice The invoice @title Product title, 1-32 characters @param_description Product description, 0-255 characters @photo_url Goods photo URL, optional @photo_size Goods photo size @photo_width Goods photo width @photo_height Goods photo height
//@payload Invoice payload @provider_token Payments provider token @start_parameter Unique invoice bot start_parameter for generation of this invoice
inputMessageInvoice invoice:invoice title:string description:string photo_url:string photo_size:int photo_width:int photo_height:int payload:bytes provider_token:string start_parameter:string = InputMessageContent;
//@description Forwarded message @from_chat_id Chat identifier of the message to forward @message_id Identifier of the message to forward @in_game_share Pass true to share a game message within a launched game, for Game messages only
inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool = InputMessageContent;
//@class SearchMessagesFilter @description Represents filter for content of searched messages
//@description Return all found messages
searchMessagesFilterEmpty = SearchMessagesFilter;
//@description Return only animation messages
searchMessagesFilterAnimation = SearchMessagesFilter;
//@description Return only audio messages
searchMessagesFilterAudio = SearchMessagesFilter;
//@description Return only document messages
searchMessagesFilterDocument = SearchMessagesFilter;
//@description Return only photo messages
searchMessagesFilterPhoto = SearchMessagesFilter;
//@description Return only video messages
searchMessagesFilterVideo = SearchMessagesFilter;
//@description Return only voice messages
searchMessagesFilterVoice = SearchMessagesFilter;
//@description Return only photo and video messages
searchMessagesFilterPhotoAndVideo = SearchMessagesFilter;
//@description Return only messages containing url
searchMessagesFilterUrl = SearchMessagesFilter;
//@description Return only messages containing chat photos
searchMessagesFilterChatPhoto = SearchMessagesFilter;
//@description Return only call messages
searchMessagesFilterCall = SearchMessagesFilter;
//@description Return only incoming call messages with missed/declined discard reason
searchMessagesFilterMissedCall = SearchMessagesFilter;
//@description Return only video note messages
searchMessagesFilterVideoNote = SearchMessagesFilter;
//@description Return only voice and video note messages
searchMessagesFilterVoiceAndVideoNote = SearchMessagesFilter;
//@description Return only messages with mentions of current logged in user or which are replies to his messages
searchMessagesFilterMention = SearchMessagesFilter;
//@description Return only messages with unread mentions of current logged in user or which are replies to his messages. When this filter is used result can't be additionally filtered by a query or a sender user
searchMessagesFilterUnreadMention = SearchMessagesFilter;
//@class ChatAction @description Describes different types of activity in a chat
//@description User typing a message
chatActionTyping = ChatAction;
//@description User records a video
chatActionRecordingVideo = ChatAction;
//@description User uploads a video @progress Upload progress in percents
chatActionUploadingVideo progress:int = ChatAction;
//@description User records voice message
chatActionRecordingVoice = ChatAction;
//@description User uploads voice message @progress Upload progress in percents
chatActionUploadingVoice progress:int = ChatAction;
//@description User uploads a photo @progress Upload progress in percents
chatActionUploadingPhoto progress:int = ChatAction;
//@description User uploads a document @progress Upload progress in percents
chatActionUploadingDocument progress:int = ChatAction;
//@description User chooses location or venue to send
chatActionChoosingLocation = ChatAction;
//@description User chooses contact to send
chatActionChoosingContact = ChatAction;
//@description User starts to play a game
chatActionStartPlayingGame = ChatAction;
//@description User records video note
chatActionRecordingVideoNote = ChatAction;
//@description User uploads a video note @progress Upload progress in percents
chatActionUploadingVideoNote progress:int = ChatAction;
//@description User cancels previous action
chatActionCancel = ChatAction;
//@class UserStatus @description Describes last time user was online
//@description User status was newer changed
userStatusEmpty = UserStatus;
//@description User is online @expires Unix time when user's online status will expire
userStatusOnline expires:int = UserStatus;
//@description User is offline @was_online Unix time user was online last time
userStatusOffline was_online:int = UserStatus;
//@description User was online recently
userStatusRecently = UserStatus;
//@description User is offline, but was online last week
userStatusLastWeek = UserStatus;
//@description User is offline, but was online last month
userStatusLastMonth = UserStatus;