-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.gs
8053 lines (7899 loc) · 221 KB
/
types.gs
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
class Type {
constructor() { }
// Getting updates
/**
* @method Update
* @param {Object} params - An object containing the parameters for the update
* @param {Number} params.update_id - The update ID
* @param {Object} params.message - The message object
* @param {Object} params.edited_message - The edited message object
* @param {Object} params.channel_post - The channel post object
* @param {Object} params.edited_channel_post - The edited channel post object
* @param {Object} params.inline_query - The inline query object
* @param {Object} params.chosen_inline_result - The chosen inline result object
* @param {Object} params.callback_query - The callback query object
* @param {Object} params.shipping_query - The shipping query object
* @param {Object} params.pre_checkout_query - The pre checkout query object
* @param {Object} params.poll - The poll object
* @param {Object} params.poll_answer - The poll answer object
* @param {Object} params.my_chat_member - The my chat member object
* @param {Object} params.chat_member - The chat member object
* @param {Object} params.chat_join_request - The chat join request object
* @returns {Update} A new Update object
*/
Update(params = {
update_id,
message,
edited_message,
channel_post,
edited_channel_post,
inline_query,
chosen_inline_result,
callback_query,
shipping_query,
pre_checkout_query,
poll,
poll_answer,
my_chat_member,
chat_member,
chat_join_request
}) {
class Update {
constructor({
update_id,
message,
edited_message,
channel_post,
edited_channel_post,
inline_query,
chosen_inline_result,
callback_query,
shipping_query,
pre_checkout_query,
poll,
poll_answer,
my_chat_member,
chat_member,
chat_join_request
}) {
this.update_id = update_id;
this.message = message;
this.edited_message = edited_message;
this.channel_post = channel_post;
this.edited_channel_post = edited_channel_post;
this.inline_query = inline_query;
this.chosen_inline_result = chosen_inline_result;
this.callback_query = callback_query;
this.shipping_query = shipping_query;
this.pre_checkout_query = pre_checkout_query;
this.poll = poll;
this.poll_answer = poll_answer;
this.my_chat_member = my_chat_member;
this.chat_member = chat_member;
this.chat_join_request = chat_join_request;
}
get update_id() {
return this._update_id;
}
get message() {
return new Type().Message(this._message);
}
get edited_message() {
return new Type().Message(this._edited_message);
}
get channel_post() {
return new Type().Message(this._channel_post);
}
get edited_channel_post() {
return new Type().Message(this._edited_channel_post);
}
get inline_query() {
return new Type().InlineQuery(this._inline_query);
}
get chosen_inline_result() {
return new Type().ChosenInlineResult(this._chosen_inline_result);
}
get callback_query() {
return new Type().CallbackQuery(this._callback_query);
}
get shipping_query() {
return new Type().ShippingQuery(this._shipping_query);
}
get pre_checkout_query() {
return new Type().PreCheckoutQuery(this._pre_checkout_query);
}
get poll() {
return new Type().Poll(this._poll);
}
get poll_answer() {
return new Type().PollAnswer(this._poll_answer);
}
get my_chat_member() {
return new Type().ChatMemberUpdated(this._my_chat_member);
}
get chat_member() {
return new Type().ChatMemberUpdated(this._chat_member);
}
get chat_join_request() {
return new Type().ChatJoinRequest(this._chat_join_request);
}
}
return new Update(params);
}
/**
* @method WebhookInfo
* @param {Object} params - An object containing the parameters for the webhook info
* @param {String} params.url - The URL of the webhook
* @param {Boolean} params.has_custom_certificate - Whether the webhook has a custom certificate
* @param {Number} params.pending_update_count - The number of pending updates
* @param {String} params.ip_address - The IP address of the webhook
* @param {Date} params.last_error_date - The date of the last error
* @param {String} params.last_error_message - The message of the last error
* @param {Date} params.last_synchronization_error_date - The date of the last synchronization error
* @param {Number} params.max_connections - The maximum number of connections
* @param {Array} params.allowed_updates - An array of allowed updates
* @returns {WebhookInfo} A new WebhookInfo object
*/
WebhookInfo(params = {
url,
has_custom_certificate,
pending_update_count,
ip_address,
last_error_date,
last_error_message,
last_synchronization_error_date,
max_connections,
allowed_updates
}) {
class WebhookInfo {
constructor({
url,
has_custom_certificate,
pending_update_count,
ip_address,
last_error_date,
last_error_message,
last_synchronization_error_date,
max_connections,
allowed_updates
}) {
this.url = url;
this.has_custom_certificate = has_custom_certificate;
this.pending_update_count = pending_update_count;
this.ip_address = ip_address;
this.last_error_date = last_error_date;
this.last_error_message = last_error_message;
this.last_synchronization_error_date = last_synchronization_error_date;
this.max_connections = max_connections;
this.allowed_updates = allowed_updates;
}
get url() {
return this._url;
}
get has_custom_certificate() {
return this._has_custom_certificate;
}
get pending_update_count() {
return this._pending_update_count;
}
get ip_address() {
return this._ip_address;
}
get last_error_date() {
return this._last_error_date;
}
get last_error_message() {
return this._last_error_message;
}
get last_synchronization_error_date() {
return this._last_synchronization_error_date;
}
get max_connections() {
return this._max_connections;
}
get allowed_updates() {
return this._allowed_updates;
}
}
return new WebhookInfo(params);
}
// Available types
/**
* @method User
* @param {Object} params - An object containing the user's data
* @param {Number} params.id - The user's ID
* @param {Boolean} params.is_bot - Whether the user is a bot
* @param {String} params.first_name - The user's first name
* @param {String} params.last_name - The user's last name
* @param {String} params.username - The user's username
* @param {String} params.language_code - The user's language code
* @param {Boolean} params.is_premium - Whether the user is a premium user
* @param {Boolean} params.added_to_attachment_menu - Whether the user has been added to the attachment menu
* @param {Boolean} params.can_join_groups - Whether the user can join groups
* @param {Boolean} params.can_read_all_group_messages - Whether the user can read all group messages
* @param {Boolean} params.supports_inline_queries - Whether the user supports inline queries
* @returns {User} A new User object
*/
User(params = {
id,
is_bot,
first_name,
last_name,
username,
language_code,
is_premium,
added_to_attachment_menu,
can_join_groups,
can_read_all_group_messages,
supports_inline_queries
}) {
class User {
constructor({
id,
is_bot,
first_name,
last_name,
username,
language_code,
is_premium,
added_to_attachment_menu,
can_join_groups,
can_read_all_group_messages,
supports_inline_queries
}) {
this.id = id;
this.is_bot = is_bot;
this.first_name = first_name;
this.last_name = last_name;
this.username = username;
this.language_code = language_code;
this.is_premium = is_premium;
this.added_to_attachment_menu = added_to_attachment_menu;
this.can_join_groups = can_join_groups;
this.can_read_all_group_messages = can_read_all_group_messages;
this.supports_inline_queries = supports_inline_queries;
}
get id() {
return this._id;
}
get is_bot() {
return this._is_bot;
}
get first_name() {
return this._first_name;
}
get last_name() {
return this._last_name;
}
get username() {
return this._username;
}
get language_code() {
return this._language_code;
}
get is_premium() {
return this._is_premium;
}
get added_to_attachment_menu() {
return this._added_to_attachment_menu;
}
get can_join_groups() {
return this._can_join_groups;
}
get can_read_all_group_messages() {
return this._can_read_all_group_messages;
}
get supports_inline_queries() {
return this._supports_inline_queries;
}
}
return new User(params);
}
/**
* @method Chat
* @param {Object} params - An object containing the parameters for the chat.
* @param {Number} params.id - The chat's unique identifier.
* @param {String} params.type - The type of chat.
* @param {String} params.title - The chat's title.
* @param {String} params.username - The chat's username.
* @param {String} params.first_name - The chat's first name.
* @param {String} params.last_name - The chat's last name.
* @param {Boolean} params.is_forum - Whether the chat is a forum.
* @param {Object} params.photo - The chat's photo.
* @param {Array} params.active_usernames - The chat's active usernames.
* @param {String} params.emoji_status_custom_emoji_id - The chat's emoji status custom emoji id.
* @param {String} params.bio - The chat's bio.
* @param {Boolean} params.has_private_forwards - Whether the chat has private forwards.
* @param {Boolean} params.has_restricted_voice_and_video_messages - Whether the chat has restricted voice and video messages.
* @param {Boolean} params.join_to_send_messages - Whether the chat requires users to join in order to send messages.
* @param {Boolean} params.join_by_request - Whether the chat requires users to join by request.
* @param {String} params.description - The chat's description.
* @param {String} params.invite_link - The chat's invite link.
* @param {Object} params.pinned_message - The chat's pinned message.
* @param {Object} params.permissions - The chat's permissions.
* @param {Number} params.slow_mode_delay - The chat's slow mode delay.
* @param {Number} params.message_auto_delete_time - The chat's message auto delete time.
* @param {Boolean} params.has_aggressive_anti_spam_enabled - Whether the chat has aggressive anti-spam enabled.
* @param {Boolean} params.has_hidden_members - Whether the chat has hidden members.
* @param {Boolean} params.has_protected_content - Whether the chat has protected content.
* @param {String} params.sticker_set_name - The chat's sticker set name.
* @param {Boolean} params.can_set_sticker_set - Whether the chat can set a sticker set.
* @param {Number} params.linked_chat_id - The chat's linked chat id.
* @param {Object} params.location - The chat's location.
* @returns {Object} A new chat object.
*/
Chat(params = {
id,
type,
title,
username,
first_name,
last_name,
is_forum,
photo,
active_usernames,
emoji_status_custom_emoji_id,
bio,
has_private_forwards,
has_restricted_voice_and_video_messages,
join_to_send_messages,
join_by_request,
description,
invite_link,
pinned_message,
permissions,
slow_mode_delay,
message_auto_delete_time,
has_aggressive_anti_spam_enabled,
has_hidden_members,
has_protected_content,
sticker_set_name,
can_set_sticker_set,
linked_chat_id,
location
}) {
class Chat {
constructor({
id,
type,
title,
username,
first_name,
last_name,
is_forum,
photo,
active_usernames,
emoji_status_custom_emoji_id,
bio,
has_private_forwards,
has_restricted_voice_and_video_messages,
join_to_send_messages,
join_by_request,
description,
invite_link,
pinned_message,
permissions,
slow_mode_delay,
message_auto_delete_time,
has_aggressive_anti_spam_enabled,
has_hidden_members,
has_protected_content,
sticker_set_name,
can_set_sticker_set,
linked_chat_id,
location
}) {
this.id = id;
this.type = type;
this.title = title;
this.username = username;
this.first_name = first_name;
this.last_name = last_name;
this.is_forum = is_forum;
this.photo = photo;
this.active_usernames = active_usernames;
this.emoji_status_custom_emoji_id = emoji_status_custom_emoji_id;
this.bio = bio;
this.has_private_forwards = has_private_forwards;
this.has_restricted_voice_and_video_messages = has_restricted_voice_and_video_messages;
this.join_to_send_messages = join_to_send_messages;
this.join_by_request = join_by_request;
this.description = description;
this.invite_link = invite_link;
this.pinned_message = pinned_message;
this.permissions = permissions;
this.slow_mode_delay = slow_mode_delay;
this.message_auto_delete_time = message_auto_delete_time;
this.has_aggressive_anti_spam_enabled = has_aggressive_anti_spam_enabled;
this.has_hidden_members = has_hidden_members;
this.has_protected_content = has_protected_content;
this.sticker_set_name = sticker_set_name;
this.can_set_sticker_set = can_set_sticker_set;
this.linked_chat_id = linked_chat_id;
this.location = location;
}
get id() {
return this._id;
}
get type() {
return this._type;
}
get title() {
return this._title;
}
get username() {
return this._username;
}
get first_name() {
return this._first_name;
}
get last_name() {
return this._last_name;
}
get is_forum() {
return this._is_forum;
}
get photo() {
return new Type().ChatPhoto(this._photo);
}
get active_usernames() {
return this._active_usernames;
}
get bio() {
return this._bio;
}
get has_private_forwards() {
return this._has_private_forwards;
}
get has_restricted_voice_and_video_messages() {
return this._has_restricted_voice_and_video_messages;
}
get join_to_send_messages() {
return this._join_to_send_messages;
}
get join_by_request() {
return this._join_by_request;
}
get description() {
return this._description;
}
get invite_link() {
return this._invite_link;
}
get pinned_message() {
return new Type().Message(this._pinned_message);
}
get permissions() {
return new Type().ChatPermissions(this._permissions);
}
get slow_mode_delay() {
return this._slow_mode_delay;
}
get message_auto_delete_time() {
return this._message_auto_delete_time;
}
get has_aggressive_anti_spam_enabled() {
return this._has_aggressive_anti_spam_enabled;
}
get has_hidden_members() {
return this._has_hidden_members;
}
get has_protected_content() {
return this._has_protected_content;
}
get sticker_set_name() {
return this._sticker_set_name;
}
get can_set_sticker_set() {
return this._can_set_sticker_set;
}
get linked_chat_id() {
return this._linked_chat_id;
}
get location() {
return new Type().ChatLocation(this._location);
}
}
return new Chat(params);
}
Message(params = {
message_id,
message_thread_id,
from,
sender_chat,
date,
chat,
forward_from,
forward_from_chat,
forward_from_message_id,
forward_signature,
forward_sender_name,
forward_date,
is_topic_message,
is_automatic_forward,
reply_to_message,
via_bot,
edit_date,
has_protected_content,
media_group_id,
author_signature,
text,
entities,
animation,
audio,
document,
photo,
sticker,
video,
video_note,
voice,
caption,
caption_entities,
has_media_spoiler,
contact,
dice,
game,
poll,
venue,
location,
new_chat_members,
left_chat_member,
new_chat_title,
new_chat_photo,
delete_chat_photo,
group_chat_created,
supergroup_chat_created,
channel_chat_created,
message_auto_delete_timer_changed,
migrate_to_chat_id,
migrate_from_chat_id,
pinned_message,
invoice,
successful_payment,
user_shared,
chat_shared,
connected_website,
write_access_allowed,
passport_data,
proximity_alert_triggered,
forum_topic_created,
forum_topic_edited,
forum_topic_closed,
forum_topic_reopened,
general_forum_topic_hidden,
general_forum_topic_unhidden,
video_chat_scheduled,
video_chat_started,
video_chat_ended,
video_chat_participants_invited,
web_app_data,
reply_markup
}) {
class Message {
constructor({
message_id,
message_thread_id,
from,
sender_chat,
date,
chat,
forward_from,
forward_from_chat,
forward_from_message_id,
forward_signature,
forward_sender_name,
forward_date,
is_topic_message,
is_automatic_forward,
reply_to_message,
via_bot,
edit_date,
has_protected_content,
media_group_id,
author_signature,
text,
entities,
animation,
audio,
document,
photo,
sticker,
video,
video_note,
voice,
caption,
caption_entities,
has_media_spoiler,
contact,
dice,
game,
poll,
venue,
location,
new_chat_members,
left_chat_member,
new_chat_title,
new_chat_photo,
delete_chat_photo,
group_chat_created,
supergroup_chat_created,
channel_chat_created,
message_auto_delete_timer_changed,
migrate_to_chat_id,
migrate_from_chat_id,
pinned_message,
invoice,
successful_payment,
user_shared,
chat_shared,
connected_website,
write_access_allowed,
passport_data,
proximity_alert_triggered,
forum_topic_created,
forum_topic_edited,
forum_topic_closed,
forum_topic_reopened,
general_forum_topic_hidden,
general_forum_topic_unhidden,
video_chat_scheduled,
video_chat_started,
video_chat_ended,
video_chat_participants_invited,
web_app_data,
reply_markup
}) {
this.message_id = message_id;
this.message_thread_id = message_thread_id;
this.from = from;
this.sender_chat = sender_chat;
this.date = date;
this.chat = chat;
this.forward_from = forward_from;
this.forward_from_chat = forward_from_chat;
this.forward_from_message_id = forward_from_message_id;
this.forward_signature = forward_signature;
this.forward_sender_name = forward_sender_name;
this.forward_date = forward_date;
this.is_topic_message = is_topic_message;
this.is_automatic_forward = is_automatic_forward;
this.reply_to_message = reply_to_message;
this.via_bot = via_bot;
this.edit_date = edit_date;
this.has_protected_content = has_protected_content;
this.media_group_id = media_group_id;
this.author_signature = author_signature;
this.text = text;
this.entities = entities;
this.animation = animation;
this.audio = audio;
this.document = document;
this.photo = photo;
this.sticker = sticker;
this.video = video;
this.video_note = video_note;
this.voice = voice;
this.caption = caption;
this.caption_entities = caption_entities;
this.has_media_spoiler = has_media_spoiler;
this.contact = contact;
this.dice = dice;
this.game = game;
this.poll = poll;
this.venue = venue;
this.location = location;
this.new_chat_members = new_chat_members;
this.left_chat_member = left_chat_member;
this.new_chat_title = new_chat_title;
this.new_chat_photo = new_chat_photo;
this.delete_chat_photo = delete_chat_photo;
this.group_chat_created = group_chat_created;
this.supergroup_chat_created = supergroup_chat_created;
this.channel_chat_created = channel_chat_created;
this.message_auto_delete_timer_changed = message_auto_delete_timer_changed;
this.migrate_to_chat_id = migrate_to_chat_id;
this.migrate_from_chat_id = migrate_from_chat_id;
this.pinned_message = pinned_message;
this.invoice = invoice;
this.successful_payment = successful_payment;
this.user_shared = user_shared;
this.chat_shared = chat_shared;
this.connected_website = connected_website;
this.write_access_allowed = write_access_allowed;
this.passport_data = passport_data;
this.proximity_alert_triggered = proximity_alert_triggered;
this.forum_topic_created = forum_topic_created;
this.forum_topic_edited = forum_topic_edited;
this.forum_topic_closed = forum_topic_closed;
this.forum_topic_reopened = forum_topic_reopened;
this.general_forum_topic_hidden = general_forum_topic_hidden;
this.general_forum_topic_unhidden = general_forum_topic_unhidden;
this.video_chat_scheduled = video_chat_scheduled;
this.video_chat_started = video_chat_started;
this.video_chat_ended = video_chat_ended;
this.video_chat_participants_invited = video_chat_participants_invited;
this.web_app_data = web_app_data;
this.reply_markup = reply_markup
}
get message_id() {
return this._message_id;
}
get message_thread_id() {
return this._message_thread_id;
}
get from() {
return new Type().User(this._from);
}
get sender_chat() {
return new Type().Chat(this._sender_chat);
}
get date() {
return this._date;
}
get chat() {
return new Type().Chat(this._chat);
}
get forward_from() {
return new Type().User(this._forward_from);
}
get forward_from_chat() {
return new Type().Chat(this._forward_from_chat);
}
get forward_from_message_id() {
return this._forward_from_message_id;
}
get forward_signature() {
return this._forward_signature;
}
get forward_sender_name() {
return this._forward_sender_name;
}
get forward_date() {
return this._forward_date;
}
get is_topic_message() {
return this._is_topic_message;
}
get is_automatic_forward() {
return this._is_automatic_forward;
}
get reply_to_message() {
return new Type().Message(this._reply_to_message);
}
get via_bot() {
return new Type().User(this._via_bot);
}
get edit_date() {
return this._edit_date;
}
get has_protected_content() {
return this._has_protected_content;
}
get media_group_id() {
return this._media_group_id;
}
get author_signature() {
return this._author_signature;
}
get text() {
return this._text;
}
get entities() {
return this._entities.map(element => {
return new Type().MessageEntity(element)
});
}
get animation() {
return new Type().Animation(this._animation);
}
get audio() {
return new Type().Audio(this._audio);
}
get document() {
return new Type().Document(this._document);
}
get photo() {
return this._photo.map(element => {
return new Type().PhotoSize(element)
});
}
get sticker() {
return new Type().Sticker(this._sticker);
}
get video() {
return new Type().Video(this._video);
}
get video_note() {
return new Type().VideoNote(this._video_note);
}
get voice() {
return new Type().Voice(this._voice);
}
get caption() {
return this._caption;
}
get caption_entities() {
return this._caption_entities.map(element => {
return new Type().MessageEntity(element);
});
}
get has_media_spoiler() {
return this._has_media_spoiler;
}
get contact() {
return new Type().Contact(this._contact);
}
get dice() {
return new Type().Dice(this._dice);
}
get game() {
return new Type().Game(this._game);
}
get poll() {
return new Type().Poll(this._poll);
}
get venue() {
return new Type().Venue(this._venue);
}
get location() {
return new Type().Location(this._location);
}
get new_chat_members() {
return this._new_chat_members.map(element => {
return new Type().User(element)
});
}
get left_chat_member() {
return new Type().User(this._left_chat_member);
}
get new_chat_title() {
return this._new_chat_title;
}
get new_chat_photo() {
return this._new_chat_photo;
}
get delete_chat_photo() {
return this._delete_chat_photo;
}
get group_chat_created() {
return this._group_chat_created;
}
get supergroup_chat_created() {
return this._supergroup_chat_created;
}
get channel_chat_created() {
return this._channel_chat_created;
}
get message_auto_delete_timer_changed() {
return new Type().MessageAutoDeleteTimerChanged(this._message_auto_delete_timer_changed);
}
get migrate_to_chat_id() {
return this._migrate_to_chat_id;
}
get migrate_from_chat_id() {
return this._migrate_from_chat_id;
}
get pinned_message() {
return new Type().Message(this._pinned_message);
}
get invoice() {
return new Type().Invoice(this._invoice);
}
get successful_payment() {
return new Type().SuccessfulPayment(this._successful_payment);
}
get user_shared() {
return new Type().UserShared(this._user_shared);
}
get chat_shared() {
return new Type().ChatShared(this._chat_shared);
}
get connected_website() {
return this._connected_website;
}
get write_access_allowed() {
return new Type().WriteAccessAllowed(this._write_access_allowed);
}
get passport_data() {
return new Type().PassportData(this._passport_data);
}
get proximity_alert_triggered() {
return new Type().ProximityAlertTriggered(this._proximity_alert_triggered);
}
get forum_topic_created() {
return new Type().ForumTopicCreated(this._forum_topic_created);
}
get forum_topic_edited() {
return new Type().ForumTopicEdited(this._forum_topic_edited);
}
get forum_topic_closed() {
return new Type().ForumTopicClosed(this._forum_topic_closed);
}
get forum_topic_reopened() {
return new Type().ForumTopicReopened(this._forum_topic_reopened);
}
get general_forum_topic_hidden() {
return new Type().GeneralForumTopicHidden(this._general_forum_topic_hidden);
}
get general_forum_topic_unhidden() {
return new Type().GeneralForumTopicUnhidden(this._general_forum_topic_unhidden);
}
get video_chat_scheduled() {
return new Type().VideoChatScheduled(this._video_chat_scheduled);
}
get video_chat_started() {
return new Type().VideoChatStarted(this._video_chat_started);
}
get video_chat_ended() {
return new Type().VideoChatEnded(this._video_chat_ended);
}
get video_chat_participants_invited() {
return new Type().VideoChatParticipantsInvited(this._video_chat_participants_invited);
}
get web_app_data() {
return new Type().WebAppData(this._web_app_data);
}
get reply_markup() {
return new Type().InlineKeyboardMarkup(this._reply_markup);
}
set message_id(message_id) {
this.message_id = message_id;
}
set message_thread_id(message_thread_id) {
this.message_thread_id = message_thread_id;
}
set from(from) {
this.from = from;
}
set sender_chat(sender_chat) {
this.sender_chat = sender_chat;
}
set date(date) {
this.date = date;
}
set chat(chat) {
this.chat = chat;
}
set forward_from(forward_from) {
this.forward_from = forward_from;
}
set forward_from_chat(forward_from_chat) {
this.forward_from_chat = forward_from_chat;
}
set forward_from_message_id(forward_from_message_id) {
this.forward_from_message_id = forward_from_message_id;
}
set forward_signature(forward_signature) {
this.forward_signature = forward_signature;
}
set forward_sender_name(forward_sender_name) {
this.forward_sender_name = forward_sender_name;
}
set forward_date(forward_date) {
this.forward_date = forward_date;
}
set is_topic_message(is_topic_message) {
this.is_topic_message = is_topic_message;
}
set is_automatic_forward(is_automatic_forward) {
this.is_automatic_forward = is_automatic_forward;
}
set reply_to_message(reply_to_message) {
this.reply_to_message = reply_to_message;
}
set via_bot(via_bot) {
this.via_bot = via_bot;
}
set edit_date(edit_date) {
this.edit_date = edit_date;
}
set has_protected_content(has_protected_content) {
this.has_protected_content = has_protected_content;
}
set media_group_id(media_group_id) {