Pytdbot 0.10.1.dev0__py3-none-any.whl → 0.10.2.dev0__py3-none-any.whl
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.
- pytdbot/__init__.py +1 -1
- pytdbot/handlers/td_updates.py +133 -15
- pytdbot/methods/methods.py +179 -19
- pytdbot/methods/td_functions.py +431 -64
- pytdbot/types/__init__.py +113 -25
- pytdbot/types/bound_methods/callback_query.py +10 -0
- pytdbot/types/bound_methods/message.py +43 -6
- pytdbot/types/td_types.py +3439 -894
- pytdbot/utils/__init__.py +6 -0
- pytdbot/utils/common.py +14 -0
- pytdbot/utils/rich_messages.py +29 -0
- {pytdbot-0.10.1.dev0.dist-info → pytdbot-0.10.2.dev0.dist-info}/METADATA +2 -2
- {pytdbot-0.10.1.dev0.dist-info → pytdbot-0.10.2.dev0.dist-info}/RECORD +16 -15
- {pytdbot-0.10.1.dev0.dist-info → pytdbot-0.10.2.dev0.dist-info}/WHEEL +1 -1
- {pytdbot-0.10.1.dev0.dist-info → pytdbot-0.10.2.dev0.dist-info}/licenses/LICENSE +0 -0
- {pytdbot-0.10.1.dev0.dist-info → pytdbot-0.10.2.dev0.dist-info}/top_level.txt +0 -0
pytdbot/methods/methods.py
CHANGED
|
@@ -216,6 +216,8 @@ class Methods(TDLibFunctions):
|
|
|
216
216
|
quote: InputTextQuote = None,
|
|
217
217
|
reply_to: InputMessageReplyTo = None,
|
|
218
218
|
reply_to_message_id: int = 0,
|
|
219
|
+
receiver_user_id: int = 0,
|
|
220
|
+
callback_query_id: int = 0,
|
|
219
221
|
reply_markup: (
|
|
220
222
|
ReplyMarkupInlineKeyboard
|
|
221
223
|
| ReplyMarkupShowKeyboard
|
|
@@ -277,6 +279,12 @@ class Methods(TDLibFunctions):
|
|
|
277
279
|
reply_to_message_id (``int``, *optional*):
|
|
278
280
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
279
281
|
|
|
282
|
+
receiver_user_id (``int``, *optional*):
|
|
283
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
284
|
+
|
|
285
|
+
callback_query_id (``int``, *optional*):
|
|
286
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
287
|
+
|
|
280
288
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
281
289
|
The message reply markup
|
|
282
290
|
|
|
@@ -315,6 +323,8 @@ class Methods(TDLibFunctions):
|
|
|
315
323
|
quote=quote,
|
|
316
324
|
reply_to=reply_to,
|
|
317
325
|
reply_to_message_id=reply_to_message_id,
|
|
326
|
+
receiver_user_id=receiver_user_id,
|
|
327
|
+
callback_query_id=callback_query_id,
|
|
318
328
|
reply_markup=reply_markup,
|
|
319
329
|
)
|
|
320
330
|
|
|
@@ -334,6 +344,8 @@ class Methods(TDLibFunctions):
|
|
|
334
344
|
quote: InputTextQuote = None,
|
|
335
345
|
reply_to: InputMessageReplyTo = None,
|
|
336
346
|
reply_to_message_id: int = 0,
|
|
347
|
+
receiver_user_id: int = 0,
|
|
348
|
+
callback_query_id: int = 0,
|
|
337
349
|
reply_markup: (
|
|
338
350
|
ReplyMarkupInlineKeyboard
|
|
339
351
|
| ReplyMarkupShowKeyboard
|
|
@@ -383,6 +395,12 @@ class Methods(TDLibFunctions):
|
|
|
383
395
|
reply_to_message_id (``int``, *optional*):
|
|
384
396
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
385
397
|
|
|
398
|
+
receiver_user_id (``int``, *optional*):
|
|
399
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
400
|
+
|
|
401
|
+
callback_query_id (``int``, *optional*):
|
|
402
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
403
|
+
|
|
386
404
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
387
405
|
The message reply markup
|
|
388
406
|
|
|
@@ -418,6 +436,8 @@ class Methods(TDLibFunctions):
|
|
|
418
436
|
quote=quote,
|
|
419
437
|
reply_to=reply_to,
|
|
420
438
|
reply_to_message_id=reply_to_message_id,
|
|
439
|
+
receiver_user_id=receiver_user_id,
|
|
440
|
+
callback_query_id=callback_query_id,
|
|
421
441
|
reply_markup=reply_markup,
|
|
422
442
|
)
|
|
423
443
|
|
|
@@ -441,6 +461,8 @@ class Methods(TDLibFunctions):
|
|
|
441
461
|
quote: InputTextQuote = None,
|
|
442
462
|
reply_to: InputMessageReplyTo = None,
|
|
443
463
|
reply_to_message_id: int = 0,
|
|
464
|
+
receiver_user_id: int = 0,
|
|
465
|
+
callback_query_id: int = 0,
|
|
444
466
|
reply_markup: (
|
|
445
467
|
ReplyMarkupInlineKeyboard
|
|
446
468
|
| ReplyMarkupShowKeyboard
|
|
@@ -505,6 +527,12 @@ class Methods(TDLibFunctions):
|
|
|
505
527
|
reply_to_message_id (``int``, *optional*):
|
|
506
528
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
507
529
|
|
|
530
|
+
receiver_user_id (``int``, *optional*):
|
|
531
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
532
|
+
|
|
533
|
+
callback_query_id (``int``, *optional*):
|
|
534
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
535
|
+
|
|
508
536
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
509
537
|
The message reply markup
|
|
510
538
|
|
|
@@ -548,6 +576,8 @@ class Methods(TDLibFunctions):
|
|
|
548
576
|
quote=quote,
|
|
549
577
|
reply_to=reply_to,
|
|
550
578
|
reply_to_message_id=reply_to_message_id,
|
|
579
|
+
receiver_user_id=receiver_user_id,
|
|
580
|
+
callback_query_id=callback_query_id,
|
|
551
581
|
reply_markup=reply_markup,
|
|
552
582
|
)
|
|
553
583
|
|
|
@@ -569,6 +599,8 @@ class Methods(TDLibFunctions):
|
|
|
569
599
|
quote: InputTextQuote = None,
|
|
570
600
|
reply_to: InputMessageReplyTo = None,
|
|
571
601
|
reply_to_message_id: int = 0,
|
|
602
|
+
receiver_user_id: int = 0,
|
|
603
|
+
callback_query_id: int = 0,
|
|
572
604
|
reply_markup: (
|
|
573
605
|
ReplyMarkupInlineKeyboard
|
|
574
606
|
| ReplyMarkupShowKeyboard
|
|
@@ -627,6 +659,12 @@ class Methods(TDLibFunctions):
|
|
|
627
659
|
reply_to_message_id (``int``, *optional*):
|
|
628
660
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
629
661
|
|
|
662
|
+
receiver_user_id (``int``, *optional*):
|
|
663
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
664
|
+
|
|
665
|
+
callback_query_id (``int``, *optional*):
|
|
666
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
667
|
+
|
|
630
668
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
631
669
|
The message reply markup
|
|
632
670
|
|
|
@@ -669,6 +707,8 @@ class Methods(TDLibFunctions):
|
|
|
669
707
|
quote=quote,
|
|
670
708
|
reply_to=reply_to,
|
|
671
709
|
reply_to_message_id=reply_to_message_id,
|
|
710
|
+
receiver_user_id=receiver_user_id,
|
|
711
|
+
callback_query_id=callback_query_id,
|
|
672
712
|
reply_markup=reply_markup,
|
|
673
713
|
)
|
|
674
714
|
|
|
@@ -688,6 +728,8 @@ class Methods(TDLibFunctions):
|
|
|
688
728
|
quote: InputTextQuote = None,
|
|
689
729
|
reply_to: InputMessageReplyTo = None,
|
|
690
730
|
reply_to_message_id: int = 0,
|
|
731
|
+
receiver_user_id: int = 0,
|
|
732
|
+
callback_query_id: int = 0,
|
|
691
733
|
reply_markup: (
|
|
692
734
|
ReplyMarkupInlineKeyboard
|
|
693
735
|
| ReplyMarkupShowKeyboard
|
|
@@ -740,6 +782,12 @@ class Methods(TDLibFunctions):
|
|
|
740
782
|
reply_to_message_id (``int``, *optional*):
|
|
741
783
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
742
784
|
|
|
785
|
+
receiver_user_id (``int``, *optional*):
|
|
786
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
787
|
+
|
|
788
|
+
callback_query_id (``int``, *optional*):
|
|
789
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
790
|
+
|
|
743
791
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
744
792
|
The message reply markup
|
|
745
793
|
|
|
@@ -779,6 +827,8 @@ class Methods(TDLibFunctions):
|
|
|
779
827
|
quote=quote,
|
|
780
828
|
reply_to=reply_to,
|
|
781
829
|
reply_to_message_id=reply_to_message_id,
|
|
830
|
+
receiver_user_id=receiver_user_id,
|
|
831
|
+
callback_query_id=callback_query_id,
|
|
782
832
|
reply_markup=reply_markup,
|
|
783
833
|
)
|
|
784
834
|
|
|
@@ -901,6 +951,8 @@ class Methods(TDLibFunctions):
|
|
|
901
951
|
quote: InputTextQuote = None,
|
|
902
952
|
reply_to: InputMessageReplyTo = None,
|
|
903
953
|
reply_to_message_id: int = 0,
|
|
954
|
+
receiver_user_id: int = 0,
|
|
955
|
+
callback_query_id: int = 0,
|
|
904
956
|
reply_markup: (
|
|
905
957
|
ReplyMarkupInlineKeyboard
|
|
906
958
|
| ReplyMarkupShowKeyboard
|
|
@@ -965,6 +1017,12 @@ class Methods(TDLibFunctions):
|
|
|
965
1017
|
reply_to_message_id (``int``, *optional*):
|
|
966
1018
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
967
1019
|
|
|
1020
|
+
receiver_user_id (``int``, *optional*):
|
|
1021
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
1022
|
+
|
|
1023
|
+
callback_query_id (``int``, *optional*):
|
|
1024
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
1025
|
+
|
|
968
1026
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
969
1027
|
The message reply markup
|
|
970
1028
|
|
|
@@ -1008,6 +1066,8 @@ class Methods(TDLibFunctions):
|
|
|
1008
1066
|
quote=quote,
|
|
1009
1067
|
reply_to=reply_to,
|
|
1010
1068
|
reply_to_message_id=reply_to_message_id,
|
|
1069
|
+
receiver_user_id=receiver_user_id,
|
|
1070
|
+
callback_query_id=callback_query_id,
|
|
1011
1071
|
reply_markup=reply_markup,
|
|
1012
1072
|
)
|
|
1013
1073
|
|
|
@@ -1033,6 +1093,8 @@ class Methods(TDLibFunctions):
|
|
|
1033
1093
|
quote: InputTextQuote = None,
|
|
1034
1094
|
reply_to: InputMessageReplyTo = None,
|
|
1035
1095
|
reply_to_message_id: int = 0,
|
|
1096
|
+
receiver_user_id: int = 0,
|
|
1097
|
+
callback_query_id: int = 0,
|
|
1036
1098
|
reply_markup: (
|
|
1037
1099
|
ReplyMarkupInlineKeyboard
|
|
1038
1100
|
| ReplyMarkupShowKeyboard
|
|
@@ -1103,6 +1165,12 @@ class Methods(TDLibFunctions):
|
|
|
1103
1165
|
reply_to_message_id (``int``, *optional*):
|
|
1104
1166
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
1105
1167
|
|
|
1168
|
+
receiver_user_id (``int``, *optional*):
|
|
1169
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
1170
|
+
|
|
1171
|
+
callback_query_id (``int``, *optional*):
|
|
1172
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
1173
|
+
|
|
1106
1174
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
1107
1175
|
The message reply markup
|
|
1108
1176
|
|
|
@@ -1148,6 +1216,8 @@ class Methods(TDLibFunctions):
|
|
|
1148
1216
|
quote=quote,
|
|
1149
1217
|
reply_to=reply_to,
|
|
1150
1218
|
reply_to_message_id=reply_to_message_id,
|
|
1219
|
+
receiver_user_id=receiver_user_id,
|
|
1220
|
+
callback_query_id=callback_query_id,
|
|
1151
1221
|
reply_markup=reply_markup,
|
|
1152
1222
|
)
|
|
1153
1223
|
|
|
@@ -1165,6 +1235,8 @@ class Methods(TDLibFunctions):
|
|
|
1165
1235
|
quote: InputTextQuote = None,
|
|
1166
1236
|
reply_to: InputMessageReplyTo = None,
|
|
1167
1237
|
reply_to_message_id: int = 0,
|
|
1238
|
+
receiver_user_id: int = 0,
|
|
1239
|
+
callback_query_id: int = 0,
|
|
1168
1240
|
reply_markup: (
|
|
1169
1241
|
ReplyMarkupInlineKeyboard
|
|
1170
1242
|
| ReplyMarkupShowKeyboard
|
|
@@ -1211,6 +1283,12 @@ class Methods(TDLibFunctions):
|
|
|
1211
1283
|
reply_to_message_id (``int``, *optional*):
|
|
1212
1284
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
1213
1285
|
|
|
1286
|
+
receiver_user_id (``int``, *optional*):
|
|
1287
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
1288
|
+
|
|
1289
|
+
callback_query_id (``int``, *optional*):
|
|
1290
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
1291
|
+
|
|
1214
1292
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
1215
1293
|
The message reply markup
|
|
1216
1294
|
|
|
@@ -1238,6 +1316,8 @@ class Methods(TDLibFunctions):
|
|
|
1238
1316
|
quote=quote,
|
|
1239
1317
|
reply_to=reply_to,
|
|
1240
1318
|
reply_to_message_id=reply_to_message_id,
|
|
1319
|
+
receiver_user_id=receiver_user_id,
|
|
1320
|
+
callback_query_id=callback_query_id,
|
|
1241
1321
|
reply_markup=reply_markup,
|
|
1242
1322
|
)
|
|
1243
1323
|
|
|
@@ -1257,6 +1337,8 @@ class Methods(TDLibFunctions):
|
|
|
1257
1337
|
quote: InputTextQuote = None,
|
|
1258
1338
|
reply_to: InputMessageReplyTo = None,
|
|
1259
1339
|
reply_to_message_id: int = 0,
|
|
1340
|
+
receiver_user_id: int = 0,
|
|
1341
|
+
callback_query_id: int = 0,
|
|
1260
1342
|
reply_markup: (
|
|
1261
1343
|
ReplyMarkupInlineKeyboard
|
|
1262
1344
|
| ReplyMarkupShowKeyboard
|
|
@@ -1309,6 +1391,12 @@ class Methods(TDLibFunctions):
|
|
|
1309
1391
|
reply_to_message_id (``int``, *optional*):
|
|
1310
1392
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
1311
1393
|
|
|
1394
|
+
receiver_user_id (``int``, *optional*):
|
|
1395
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
1396
|
+
|
|
1397
|
+
callback_query_id (``int``, *optional*):
|
|
1398
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
1399
|
+
|
|
1312
1400
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
1313
1401
|
The message reply markup
|
|
1314
1402
|
|
|
@@ -1346,6 +1434,8 @@ class Methods(TDLibFunctions):
|
|
|
1346
1434
|
quote=quote,
|
|
1347
1435
|
reply_to=reply_to,
|
|
1348
1436
|
reply_to_message_id=reply_to_message_id,
|
|
1437
|
+
receiver_user_id=receiver_user_id,
|
|
1438
|
+
callback_query_id=callback_query_id,
|
|
1349
1439
|
reply_markup=reply_markup,
|
|
1350
1440
|
)
|
|
1351
1441
|
|
|
@@ -1364,6 +1454,8 @@ class Methods(TDLibFunctions):
|
|
|
1364
1454
|
quote: InputTextQuote = None,
|
|
1365
1455
|
reply_to: InputMessageReplyTo = None,
|
|
1366
1456
|
reply_to_message_id: int = 0,
|
|
1457
|
+
receiver_user_id: int = 0,
|
|
1458
|
+
callback_query_id: int = 0,
|
|
1367
1459
|
reply_markup: (
|
|
1368
1460
|
ReplyMarkupInlineKeyboard
|
|
1369
1461
|
| ReplyMarkupShowKeyboard
|
|
@@ -1413,6 +1505,12 @@ class Methods(TDLibFunctions):
|
|
|
1413
1505
|
reply_to_message_id (``int``, *optional*):
|
|
1414
1506
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
1415
1507
|
|
|
1508
|
+
receiver_user_id (``int``, *optional*):
|
|
1509
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
1510
|
+
|
|
1511
|
+
callback_query_id (``int``, *optional*):
|
|
1512
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
1513
|
+
|
|
1416
1514
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
1417
1515
|
The message reply markup
|
|
1418
1516
|
|
|
@@ -1440,6 +1538,8 @@ class Methods(TDLibFunctions):
|
|
|
1440
1538
|
quote=quote,
|
|
1441
1539
|
reply_to=reply_to,
|
|
1442
1540
|
reply_to_message_id=reply_to_message_id,
|
|
1541
|
+
receiver_user_id=receiver_user_id,
|
|
1542
|
+
callback_query_id=callback_query_id,
|
|
1443
1543
|
reply_markup=reply_markup,
|
|
1444
1544
|
)
|
|
1445
1545
|
|
|
@@ -1460,6 +1560,14 @@ class Methods(TDLibFunctions):
|
|
|
1460
1560
|
quote: InputTextQuote = None,
|
|
1461
1561
|
reply_to: InputMessageReplyTo = None,
|
|
1462
1562
|
reply_to_message_id: int = 0,
|
|
1563
|
+
receiver_user_id: int = 0,
|
|
1564
|
+
callback_query_id: int = 0,
|
|
1565
|
+
reply_markup: (
|
|
1566
|
+
ReplyMarkupInlineKeyboard
|
|
1567
|
+
| ReplyMarkupShowKeyboard
|
|
1568
|
+
| ReplyMarkupForceReply
|
|
1569
|
+
| ReplyMarkupRemoveKeyboard
|
|
1570
|
+
) = None,
|
|
1463
1571
|
) -> Error | Message:
|
|
1464
1572
|
r"""Copy message to chat
|
|
1465
1573
|
|
|
@@ -1509,6 +1617,15 @@ class Methods(TDLibFunctions):
|
|
|
1509
1617
|
reply_to_message_id (``int``, *optional*):
|
|
1510
1618
|
Identifier of the message to reply. Ignored if ``reply_to`` is specified
|
|
1511
1619
|
|
|
1620
|
+
receiver_user_id (``int``, *optional*):
|
|
1621
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
1622
|
+
|
|
1623
|
+
callback_query_id (``int``, *optional*):
|
|
1624
|
+
Identifier of the callback query which triggered the message; for Ephemeral messages only
|
|
1625
|
+
|
|
1626
|
+
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
1627
|
+
The message reply markup
|
|
1628
|
+
|
|
1512
1629
|
|
|
1513
1630
|
Returns:
|
|
1514
1631
|
:class:`~pytdbot.types.Message`
|
|
@@ -1542,6 +1659,9 @@ class Methods(TDLibFunctions):
|
|
|
1542
1659
|
quote=quote,
|
|
1543
1660
|
reply_to=reply_to,
|
|
1544
1661
|
reply_to_message_id=reply_to_message_id,
|
|
1662
|
+
receiver_user_id=receiver_user_id,
|
|
1663
|
+
callback_query_id=callback_query_id,
|
|
1664
|
+
reply_markup=reply_markup,
|
|
1545
1665
|
)
|
|
1546
1666
|
|
|
1547
1667
|
async def forwardMessage(
|
|
@@ -1591,9 +1711,12 @@ class Methods(TDLibFunctions):
|
|
|
1591
1711
|
|
|
1592
1712
|
async def editTextMessage(
|
|
1593
1713
|
self,
|
|
1714
|
+
*,
|
|
1594
1715
|
chat_id: int,
|
|
1595
|
-
message_id: int,
|
|
1596
1716
|
text: str,
|
|
1717
|
+
message_id: int = 0,
|
|
1718
|
+
ephemeral_message_id: int = 0,
|
|
1719
|
+
receiver_user_id: int = 0,
|
|
1597
1720
|
parse_mode: str = None,
|
|
1598
1721
|
entities: list = None,
|
|
1599
1722
|
disable_web_page_preview: bool = False,
|
|
@@ -1609,12 +1732,18 @@ class Methods(TDLibFunctions):
|
|
|
1609
1732
|
chat_id (``int``):
|
|
1610
1733
|
Chat identifier
|
|
1611
1734
|
|
|
1612
|
-
message_id (``int``):
|
|
1613
|
-
Message identifier in the chat specified in chat_id
|
|
1614
|
-
|
|
1615
1735
|
text (``str``):
|
|
1616
1736
|
New text of the message
|
|
1617
1737
|
|
|
1738
|
+
message_id (``int``):
|
|
1739
|
+
Message identifier in the chat
|
|
1740
|
+
|
|
1741
|
+
ephemeral_message_id (``int``, *optional*):
|
|
1742
|
+
Identifier of the message to be deleted; for Ephemeral messages only
|
|
1743
|
+
|
|
1744
|
+
receiver_user_id (``int``, *optional*):
|
|
1745
|
+
Identifier of the user who will receive the message; for Ephemeral messages only
|
|
1746
|
+
|
|
1618
1747
|
parse_mode (``str``, *optional*):
|
|
1619
1748
|
Mode for parsing entities in the message text
|
|
1620
1749
|
|
|
@@ -1639,7 +1768,6 @@ class Methods(TDLibFunctions):
|
|
|
1639
1768
|
reply_markup (:class:`~pytdbot.types.ReplyMarkupInlineKeyboard` | :class:`~pytdbot.types.ReplyMarkupShowKeyboard` | :class:`~pytdbot.types.ReplyMarkupForceReply` | :class:`~pytdbot.types.ReplyMarkupRemoveKeyboard`, *optional*):
|
|
1640
1769
|
The message reply markup
|
|
1641
1770
|
|
|
1642
|
-
|
|
1643
1771
|
Returns:
|
|
1644
1772
|
:class:`~pytdbot.types.Message`
|
|
1645
1773
|
"""
|
|
@@ -1660,6 +1788,24 @@ class Methods(TDLibFunctions):
|
|
|
1660
1788
|
else:
|
|
1661
1789
|
text = FormattedText(text=text)
|
|
1662
1790
|
|
|
1791
|
+
if ephemeral_message_id:
|
|
1792
|
+
return await self.editEphemeralMessage(
|
|
1793
|
+
chat_id=chat_id,
|
|
1794
|
+
receiver_user_id=receiver_user_id,
|
|
1795
|
+
ephemeral_message_id=ephemeral_message_id,
|
|
1796
|
+
reply_markup=reply_markup,
|
|
1797
|
+
input_message_content=InputMessageText(
|
|
1798
|
+
text=text,
|
|
1799
|
+
link_preview_options=LinkPreviewOptions(
|
|
1800
|
+
is_disabled=disable_web_page_preview,
|
|
1801
|
+
url=url,
|
|
1802
|
+
force_small_media=force_small_media,
|
|
1803
|
+
force_large_media=force_large_media,
|
|
1804
|
+
show_above_text=show_above_text,
|
|
1805
|
+
),
|
|
1806
|
+
),
|
|
1807
|
+
)
|
|
1808
|
+
|
|
1663
1809
|
return await self.editMessageText(
|
|
1664
1810
|
chat_id=chat_id,
|
|
1665
1811
|
message_id=message_id,
|
|
@@ -1689,6 +1835,8 @@ class Methods(TDLibFunctions):
|
|
|
1689
1835
|
quote: InputTextQuote = None,
|
|
1690
1836
|
reply_to: InputMessageReplyTo = None,
|
|
1691
1837
|
reply_to_message_id: int = 0,
|
|
1838
|
+
receiver_user_id: int = 0,
|
|
1839
|
+
callback_query_id: int = 0,
|
|
1692
1840
|
reply_markup: (
|
|
1693
1841
|
ReplyMarkupInlineKeyboard
|
|
1694
1842
|
| ReplyMarkupShowKeyboard
|
|
@@ -1706,20 +1854,32 @@ class Methods(TDLibFunctions):
|
|
|
1706
1854
|
):
|
|
1707
1855
|
await self.getMessage(chat_id=chat_id, message_id=reply_to.message_id)
|
|
1708
1856
|
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1857
|
+
if not receiver_user_id or callback_query_id:
|
|
1858
|
+
res = await self.sendMessage(
|
|
1859
|
+
chat_id=chat_id,
|
|
1860
|
+
topic_id=topic_id,
|
|
1861
|
+
reply_to=reply_to,
|
|
1862
|
+
options=MessageSendOptions(
|
|
1863
|
+
disable_notification=disable_notification,
|
|
1864
|
+
protect_content=protect_content,
|
|
1865
|
+
allow_paid_broadcast=allow_paid_broadcast,
|
|
1866
|
+
),
|
|
1867
|
+
reply_markup=reply_markup
|
|
1868
|
+
if isinstance(reply_markup, ReplyMarkup)
|
|
1869
|
+
else None,
|
|
1870
|
+
input_message_content=content,
|
|
1871
|
+
)
|
|
1872
|
+
else:
|
|
1873
|
+
res = await self.sendEphemeralMessage(
|
|
1874
|
+
chat_id=chat_id,
|
|
1875
|
+
topic_id=topic_id,
|
|
1876
|
+
receiver_user_id=receiver_user_id,
|
|
1877
|
+
callback_query_id=callback_query_id,
|
|
1878
|
+
reply_to=reply_to,
|
|
1879
|
+
reply_markup=reply_markup,
|
|
1880
|
+
input_message_content=content,
|
|
1881
|
+
)
|
|
1882
|
+
|
|
1723
1883
|
if isinstance(res, Error):
|
|
1724
1884
|
return res
|
|
1725
1885
|
|