botapi-py 1.5.11__tar.gz → 1.5.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {botapi_py-1.5.11 → botapi_py-1.5.12}/PKG-INFO +1 -1
- {botapi_py-1.5.11 → botapi_py-1.5.12}/pyproject.toml +1 -1
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/methods.py +62 -61
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/types.py +190 -20
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/__init__.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/__init__.pyi +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/bot.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/core.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/dispatchers/__init__.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/dispatchers/__init__.pyi +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/dispatchers/common.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/dispatchers/get_updates_handler.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/dispatchers/redis_pubsub_handler.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/enums.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/errors.py +0 -0
- {botapi_py-1.5.11 → botapi_py-1.5.12}/src/botapi/internals.py +0 -0
|
@@ -26,6 +26,7 @@ from .types import (
|
|
|
26
26
|
TextQuote,
|
|
27
27
|
ExternalReplyInfo,
|
|
28
28
|
ReplyParameters,
|
|
29
|
+
EphemeralMessageParameters,
|
|
29
30
|
MessageOrigin,
|
|
30
31
|
_MessageOrigin,
|
|
31
32
|
MessageOriginAdapter,
|
|
@@ -77,6 +78,7 @@ from .types import (
|
|
|
77
78
|
ManagedBotCreated,
|
|
78
79
|
ManagedBotUpdated,
|
|
79
80
|
BotSubscriptionUpdated,
|
|
81
|
+
MessageGenerationStopped,
|
|
80
82
|
PollOptionAdded,
|
|
81
83
|
PollOptionDeleted,
|
|
82
84
|
ChatBoostAdded,
|
|
@@ -97,6 +99,7 @@ from .types import (
|
|
|
97
99
|
ChecklistTasksDone,
|
|
98
100
|
ChecklistTasksAdded,
|
|
99
101
|
CommunityChatAdded,
|
|
102
|
+
CommunityChatJoined,
|
|
100
103
|
CommunityChatRemoved,
|
|
101
104
|
ForumTopicCreated,
|
|
102
105
|
ForumTopicClosed,
|
|
@@ -144,6 +147,7 @@ from .types import (
|
|
|
144
147
|
LoginUrl,
|
|
145
148
|
SwitchInlineQueryChosenChat,
|
|
146
149
|
CopyTextButton,
|
|
150
|
+
DisabledButton,
|
|
147
151
|
CallbackQuery,
|
|
148
152
|
ForceReply,
|
|
149
153
|
Community,
|
|
@@ -288,6 +292,7 @@ from .types import (
|
|
|
288
292
|
RichMessage,
|
|
289
293
|
InputRichMessage,
|
|
290
294
|
InputRichMessageMedia,
|
|
295
|
+
RichMessageButton,
|
|
291
296
|
RichText,
|
|
292
297
|
_RichText,
|
|
293
298
|
RichTextAdapter,
|
|
@@ -312,6 +317,7 @@ from .types import (
|
|
|
312
317
|
RichTextHashtag,
|
|
313
318
|
RichTextCashtag,
|
|
314
319
|
RichTextBotCommand,
|
|
320
|
+
RichTextButton,
|
|
315
321
|
RichTextAnchor,
|
|
316
322
|
RichTextAnchorLink,
|
|
317
323
|
RichTextReference,
|
|
@@ -331,14 +337,17 @@ from .types import (
|
|
|
331
337
|
RichBlockAnchor,
|
|
332
338
|
RichBlockList,
|
|
333
339
|
RichBlockBlockQuotation,
|
|
340
|
+
RichBlockExpandableBlockQuotation,
|
|
334
341
|
RichBlockPullQuotation,
|
|
335
342
|
RichBlockCollage,
|
|
336
343
|
RichBlockSlideshow,
|
|
337
344
|
RichBlockTable,
|
|
338
345
|
RichBlockDetails,
|
|
339
346
|
RichBlockMap,
|
|
347
|
+
RichBlockButtons,
|
|
340
348
|
RichBlockAnimation,
|
|
341
349
|
RichBlockAudio,
|
|
350
|
+
RichBlockDocument,
|
|
342
351
|
RichBlockPhoto,
|
|
343
352
|
RichBlockVideo,
|
|
344
353
|
RichBlockVoiceNote,
|
|
@@ -356,14 +365,17 @@ from .types import (
|
|
|
356
365
|
InputRichBlockAnchor,
|
|
357
366
|
InputRichBlockList,
|
|
358
367
|
InputRichBlockBlockQuotation,
|
|
368
|
+
InputRichBlockExpandableBlockQuotation,
|
|
359
369
|
InputRichBlockPullQuotation,
|
|
360
370
|
InputRichBlockCollage,
|
|
361
371
|
InputRichBlockSlideshow,
|
|
362
372
|
InputRichBlockTable,
|
|
363
373
|
InputRichBlockDetails,
|
|
364
374
|
InputRichBlockMap,
|
|
375
|
+
InputRichBlockButtons,
|
|
365
376
|
InputRichBlockAnimation,
|
|
366
377
|
InputRichBlockAudio,
|
|
378
|
+
InputRichBlockDocument,
|
|
367
379
|
InputRichBlockPhoto,
|
|
368
380
|
InputRichBlockVideo,
|
|
369
381
|
InputRichBlockVoiceNote,
|
|
@@ -609,8 +621,7 @@ class Methods(core.BaseBot):
|
|
|
609
621
|
business_connection_id: Optional[str] = None,
|
|
610
622
|
message_thread_id: Optional[int] = None,
|
|
611
623
|
direct_messages_topic_id: Optional[int] = None,
|
|
612
|
-
|
|
613
|
-
callback_query_id: Optional[str] = None,
|
|
624
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
614
625
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
615
626
|
entities: Optional[List[MessageEntity]] = None,
|
|
616
627
|
link_preview_options: Optional[LinkPreviewOptions] = None,
|
|
@@ -634,8 +645,7 @@ class Methods(core.BaseBot):
|
|
|
634
645
|
'chat_id': chat_id,
|
|
635
646
|
'message_thread_id': message_thread_id,
|
|
636
647
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
637
|
-
'
|
|
638
|
-
'callback_query_id': callback_query_id,
|
|
648
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
639
649
|
'text': text,
|
|
640
650
|
'parse_mode': parse_mode,
|
|
641
651
|
'entities': entities,
|
|
@@ -823,8 +833,7 @@ class Methods(core.BaseBot):
|
|
|
823
833
|
business_connection_id: Optional[str] = None,
|
|
824
834
|
message_thread_id: Optional[int] = None,
|
|
825
835
|
direct_messages_topic_id: Optional[int] = None,
|
|
826
|
-
|
|
827
|
-
callback_query_id: Optional[str] = None,
|
|
836
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
828
837
|
caption: Optional[str] = None,
|
|
829
838
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
830
839
|
caption_entities: Optional[List[MessageEntity]] = None,
|
|
@@ -850,8 +859,7 @@ class Methods(core.BaseBot):
|
|
|
850
859
|
'chat_id': chat_id,
|
|
851
860
|
'message_thread_id': message_thread_id,
|
|
852
861
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
853
|
-
'
|
|
854
|
-
'callback_query_id': callback_query_id,
|
|
862
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
855
863
|
'photo': photo,
|
|
856
864
|
'caption': caption,
|
|
857
865
|
'parse_mode': parse_mode,
|
|
@@ -876,8 +884,7 @@ class Methods(core.BaseBot):
|
|
|
876
884
|
business_connection_id: Optional[str] = None,
|
|
877
885
|
message_thread_id: Optional[int] = None,
|
|
878
886
|
direct_messages_topic_id: Optional[int] = None,
|
|
879
|
-
|
|
880
|
-
callback_query_id: Optional[str] = None,
|
|
887
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
881
888
|
caption: Optional[str] = None,
|
|
882
889
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
883
890
|
caption_entities: Optional[List[MessageEntity]] = None,
|
|
@@ -903,8 +910,7 @@ class Methods(core.BaseBot):
|
|
|
903
910
|
'chat_id': chat_id,
|
|
904
911
|
'message_thread_id': message_thread_id,
|
|
905
912
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
906
|
-
'
|
|
907
|
-
'callback_query_id': callback_query_id,
|
|
913
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
908
914
|
'live_photo': live_photo,
|
|
909
915
|
'photo': photo,
|
|
910
916
|
'caption': caption,
|
|
@@ -929,8 +935,7 @@ class Methods(core.BaseBot):
|
|
|
929
935
|
business_connection_id: Optional[str] = None,
|
|
930
936
|
message_thread_id: Optional[int] = None,
|
|
931
937
|
direct_messages_topic_id: Optional[int] = None,
|
|
932
|
-
|
|
933
|
-
callback_query_id: Optional[str] = None,
|
|
938
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
934
939
|
caption: Optional[str] = None,
|
|
935
940
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
936
941
|
caption_entities: Optional[List[MessageEntity]] = None,
|
|
@@ -964,8 +969,7 @@ class Methods(core.BaseBot):
|
|
|
964
969
|
'chat_id': chat_id,
|
|
965
970
|
'message_thread_id': message_thread_id,
|
|
966
971
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
967
|
-
'
|
|
968
|
-
'callback_query_id': callback_query_id,
|
|
972
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
969
973
|
'audio': audio,
|
|
970
974
|
'caption': caption,
|
|
971
975
|
'parse_mode': parse_mode,
|
|
@@ -991,8 +995,7 @@ class Methods(core.BaseBot):
|
|
|
991
995
|
business_connection_id: Optional[str] = None,
|
|
992
996
|
message_thread_id: Optional[int] = None,
|
|
993
997
|
direct_messages_topic_id: Optional[int] = None,
|
|
994
|
-
|
|
995
|
-
callback_query_id: Optional[str] = None,
|
|
998
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
996
999
|
thumbnail: Optional[Union[InputFile, str]] = None,
|
|
997
1000
|
caption: Optional[str] = None,
|
|
998
1001
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
@@ -1021,8 +1024,7 @@ class Methods(core.BaseBot):
|
|
|
1021
1024
|
'chat_id': chat_id,
|
|
1022
1025
|
'message_thread_id': message_thread_id,
|
|
1023
1026
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1024
|
-
'
|
|
1025
|
-
'callback_query_id': callback_query_id,
|
|
1027
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1026
1028
|
'document': document,
|
|
1027
1029
|
'thumbnail': thumbnail,
|
|
1028
1030
|
'caption': caption,
|
|
@@ -1046,8 +1048,7 @@ class Methods(core.BaseBot):
|
|
|
1046
1048
|
business_connection_id: Optional[str] = None,
|
|
1047
1049
|
message_thread_id: Optional[int] = None,
|
|
1048
1050
|
direct_messages_topic_id: Optional[int] = None,
|
|
1049
|
-
|
|
1050
|
-
callback_query_id: Optional[str] = None,
|
|
1051
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
1051
1052
|
duration: Optional[int] = None,
|
|
1052
1053
|
width: Optional[int] = None,
|
|
1053
1054
|
height: Optional[int] = None,
|
|
@@ -1084,8 +1085,7 @@ class Methods(core.BaseBot):
|
|
|
1084
1085
|
'chat_id': chat_id,
|
|
1085
1086
|
'message_thread_id': message_thread_id,
|
|
1086
1087
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1087
|
-
'
|
|
1088
|
-
'callback_query_id': callback_query_id,
|
|
1088
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1089
1089
|
'video': video,
|
|
1090
1090
|
'duration': duration,
|
|
1091
1091
|
'width': width,
|
|
@@ -1116,8 +1116,7 @@ class Methods(core.BaseBot):
|
|
|
1116
1116
|
business_connection_id: Optional[str] = None,
|
|
1117
1117
|
message_thread_id: Optional[int] = None,
|
|
1118
1118
|
direct_messages_topic_id: Optional[int] = None,
|
|
1119
|
-
|
|
1120
|
-
callback_query_id: Optional[str] = None,
|
|
1119
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
1121
1120
|
duration: Optional[int] = None,
|
|
1122
1121
|
width: Optional[int] = None,
|
|
1123
1122
|
height: Optional[int] = None,
|
|
@@ -1151,8 +1150,7 @@ class Methods(core.BaseBot):
|
|
|
1151
1150
|
'chat_id': chat_id,
|
|
1152
1151
|
'message_thread_id': message_thread_id,
|
|
1153
1152
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1154
|
-
'
|
|
1155
|
-
'callback_query_id': callback_query_id,
|
|
1153
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1156
1154
|
'animation': animation,
|
|
1157
1155
|
'duration': duration,
|
|
1158
1156
|
'width': width,
|
|
@@ -1180,8 +1178,7 @@ class Methods(core.BaseBot):
|
|
|
1180
1178
|
business_connection_id: Optional[str] = None,
|
|
1181
1179
|
message_thread_id: Optional[int] = None,
|
|
1182
1180
|
direct_messages_topic_id: Optional[int] = None,
|
|
1183
|
-
|
|
1184
|
-
callback_query_id: Optional[str] = None,
|
|
1181
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
1185
1182
|
caption: Optional[str] = None,
|
|
1186
1183
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
1187
1184
|
caption_entities: Optional[List[MessageEntity]] = None,
|
|
@@ -1215,8 +1212,7 @@ class Methods(core.BaseBot):
|
|
|
1215
1212
|
'chat_id': chat_id,
|
|
1216
1213
|
'message_thread_id': message_thread_id,
|
|
1217
1214
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1218
|
-
'
|
|
1219
|
-
'callback_query_id': callback_query_id,
|
|
1215
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1220
1216
|
'voice': voice,
|
|
1221
1217
|
'caption': caption,
|
|
1222
1218
|
'parse_mode': parse_mode,
|
|
@@ -1239,8 +1235,7 @@ class Methods(core.BaseBot):
|
|
|
1239
1235
|
business_connection_id: Optional[str] = None,
|
|
1240
1236
|
message_thread_id: Optional[int] = None,
|
|
1241
1237
|
direct_messages_topic_id: Optional[int] = None,
|
|
1242
|
-
|
|
1243
|
-
callback_query_id: Optional[str] = None,
|
|
1238
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
1244
1239
|
duration: Optional[int] = None,
|
|
1245
1240
|
length: Optional[int] = None,
|
|
1246
1241
|
thumbnail: Optional[Union[InputFile, str]] = None,
|
|
@@ -1253,10 +1248,9 @@ class Methods(core.BaseBot):
|
|
|
1253
1248
|
reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None,
|
|
1254
1249
|
) -> Message:
|
|
1255
1250
|
'''
|
|
1256
|
-
|
|
1257
|
-
MPEG4
|
|
1258
|
-
|
|
1259
|
-
success, the sent Message is returned.
|
|
1251
|
+
Use this method to send a rounded square
|
|
1252
|
+
MPEG4 video of up to 1 minute long.
|
|
1253
|
+
On success, the sent Message is returned.
|
|
1260
1254
|
|
|
1261
1255
|
Reference: https://core.telegram.org/bots/api#sendvideonote
|
|
1262
1256
|
'''
|
|
@@ -1266,8 +1260,7 @@ class Methods(core.BaseBot):
|
|
|
1266
1260
|
'chat_id': chat_id,
|
|
1267
1261
|
'message_thread_id': message_thread_id,
|
|
1268
1262
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1269
|
-
'
|
|
1270
|
-
'callback_query_id': callback_query_id,
|
|
1263
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1271
1264
|
'video_note': video_note,
|
|
1272
1265
|
'duration': duration,
|
|
1273
1266
|
'length': length,
|
|
@@ -1376,8 +1369,7 @@ class Methods(core.BaseBot):
|
|
|
1376
1369
|
business_connection_id: Optional[str] = None,
|
|
1377
1370
|
message_thread_id: Optional[int] = None,
|
|
1378
1371
|
direct_messages_topic_id: Optional[int] = None,
|
|
1379
|
-
|
|
1380
|
-
callback_query_id: Optional[str] = None,
|
|
1372
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
1381
1373
|
horizontal_accuracy: Optional[float] = None,
|
|
1382
1374
|
live_period: Optional[int] = None,
|
|
1383
1375
|
heading: Optional[int] = None,
|
|
@@ -1402,8 +1394,7 @@ class Methods(core.BaseBot):
|
|
|
1402
1394
|
'chat_id': chat_id,
|
|
1403
1395
|
'message_thread_id': message_thread_id,
|
|
1404
1396
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1405
|
-
'
|
|
1406
|
-
'callback_query_id': callback_query_id,
|
|
1397
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1407
1398
|
'latitude': latitude,
|
|
1408
1399
|
'longitude': longitude,
|
|
1409
1400
|
'horizontal_accuracy': horizontal_accuracy,
|
|
@@ -1430,8 +1421,7 @@ class Methods(core.BaseBot):
|
|
|
1430
1421
|
business_connection_id: Optional[str] = None,
|
|
1431
1422
|
message_thread_id: Optional[int] = None,
|
|
1432
1423
|
direct_messages_topic_id: Optional[int] = None,
|
|
1433
|
-
|
|
1434
|
-
callback_query_id: Optional[str] = None,
|
|
1424
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
1435
1425
|
foursquare_id: Optional[str] = None,
|
|
1436
1426
|
foursquare_type: Optional[str] = None,
|
|
1437
1427
|
google_place_id: Optional[str] = None,
|
|
@@ -1456,8 +1446,7 @@ class Methods(core.BaseBot):
|
|
|
1456
1446
|
'chat_id': chat_id,
|
|
1457
1447
|
'message_thread_id': message_thread_id,
|
|
1458
1448
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1459
|
-
'
|
|
1460
|
-
'callback_query_id': callback_query_id,
|
|
1449
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1461
1450
|
'latitude': latitude,
|
|
1462
1451
|
'longitude': longitude,
|
|
1463
1452
|
'title': title,
|
|
@@ -1484,8 +1473,7 @@ class Methods(core.BaseBot):
|
|
|
1484
1473
|
business_connection_id: Optional[str] = None,
|
|
1485
1474
|
message_thread_id: Optional[int] = None,
|
|
1486
1475
|
direct_messages_topic_id: Optional[int] = None,
|
|
1487
|
-
|
|
1488
|
-
callback_query_id: Optional[str] = None,
|
|
1476
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
1489
1477
|
last_name: Optional[str] = None,
|
|
1490
1478
|
vcard: Optional[str] = None,
|
|
1491
1479
|
disable_notification: Optional[bool] = None,
|
|
@@ -1508,8 +1496,7 @@ class Methods(core.BaseBot):
|
|
|
1508
1496
|
'chat_id': chat_id,
|
|
1509
1497
|
'message_thread_id': message_thread_id,
|
|
1510
1498
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
1511
|
-
'
|
|
1512
|
-
'callback_query_id': callback_query_id,
|
|
1499
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
1513
1500
|
'phone_number': phone_number,
|
|
1514
1501
|
'first_name': first_name,
|
|
1515
1502
|
'last_name': last_name,
|
|
@@ -1684,6 +1671,8 @@ class Methods(core.BaseBot):
|
|
|
1684
1671
|
text: Optional[str] = None,
|
|
1685
1672
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
1686
1673
|
entities: Optional[List[MessageEntity]] = None,
|
|
1674
|
+
can_stop: Optional[bool] = None,
|
|
1675
|
+
keep_on_stop: Optional[bool] = None,
|
|
1687
1676
|
) -> bool:
|
|
1688
1677
|
'''
|
|
1689
1678
|
Use this method to stream a partial message
|
|
@@ -1704,6 +1693,8 @@ class Methods(core.BaseBot):
|
|
|
1704
1693
|
'text': text,
|
|
1705
1694
|
'parse_mode': parse_mode,
|
|
1706
1695
|
'entities': entities,
|
|
1696
|
+
'can_stop': can_stop,
|
|
1697
|
+
'keep_on_stop': keep_on_stop,
|
|
1707
1698
|
})
|
|
1708
1699
|
return BoolAdapter.validate_python(response)
|
|
1709
1700
|
|
|
@@ -1957,6 +1948,7 @@ class Methods(core.BaseBot):
|
|
|
1957
1948
|
can_manage_topics: Optional[bool] = None,
|
|
1958
1949
|
can_manage_direct_messages: Optional[bool] = None,
|
|
1959
1950
|
can_manage_tags: Optional[bool] = None,
|
|
1951
|
+
can_send_welcome_messages: Optional[bool] = None,
|
|
1960
1952
|
) -> bool:
|
|
1961
1953
|
'''
|
|
1962
1954
|
Use this method to promote or demote a
|
|
@@ -1990,6 +1982,7 @@ class Methods(core.BaseBot):
|
|
|
1990
1982
|
'can_manage_topics': can_manage_topics,
|
|
1991
1983
|
'can_manage_direct_messages': can_manage_direct_messages,
|
|
1992
1984
|
'can_manage_tags': can_manage_tags,
|
|
1985
|
+
'can_send_welcome_messages': can_send_welcome_messages,
|
|
1993
1986
|
})
|
|
1994
1987
|
return BoolAdapter.validate_python(response)
|
|
1995
1988
|
|
|
@@ -4345,18 +4338,19 @@ class Methods(core.BaseBot):
|
|
|
4345
4338
|
chat_id: Union[int, str],
|
|
4346
4339
|
receiver_user_id: int,
|
|
4347
4340
|
ephemeral_message_id: int,
|
|
4348
|
-
text: str,
|
|
4341
|
+
text: Optional[str] = None,
|
|
4349
4342
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
4350
4343
|
entities: Optional[List[MessageEntity]] = None,
|
|
4344
|
+
rich_message: Optional[InputRichMessage] = None,
|
|
4351
4345
|
link_preview_options: Optional[LinkPreviewOptions] = None,
|
|
4352
4346
|
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
|
4353
4347
|
) -> bool:
|
|
4354
4348
|
'''
|
|
4355
4349
|
Use this method to edit an ephemeral text
|
|
4356
|
-
message. Note that it is not
|
|
4357
|
-
the user will receive the message
|
|
4358
|
-
especially if they are offline. On
|
|
4359
|
-
is returned.
|
|
4350
|
+
or rich message. Note that it is not
|
|
4351
|
+
guaranteed that the user will receive the message
|
|
4352
|
+
edit event, especially if they are offline. On
|
|
4353
|
+
success, True is returned.
|
|
4360
4354
|
|
|
4361
4355
|
Reference: https://core.telegram.org/bots/api#editephemeralmessagetext
|
|
4362
4356
|
'''
|
|
@@ -4368,6 +4362,7 @@ class Methods(core.BaseBot):
|
|
|
4368
4362
|
'text': text,
|
|
4369
4363
|
'parse_mode': parse_mode,
|
|
4370
4364
|
'entities': entities,
|
|
4365
|
+
'rich_message': rich_message,
|
|
4371
4366
|
'link_preview_options': link_preview_options,
|
|
4372
4367
|
'reply_markup': reply_markup,
|
|
4373
4368
|
})
|
|
@@ -4408,6 +4403,7 @@ class Methods(core.BaseBot):
|
|
|
4408
4403
|
caption: Optional[str] = None,
|
|
4409
4404
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
4410
4405
|
caption_entities: Optional[List[MessageEntity]] = None,
|
|
4406
|
+
show_caption_above_media: Optional[bool] = None,
|
|
4411
4407
|
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
|
4412
4408
|
) -> bool:
|
|
4413
4409
|
'''
|
|
@@ -4427,6 +4423,7 @@ class Methods(core.BaseBot):
|
|
|
4427
4423
|
'caption': caption,
|
|
4428
4424
|
'parse_mode': parse_mode,
|
|
4429
4425
|
'caption_entities': caption_entities,
|
|
4426
|
+
'show_caption_above_media': show_caption_above_media,
|
|
4430
4427
|
'reply_markup': reply_markup,
|
|
4431
4428
|
})
|
|
4432
4429
|
return BoolAdapter.validate_python(response)
|
|
@@ -4630,8 +4627,7 @@ class Methods(core.BaseBot):
|
|
|
4630
4627
|
business_connection_id: Optional[str] = None,
|
|
4631
4628
|
message_thread_id: Optional[int] = None,
|
|
4632
4629
|
direct_messages_topic_id: Optional[int] = None,
|
|
4633
|
-
|
|
4634
|
-
callback_query_id: Optional[str] = None,
|
|
4630
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
4635
4631
|
emoji: Optional[str] = None,
|
|
4636
4632
|
disable_notification: Optional[bool] = None,
|
|
4637
4633
|
protect_content: Optional[bool] = None,
|
|
@@ -4654,8 +4650,7 @@ class Methods(core.BaseBot):
|
|
|
4654
4650
|
'chat_id': chat_id,
|
|
4655
4651
|
'message_thread_id': message_thread_id,
|
|
4656
4652
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
4657
|
-
'
|
|
4658
|
-
'callback_query_id': callback_query_id,
|
|
4653
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
4659
4654
|
'sticker': sticker,
|
|
4660
4655
|
'emoji': emoji,
|
|
4661
4656
|
'disable_notification': disable_notification,
|
|
@@ -4982,6 +4977,7 @@ class Methods(core.BaseBot):
|
|
|
4982
4977
|
business_connection_id: Optional[str] = None,
|
|
4983
4978
|
message_thread_id: Optional[int] = None,
|
|
4984
4979
|
direct_messages_topic_id: Optional[int] = None,
|
|
4980
|
+
ephemeral_message_parameters: Optional[EphemeralMessageParameters] = None,
|
|
4985
4981
|
disable_notification: Optional[bool] = None,
|
|
4986
4982
|
protect_content: Optional[bool] = None,
|
|
4987
4983
|
allow_paid_broadcast: Optional[bool] = None,
|
|
@@ -5005,6 +5001,7 @@ class Methods(core.BaseBot):
|
|
|
5005
5001
|
'chat_id': chat_id,
|
|
5006
5002
|
'message_thread_id': message_thread_id,
|
|
5007
5003
|
'direct_messages_topic_id': direct_messages_topic_id,
|
|
5004
|
+
'ephemeral_message_parameters': ephemeral_message_parameters,
|
|
5008
5005
|
'rich_message': rich_message,
|
|
5009
5006
|
'disable_notification': disable_notification,
|
|
5010
5007
|
'protect_content': protect_content,
|
|
@@ -5022,6 +5019,8 @@ class Methods(core.BaseBot):
|
|
|
5022
5019
|
draft_id: int,
|
|
5023
5020
|
rich_message: InputRichMessage,
|
|
5024
5021
|
message_thread_id: Optional[int] = None,
|
|
5022
|
+
can_stop: Optional[bool] = None,
|
|
5023
|
+
keep_on_stop: Optional[bool] = None,
|
|
5025
5024
|
) -> bool:
|
|
5026
5025
|
'''
|
|
5027
5026
|
Use this method to stream a partial rich
|
|
@@ -5041,6 +5040,8 @@ class Methods(core.BaseBot):
|
|
|
5041
5040
|
'message_thread_id': message_thread_id,
|
|
5042
5041
|
'draft_id': draft_id,
|
|
5043
5042
|
'rich_message': rich_message,
|
|
5043
|
+
'can_stop': can_stop,
|
|
5044
|
+
'keep_on_stop': keep_on_stop,
|
|
5044
5045
|
})
|
|
5045
5046
|
return BoolAdapter.validate_python(response)
|
|
5046
5047
|
|
|
@@ -119,6 +119,7 @@ class Message(MaybeInaccessibleMessage):
|
|
|
119
119
|
checklist_tasks_done: Optional[ChecklistTasksDone] = Field(default=None)
|
|
120
120
|
checklist_tasks_added: Optional[ChecklistTasksAdded] = Field(default=None)
|
|
121
121
|
community_chat_added: Optional[CommunityChatAdded] = Field(default=None)
|
|
122
|
+
community_chat_joined: Optional[CommunityChatJoined] = Field(default=None)
|
|
122
123
|
community_chat_removed: Optional[CommunityChatRemoved] = Field(default=None)
|
|
123
124
|
direct_message_price_changed: Optional[DirectMessagePriceChanged] = Field(default=None)
|
|
124
125
|
forum_topic_created: Optional[ForumTopicCreated] = Field(default=None)
|
|
@@ -1011,6 +1012,7 @@ class ChatMemberAdministrator(ChatMember):
|
|
|
1011
1012
|
can_post_stories: bool
|
|
1012
1013
|
can_edit_stories: bool
|
|
1013
1014
|
can_delete_stories: bool
|
|
1015
|
+
can_send_welcome_messages: bool
|
|
1014
1016
|
can_post_messages: Optional[bool] = Field(default=None)
|
|
1015
1017
|
can_edit_messages: Optional[bool] = Field(default=None)
|
|
1016
1018
|
can_pin_messages: Optional[bool] = Field(default=None)
|
|
@@ -1584,7 +1586,7 @@ _InputStoryContent = Union[
|
|
|
1584
1586
|
InputStoryContentAdapter = TypeAdapter[_InputStoryContent](_InputStoryContent)
|
|
1585
1587
|
|
|
1586
1588
|
class RichText(BaseModel):
|
|
1587
|
-
type: Literal['bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'date_time', 'text_mention', 'subscript', 'superscript', 'marked', 'code', 'custom_emoji', 'mathematical_expression', 'url', 'email_address', 'phone_number', 'bank_card_number', 'mention', 'hashtag', 'cashtag', 'bot_command', 'anchor', 'anchor_link', 'reference', 'reference_link']
|
|
1589
|
+
type: Literal['bold', 'italic', 'underline', 'strikethrough', 'spoiler', 'date_time', 'text_mention', 'subscript', 'superscript', 'marked', 'code', 'custom_emoji', 'mathematical_expression', 'url', 'email_address', 'phone_number', 'bank_card_number', 'mention', 'hashtag', 'cashtag', 'bot_command', 'button', 'anchor', 'anchor_link', 'reference', 'reference_link']
|
|
1588
1590
|
|
|
1589
1591
|
class RichTextBold(RichText):
|
|
1590
1592
|
'''
|
|
@@ -1809,6 +1811,16 @@ class RichTextBotCommand(RichText):
|
|
|
1809
1811
|
text: _RichText
|
|
1810
1812
|
bot_command: str
|
|
1811
1813
|
|
|
1814
|
+
class RichTextButton(RichText):
|
|
1815
|
+
'''
|
|
1816
|
+
A button.
|
|
1817
|
+
|
|
1818
|
+
Reference: https://core.telegram.org/bots/api#richtextbutton
|
|
1819
|
+
'''
|
|
1820
|
+
|
|
1821
|
+
type: Literal['button'] = 'button' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
1822
|
+
button: RichMessageButton
|
|
1823
|
+
|
|
1812
1824
|
class RichTextAnchor(RichText):
|
|
1813
1825
|
'''
|
|
1814
1826
|
An anchor.
|
|
@@ -1874,6 +1886,7 @@ _RichText = Union[
|
|
|
1874
1886
|
RichTextHashtag,
|
|
1875
1887
|
RichTextCashtag,
|
|
1876
1888
|
RichTextBotCommand,
|
|
1889
|
+
RichTextButton,
|
|
1877
1890
|
RichTextAnchor,
|
|
1878
1891
|
RichTextAnchorLink,
|
|
1879
1892
|
RichTextReference,
|
|
@@ -1882,7 +1895,7 @@ _RichText = Union[
|
|
|
1882
1895
|
RichTextAdapter = TypeAdapter[_RichText](_RichText)
|
|
1883
1896
|
|
|
1884
1897
|
class RichBlock(BaseModel):
|
|
1885
|
-
type: Literal['paragraph', 'heading', 'pre', 'footer', 'divider', 'mathematical_expression', 'anchor', 'list', 'blockquote', 'pullquote', 'collage', 'slideshow', 'table', 'details', 'map', 'animation', 'audio', 'photo', 'video', 'voice_note', 'thinking']
|
|
1898
|
+
type: Literal['paragraph', 'heading', 'pre', 'footer', 'divider', 'mathematical_expression', 'anchor', 'list', 'blockquote', 'expandable_blockquote', 'pullquote', 'collage', 'slideshow', 'table', 'details', 'map', 'buttons', 'animation', 'audio', 'document', 'photo', 'video', 'voice_note', 'thinking']
|
|
1886
1899
|
|
|
1887
1900
|
class RichBlockParagraph(RichBlock):
|
|
1888
1901
|
'''
|
|
@@ -1984,6 +1997,18 @@ class RichBlockBlockQuotation(RichBlock):
|
|
|
1984
1997
|
blocks: List[_RichBlock]
|
|
1985
1998
|
credit: Optional[_RichText] = Field(default=None)
|
|
1986
1999
|
|
|
2000
|
+
class RichBlockExpandableBlockQuotation(RichBlock):
|
|
2001
|
+
'''
|
|
2002
|
+
A block quotation, corresponding to the HTML tag
|
|
2003
|
+
<blockquote> with custom attribute "collapsed".
|
|
2004
|
+
|
|
2005
|
+
Reference: https://core.telegram.org/bots/api#richblockexpandableblockquotation
|
|
2006
|
+
'''
|
|
2007
|
+
|
|
2008
|
+
type: Literal['expandable_blockquote'] = 'expandable_blockquote' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2009
|
+
text: _RichText
|
|
2010
|
+
credit: Optional[_RichText] = Field(default=None)
|
|
2011
|
+
|
|
1987
2012
|
class RichBlockPullQuotation(RichBlock):
|
|
1988
2013
|
'''
|
|
1989
2014
|
A quotation with centered text, loosely corresponding to
|
|
@@ -2031,6 +2056,7 @@ class RichBlockTable(RichBlock):
|
|
|
2031
2056
|
cells: List[List[RichBlockTableCell]]
|
|
2032
2057
|
is_bordered: Optional[bool] = Field(default=None)
|
|
2033
2058
|
is_striped: Optional[bool] = Field(default=None)
|
|
2059
|
+
is_compact: Optional[bool] = Field(default=None)
|
|
2034
2060
|
caption: Optional[_RichText] = Field(default=None)
|
|
2035
2061
|
|
|
2036
2062
|
class RichBlockDetails(RichBlock):
|
|
@@ -2061,6 +2087,19 @@ class RichBlockMap(RichBlock):
|
|
|
2061
2087
|
height: int
|
|
2062
2088
|
caption: Optional[RichBlockCaption] = Field(default=None)
|
|
2063
2089
|
|
|
2090
|
+
class RichBlockButtons(RichBlock):
|
|
2091
|
+
'''
|
|
2092
|
+
A block containing a list of buttons that
|
|
2093
|
+
are shown in one row, corresponding to the
|
|
2094
|
+
custom HTML tag <tg-button-row>.
|
|
2095
|
+
|
|
2096
|
+
Reference: https://core.telegram.org/bots/api#richblockbuttons
|
|
2097
|
+
'''
|
|
2098
|
+
|
|
2099
|
+
type: Literal['buttons'] = 'buttons' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2100
|
+
buttons: List[RichMessageButton]
|
|
2101
|
+
align: Optional[str] = Field(default=None)
|
|
2102
|
+
|
|
2064
2103
|
class RichBlockAnimation(RichBlock):
|
|
2065
2104
|
'''
|
|
2066
2105
|
A block with an animation, corresponding to the
|
|
@@ -2086,6 +2125,18 @@ class RichBlockAudio(RichBlock):
|
|
|
2086
2125
|
audio: Audio
|
|
2087
2126
|
caption: Optional[RichBlockCaption] = Field(default=None)
|
|
2088
2127
|
|
|
2128
|
+
class RichBlockDocument(RichBlock):
|
|
2129
|
+
'''
|
|
2130
|
+
A block with a general file, corresponding to
|
|
2131
|
+
the custom HTML tag <tg-document>.
|
|
2132
|
+
|
|
2133
|
+
Reference: https://core.telegram.org/bots/api#richblockdocument
|
|
2134
|
+
'''
|
|
2135
|
+
|
|
2136
|
+
type: Literal['document'] = 'document' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2137
|
+
document: Document
|
|
2138
|
+
caption: Optional[RichBlockCaption] = Field(default=None)
|
|
2139
|
+
|
|
2089
2140
|
class RichBlockPhoto(RichBlock):
|
|
2090
2141
|
'''
|
|
2091
2142
|
A block with a photo, corresponding to the
|
|
@@ -2149,14 +2200,17 @@ _RichBlock = Union[
|
|
|
2149
2200
|
RichBlockAnchor,
|
|
2150
2201
|
RichBlockList,
|
|
2151
2202
|
RichBlockBlockQuotation,
|
|
2203
|
+
RichBlockExpandableBlockQuotation,
|
|
2152
2204
|
RichBlockPullQuotation,
|
|
2153
2205
|
RichBlockCollage,
|
|
2154
2206
|
RichBlockSlideshow,
|
|
2155
2207
|
RichBlockTable,
|
|
2156
2208
|
RichBlockDetails,
|
|
2157
2209
|
RichBlockMap,
|
|
2210
|
+
RichBlockButtons,
|
|
2158
2211
|
RichBlockAnimation,
|
|
2159
2212
|
RichBlockAudio,
|
|
2213
|
+
RichBlockDocument,
|
|
2160
2214
|
RichBlockPhoto,
|
|
2161
2215
|
RichBlockVideo,
|
|
2162
2216
|
RichBlockVoiceNote,
|
|
@@ -2165,7 +2219,7 @@ _RichBlock = Union[
|
|
|
2165
2219
|
RichBlockAdapter = TypeAdapter[_RichBlock](_RichBlock)
|
|
2166
2220
|
|
|
2167
2221
|
class InputRichBlock(BaseModel):
|
|
2168
|
-
type: Literal['paragraph', 'heading', 'pre', 'footer', 'divider', 'mathematical_expression', 'anchor', 'list', 'blockquote', 'pullquote', 'collage', 'slideshow', 'table', 'details', 'map', 'animation', 'audio', 'photo', 'video', 'voice_note', 'thinking']
|
|
2222
|
+
type: Literal['paragraph', 'heading', 'pre', 'footer', 'divider', 'mathematical_expression', 'anchor', 'list', 'blockquote', 'expandable_blockquote', 'pullquote', 'collage', 'slideshow', 'table', 'details', 'map', 'buttons', 'animation', 'audio', 'document', 'photo', 'video', 'voice_note', 'thinking']
|
|
2169
2223
|
|
|
2170
2224
|
class InputRichBlockParagraph(InputRichBlock):
|
|
2171
2225
|
'''
|
|
@@ -2267,6 +2321,18 @@ class InputRichBlockBlockQuotation(InputRichBlock):
|
|
|
2267
2321
|
blocks: List[_InputRichBlock]
|
|
2268
2322
|
credit: Optional[_RichText] = Field(default=None)
|
|
2269
2323
|
|
|
2324
|
+
class InputRichBlockExpandableBlockQuotation(InputRichBlock):
|
|
2325
|
+
'''
|
|
2326
|
+
A block quotation, corresponding to the HTML tag
|
|
2327
|
+
<blockquote> with custom attribute "collapsed".
|
|
2328
|
+
|
|
2329
|
+
Reference: https://core.telegram.org/bots/api#inputrichblockexpandableblockquotation
|
|
2330
|
+
'''
|
|
2331
|
+
|
|
2332
|
+
type: Literal['expandable_blockquote'] = 'expandable_blockquote' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2333
|
+
text: _RichText
|
|
2334
|
+
credit: Optional[_RichText] = Field(default=None)
|
|
2335
|
+
|
|
2270
2336
|
class InputRichBlockPullQuotation(InputRichBlock):
|
|
2271
2337
|
'''
|
|
2272
2338
|
A quotation with centered text, loosely corresponding to
|
|
@@ -2314,6 +2380,7 @@ class InputRichBlockTable(InputRichBlock):
|
|
|
2314
2380
|
cells: List[List[RichBlockTableCell]]
|
|
2315
2381
|
is_bordered: Optional[bool] = Field(default=None)
|
|
2316
2382
|
is_striped: Optional[bool] = Field(default=None)
|
|
2383
|
+
is_compact: Optional[bool] = Field(default=None)
|
|
2317
2384
|
caption: Optional[_RichText] = Field(default=None)
|
|
2318
2385
|
|
|
2319
2386
|
class InputRichBlockDetails(InputRichBlock):
|
|
@@ -2342,11 +2409,24 @@ class InputRichBlockMap(InputRichBlock):
|
|
|
2342
2409
|
|
|
2343
2410
|
type: Literal['map'] = 'map' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2344
2411
|
location: Location
|
|
2345
|
-
zoom: int
|
|
2346
|
-
width: int
|
|
2347
|
-
height: int
|
|
2412
|
+
zoom: Optional[int] = Field(default=None)
|
|
2413
|
+
width: Optional[int] = Field(default=None)
|
|
2414
|
+
height: Optional[int] = Field(default=None)
|
|
2348
2415
|
caption: Optional[RichBlockCaption] = Field(default=None)
|
|
2349
2416
|
|
|
2417
|
+
class InputRichBlockButtons(InputRichBlock):
|
|
2418
|
+
'''
|
|
2419
|
+
A block containing a list of buttons that
|
|
2420
|
+
are shown in one row, corresponding to the
|
|
2421
|
+
custom HTML tag <tg-button-row>.
|
|
2422
|
+
|
|
2423
|
+
Reference: https://core.telegram.org/bots/api#inputrichblockbuttons
|
|
2424
|
+
'''
|
|
2425
|
+
|
|
2426
|
+
type: Literal['buttons'] = 'buttons' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2427
|
+
buttons: List[RichMessageButton]
|
|
2428
|
+
align: Optional[str] = Field(default=None)
|
|
2429
|
+
|
|
2350
2430
|
class InputRichBlockAnimation(InputRichBlock):
|
|
2351
2431
|
'''
|
|
2352
2432
|
A block with an animation, corresponding to the
|
|
@@ -2371,6 +2451,18 @@ class InputRichBlockAudio(InputRichBlock):
|
|
|
2371
2451
|
audio: InputMediaAudio
|
|
2372
2452
|
caption: Optional[RichBlockCaption] = Field(default=None)
|
|
2373
2453
|
|
|
2454
|
+
class InputRichBlockDocument(InputRichBlock):
|
|
2455
|
+
'''
|
|
2456
|
+
A block with a general file, corresponding to
|
|
2457
|
+
the custom HTML tag <tg-document>.
|
|
2458
|
+
|
|
2459
|
+
Reference: https://core.telegram.org/bots/api#inputrichblockdocument
|
|
2460
|
+
'''
|
|
2461
|
+
|
|
2462
|
+
type: Literal['document'] = 'document' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2463
|
+
document: InputMediaDocument
|
|
2464
|
+
caption: Optional[RichBlockCaption] = Field(default=None)
|
|
2465
|
+
|
|
2374
2466
|
class InputRichBlockPhoto(InputRichBlock):
|
|
2375
2467
|
'''
|
|
2376
2468
|
A block with a photo, corresponding to the
|
|
@@ -2432,14 +2524,17 @@ _InputRichBlock = Union[
|
|
|
2432
2524
|
InputRichBlockAnchor,
|
|
2433
2525
|
InputRichBlockList,
|
|
2434
2526
|
InputRichBlockBlockQuotation,
|
|
2527
|
+
InputRichBlockExpandableBlockQuotation,
|
|
2435
2528
|
InputRichBlockPullQuotation,
|
|
2436
2529
|
InputRichBlockCollage,
|
|
2437
2530
|
InputRichBlockSlideshow,
|
|
2438
2531
|
InputRichBlockTable,
|
|
2439
2532
|
InputRichBlockDetails,
|
|
2440
2533
|
InputRichBlockMap,
|
|
2534
|
+
InputRichBlockButtons,
|
|
2441
2535
|
InputRichBlockAnimation,
|
|
2442
2536
|
InputRichBlockAudio,
|
|
2537
|
+
InputRichBlockDocument,
|
|
2443
2538
|
InputRichBlockPhoto,
|
|
2444
2539
|
InputRichBlockVideo,
|
|
2445
2540
|
InputRichBlockVoiceNote,
|
|
@@ -3378,6 +3473,7 @@ class Update(BaseModel):
|
|
|
3378
3473
|
removed_chat_boost: Optional[ChatBoostRemoved] = Field(default=None)
|
|
3379
3474
|
managed_bot: Optional[ManagedBotUpdated] = Field(default=None)
|
|
3380
3475
|
subscription: Optional[BotSubscriptionUpdated] = Field(default=None)
|
|
3476
|
+
stopped_message_generation: Optional[MessageGenerationStopped] = Field(default=None)
|
|
3381
3477
|
|
|
3382
3478
|
@staticmethod
|
|
3383
3479
|
def from_dict(
|
|
@@ -3624,6 +3720,18 @@ class ReplyParameters(BaseModel):
|
|
|
3624
3720
|
checklist_task_id: Optional[int] = Field(default=None)
|
|
3625
3721
|
poll_option_id: Optional[str] = Field(default=None)
|
|
3626
3722
|
|
|
3723
|
+
class EphemeralMessageParameters(BaseModel):
|
|
3724
|
+
'''
|
|
3725
|
+
This object describes the origin of a message.
|
|
3726
|
+
It can be one of
|
|
3727
|
+
|
|
3728
|
+
Reference: https://core.telegram.org/bots/api#ephemeralmessageparameters
|
|
3729
|
+
'''
|
|
3730
|
+
|
|
3731
|
+
receiver_user_id: int
|
|
3732
|
+
callback_query_id: Optional[str] = Field(default=None)
|
|
3733
|
+
replace_callback_query_message: Optional[bool] = Field(default=None)
|
|
3734
|
+
|
|
3627
3735
|
class PhotoSize(BaseModel):
|
|
3628
3736
|
'''
|
|
3629
3737
|
This object represents one size of a photo
|
|
@@ -3752,8 +3860,7 @@ class Video(BaseModel):
|
|
|
3752
3860
|
|
|
3753
3861
|
class VideoNote(BaseModel):
|
|
3754
3862
|
'''
|
|
3755
|
-
This object represents a video message
|
|
3756
|
-
Telegram apps as of v.4.0).
|
|
3863
|
+
This object represents a video message.
|
|
3757
3864
|
|
|
3758
3865
|
Reference: https://core.telegram.org/bots/api#videonote
|
|
3759
3866
|
'''
|
|
@@ -4064,6 +4171,18 @@ class BotSubscriptionUpdated(BaseModel):
|
|
|
4064
4171
|
invoice_payload: str
|
|
4065
4172
|
state: str
|
|
4066
4173
|
|
|
4174
|
+
class MessageGenerationStopped(BaseModel):
|
|
4175
|
+
'''
|
|
4176
|
+
This object describes an update about a user
|
|
4177
|
+
stopping message generation.
|
|
4178
|
+
|
|
4179
|
+
Reference: https://core.telegram.org/bots/api#messagegenerationstopped
|
|
4180
|
+
'''
|
|
4181
|
+
|
|
4182
|
+
chat: Chat
|
|
4183
|
+
draft_id: int
|
|
4184
|
+
message_thread_id: Optional[int] = Field(default=None)
|
|
4185
|
+
|
|
4067
4186
|
class PollOptionAdded(BaseModel):
|
|
4068
4187
|
'''
|
|
4069
4188
|
Describes a service message about an option added
|
|
@@ -4134,18 +4253,29 @@ class ChecklistTasksAdded(BaseModel):
|
|
|
4134
4253
|
|
|
4135
4254
|
class CommunityChatAdded(BaseModel):
|
|
4136
4255
|
'''
|
|
4137
|
-
Describes a service message about a chat
|
|
4138
|
-
added to a community.
|
|
4256
|
+
Describes a service message about a chat or
|
|
4257
|
+
a bot being added to a community.
|
|
4139
4258
|
|
|
4140
4259
|
Reference: https://core.telegram.org/bots/api#communitychatadded
|
|
4141
4260
|
'''
|
|
4142
4261
|
|
|
4143
4262
|
community: Community
|
|
4144
4263
|
|
|
4145
|
-
class
|
|
4264
|
+
class CommunityChatJoined(BaseModel):
|
|
4146
4265
|
'''
|
|
4147
4266
|
Describes a service message about a chat being
|
|
4148
|
-
|
|
4267
|
+
joined by a user from a community.
|
|
4268
|
+
|
|
4269
|
+
Reference: https://core.telegram.org/bots/api#communitychatjoined
|
|
4270
|
+
'''
|
|
4271
|
+
|
|
4272
|
+
community: Community
|
|
4273
|
+
|
|
4274
|
+
class CommunityChatRemoved(BaseModel):
|
|
4275
|
+
'''
|
|
4276
|
+
Describes a service message about a chat or
|
|
4277
|
+
a bot being removed from a community. Currently
|
|
4278
|
+
holds no information.
|
|
4149
4279
|
|
|
4150
4280
|
Reference: https://core.telegram.org/bots/api#communitychatremoved
|
|
4151
4281
|
'''
|
|
@@ -4629,7 +4759,8 @@ class ReplyKeyboardMarkup(BaseModel):
|
|
|
4629
4759
|
resize_keyboard: Optional[bool] = Field(default=None)
|
|
4630
4760
|
one_time_keyboard: Optional[bool] = Field(default=None)
|
|
4631
4761
|
input_field_placeholder: Optional[str] = Field(default=None)
|
|
4632
|
-
selective: Optional[bool] = Field(default=None)
|
|
4762
|
+
selective: Optional[bool] = Field(default=None)
|
|
4763
|
+
force_reply: Optional[bool] = Field(default=None)
|
|
4633
4764
|
|
|
4634
4765
|
class KeyboardButton(BaseModel):
|
|
4635
4766
|
'''
|
|
@@ -4749,6 +4880,7 @@ class InlineKeyboardMarkup(BaseModel):
|
|
|
4749
4880
|
'''
|
|
4750
4881
|
|
|
4751
4882
|
inline_keyboard: List[List[InlineKeyboardButton]]
|
|
4883
|
+
force_reply: Optional[bool] = Field(default=None)
|
|
4752
4884
|
|
|
4753
4885
|
@staticmethod
|
|
4754
4886
|
def from_dict(
|
|
@@ -4787,17 +4919,18 @@ class InlineKeyboardButton(BaseModel):
|
|
|
4787
4919
|
switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = Field(default=None)
|
|
4788
4920
|
copy_text: Optional[CopyTextButton] = Field(default=None)
|
|
4789
4921
|
callback_game: Optional[CallbackGame] = Field(default=None)
|
|
4790
|
-
pay: Optional[bool] = Field(default=None)
|
|
4922
|
+
pay: Optional[bool] = Field(default=None)
|
|
4923
|
+
disabled: Optional[DisabledButton] = Field(default=None)
|
|
4791
4924
|
|
|
4792
4925
|
class LoginUrl(BaseModel):
|
|
4793
4926
|
'''
|
|
4794
4927
|
This object represents a parameter of the inline
|
|
4795
4928
|
keyboard button used to automatically authorize a user.
|
|
4796
|
-
|
|
4797
|
-
Login Widget when the user is coming
|
|
4798
|
-
Telegram. All the user needs to do
|
|
4799
|
-
tap/click a button and confirm that they
|
|
4800
|
-
to log in:
|
|
4929
|
+
It serves as a great replacement for the
|
|
4930
|
+
Telegram Login Widget when the user is coming
|
|
4931
|
+
from Telegram. All the user needs to do
|
|
4932
|
+
is tap/click a button and confirm that they
|
|
4933
|
+
want to log in:
|
|
4801
4934
|
|
|
4802
4935
|
Reference: https://core.telegram.org/bots/api#loginurl
|
|
4803
4936
|
'''
|
|
@@ -4832,6 +4965,17 @@ class CopyTextButton(BaseModel):
|
|
|
4832
4965
|
|
|
4833
4966
|
text: str
|
|
4834
4967
|
|
|
4968
|
+
class DisabledButton(BaseModel):
|
|
4969
|
+
'''
|
|
4970
|
+
This object represents a disabled button which does
|
|
4971
|
+
nothing. Currently holds no information.
|
|
4972
|
+
|
|
4973
|
+
Reference: https://core.telegram.org/bots/api#disabledbutton
|
|
4974
|
+
'''
|
|
4975
|
+
|
|
4976
|
+
pass
|
|
4977
|
+
|
|
4978
|
+
|
|
4835
4979
|
class CallbackQuery(BaseModel):
|
|
4836
4980
|
'''
|
|
4837
4981
|
This object represents an incoming callback query from
|
|
@@ -4933,6 +5077,7 @@ class ChatAdministratorRights(BaseModel):
|
|
|
4933
5077
|
can_post_stories: bool
|
|
4934
5078
|
can_edit_stories: bool
|
|
4935
5079
|
can_delete_stories: bool
|
|
5080
|
+
can_send_welcome_messages: bool
|
|
4936
5081
|
can_post_messages: Optional[bool] = Field(default=None)
|
|
4937
5082
|
can_edit_messages: Optional[bool] = Field(default=None)
|
|
4938
5083
|
can_pin_messages: Optional[bool] = Field(default=None)
|
|
@@ -5349,6 +5494,9 @@ class UniqueGiftInfo(BaseModel):
|
|
|
5349
5494
|
|
|
5350
5495
|
gift: UniqueGift
|
|
5351
5496
|
origin: str
|
|
5497
|
+
text: Optional[str] = Field(default=None)
|
|
5498
|
+
entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
5499
|
+
is_private: Optional[bool] = Field(default=None)
|
|
5352
5500
|
last_resale_currency: Optional[str] = Field(default=None)
|
|
5353
5501
|
last_resale_amount: Optional[int] = Field(default=None)
|
|
5354
5502
|
owned_gift_id: Optional[str] = Field(default=None)
|
|
@@ -5757,7 +5905,29 @@ class InputRichMessageMedia(BaseModel):
|
|
|
5757
5905
|
'''
|
|
5758
5906
|
|
|
5759
5907
|
id: str
|
|
5760
|
-
media: Union[InputMediaAnimation, InputMediaAudio, InputMediaPhoto, InputMediaVideo, InputMediaVoiceNote]
|
|
5908
|
+
media: Union[InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo, InputMediaVoiceNote]
|
|
5909
|
+
|
|
5910
|
+
class RichMessageButton(BaseModel):
|
|
5911
|
+
'''
|
|
5912
|
+
This object represents a button in a RichMessage.
|
|
5913
|
+
Exactly one of the fields other than text
|
|
5914
|
+
and style must be used to specify the
|
|
5915
|
+
type of the button.
|
|
5916
|
+
|
|
5917
|
+
Reference: https://core.telegram.org/bots/api#richmessagebutton
|
|
5918
|
+
'''
|
|
5919
|
+
|
|
5920
|
+
text: _RichText
|
|
5921
|
+
style: Optional[str] = Field(default=None)
|
|
5922
|
+
url: Optional[str] = Field(default=None)
|
|
5923
|
+
callback_data: Optional[str] = Field(default=None)
|
|
5924
|
+
web_app: Optional[WebAppInfo] = Field(default=None)
|
|
5925
|
+
login_url: Optional[LoginUrl] = Field(default=None)
|
|
5926
|
+
switch_inline_query: Optional[str] = Field(default=None)
|
|
5927
|
+
switch_inline_query_current_chat: Optional[str] = Field(default=None)
|
|
5928
|
+
switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = Field(default=None)
|
|
5929
|
+
copy_text: Optional[CopyTextButton] = Field(default=None)
|
|
5930
|
+
disabled: Optional[DisabledButton] = Field(default=None)
|
|
5761
5931
|
|
|
5762
5932
|
class RichBlockCaption(BaseModel):
|
|
5763
5933
|
'''
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|