telegrinder 0.1.dev160__py3-none-any.whl → 0.1.dev162__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.
Potentially problematic release.
This version of telegrinder might be problematic. Click here for more details.
- telegrinder/api/abc.py +3 -0
- telegrinder/api/api.py +7 -5
- telegrinder/api/error.py +3 -3
- telegrinder/bot/bot.py +2 -2
- telegrinder/bot/cute_types/base.py +1 -4
- telegrinder/bot/cute_types/message.py +140 -0
- telegrinder/bot/dispatch/composition.py +1 -1
- telegrinder/bot/dispatch/dispatch.py +1 -1
- telegrinder/bot/dispatch/waiter_machine/short_state.py +1 -1
- telegrinder/bot/scenario/__init__.py +2 -2
- telegrinder/bot/scenario/checkbox.py +10 -15
- telegrinder/bot/scenario/choice.py +2 -2
- telegrinder/modules.py +5 -3
- telegrinder/msgspec_json.py +3 -3
- telegrinder/msgspec_utils.py +34 -35
- telegrinder/tools/__init__.py +6 -0
- telegrinder/tools/buttons.py +8 -13
- telegrinder/tools/formatting/__init__.py +6 -0
- telegrinder/tools/formatting/html.py +10 -0
- telegrinder/tools/formatting/links.py +7 -0
- telegrinder/tools/formatting/spec_html_formats.py +27 -15
- telegrinder/tools/keyboard.py +3 -3
- telegrinder/tools/loop_wrapper/abc.py +4 -4
- telegrinder/types/enums.py +4 -0
- telegrinder/types/methods.py +175 -41
- telegrinder/types/objects.py +425 -201
- {telegrinder-0.1.dev160.dist-info → telegrinder-0.1.dev162.dist-info}/METADATA +1 -1
- {telegrinder-0.1.dev160.dist-info → telegrinder-0.1.dev162.dist-info}/RECORD +30 -30
- {telegrinder-0.1.dev160.dist-info → telegrinder-0.1.dev162.dist-info}/WHEEL +1 -1
- {telegrinder-0.1.dev160.dist-info → telegrinder-0.1.dev162.dist-info}/LICENSE +0 -0
|
@@ -194,6 +194,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
194
194
|
text: str | None = None,
|
|
195
195
|
chat_id: int | str | None = None,
|
|
196
196
|
message_thread_id: int | None = None,
|
|
197
|
+
business_connection_id: str | None = None,
|
|
197
198
|
parse_mode: str | None = None,
|
|
198
199
|
entities: list[MessageEntity] | None = None,
|
|
199
200
|
disable_notification: bool | None = None,
|
|
@@ -207,6 +208,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
207
208
|
|
|
208
209
|
Use this method to send a message with text messages. On success, the sent Message is returned.
|
|
209
210
|
|
|
211
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
212
|
+
will be sent.
|
|
213
|
+
|
|
210
214
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
211
215
|
(in the format @channelusername).
|
|
212
216
|
|
|
@@ -246,6 +250,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
246
250
|
chat_id: int | str | None = None,
|
|
247
251
|
message_id: int | None = None,
|
|
248
252
|
message_thread_id: int | None = None,
|
|
253
|
+
business_connection_id: str | None = None,
|
|
249
254
|
parse_mode: str | None = None,
|
|
250
255
|
entities: list[MessageEntity] | None = None,
|
|
251
256
|
disable_notification: bool | None = None,
|
|
@@ -259,6 +264,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
259
264
|
|
|
260
265
|
Use this method to send a reply to a message with text messages. On success, the sent Message is returned.
|
|
261
266
|
|
|
267
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
268
|
+
will be sent.
|
|
269
|
+
|
|
262
270
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
263
271
|
(in the format @channelusername).
|
|
264
272
|
|
|
@@ -639,6 +647,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
639
647
|
audio: InputFile | str,
|
|
640
648
|
chat_id: int | str | None = None,
|
|
641
649
|
message_thread_id: int | None = None,
|
|
650
|
+
business_connection_id: str | None = None,
|
|
642
651
|
caption: str | None = None,
|
|
643
652
|
parse_mode: str | None = None,
|
|
644
653
|
caption_entities: list[MessageEntity] | None = None,
|
|
@@ -660,6 +669,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
660
669
|
of up to 50 MB in size, this limit may be changed in the future. For sending
|
|
661
670
|
voice messages, use the sendVoice method instead.
|
|
662
671
|
|
|
672
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
673
|
+
will be sent.
|
|
674
|
+
|
|
663
675
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
664
676
|
(in the format @channelusername).
|
|
665
677
|
|
|
@@ -715,6 +727,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
715
727
|
animation: InputFile | str,
|
|
716
728
|
chat_id: int | str | None = None,
|
|
717
729
|
message_thread_id: int | None = None,
|
|
730
|
+
business_connection_id: str | None = None,
|
|
718
731
|
caption: str | None = None,
|
|
719
732
|
parse_mode: str | None = None,
|
|
720
733
|
caption_entities: list[MessageEntity] | None = None,
|
|
@@ -735,6 +748,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
735
748
|
sound). On success, the sent Message is returned. Bots can currently send
|
|
736
749
|
animation files of up to 50 MB in size, this limit may be changed in the future.
|
|
737
750
|
|
|
751
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
752
|
+
will be sent.
|
|
753
|
+
|
|
738
754
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
739
755
|
(in the format @channelusername).
|
|
740
756
|
|
|
@@ -793,6 +809,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
793
809
|
document: InputFile | str,
|
|
794
810
|
chat_id: int | str | None = None,
|
|
795
811
|
message_thread_id: int | None = None,
|
|
812
|
+
business_connection_id: str | None = None,
|
|
796
813
|
caption: str | None = None,
|
|
797
814
|
parse_mode: str | None = None,
|
|
798
815
|
caption_entities: list[MessageEntity] | None = None,
|
|
@@ -810,6 +827,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
810
827
|
Bots can currently send files of any type of up to 50 MB in size, this limit
|
|
811
828
|
may be changed in the future.
|
|
812
829
|
|
|
830
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
831
|
+
will be sent.
|
|
832
|
+
|
|
813
833
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
814
834
|
(in the format @channelusername).
|
|
815
835
|
|
|
@@ -863,6 +883,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
863
883
|
photo: InputFile | str,
|
|
864
884
|
chat_id: int | str | None = None,
|
|
865
885
|
message_thread_id: int | None = None,
|
|
886
|
+
business_connection_id: str | None = None,
|
|
866
887
|
caption: str | None = None,
|
|
867
888
|
parse_mode: str | None = None,
|
|
868
889
|
caption_entities: list[MessageEntity] | None = None,
|
|
@@ -877,6 +898,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
877
898
|
|
|
878
899
|
Use this method to send photos. On success, the sent Message is returned.
|
|
879
900
|
|
|
901
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
902
|
+
will be sent.
|
|
903
|
+
|
|
880
904
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
881
905
|
(in the format @channelusername).
|
|
882
906
|
|
|
@@ -924,6 +948,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
924
948
|
chat_id: int | str | None = None,
|
|
925
949
|
emoji: str | None = None,
|
|
926
950
|
message_thread_id: int | None = None,
|
|
951
|
+
business_connection_id: str | None = None,
|
|
927
952
|
disable_notification: bool | None = None,
|
|
928
953
|
protect_content: bool | None = None,
|
|
929
954
|
reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
|
|
@@ -935,6 +960,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
935
960
|
Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers.
|
|
936
961
|
On success, the sent Message is returned.
|
|
937
962
|
|
|
963
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
964
|
+
will be sent.
|
|
965
|
+
|
|
938
966
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
939
967
|
(in the format @channelusername).
|
|
940
968
|
|
|
@@ -972,6 +1000,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
972
1000
|
video: InputFile | str,
|
|
973
1001
|
chat_id: int | str | None = None,
|
|
974
1002
|
message_thread_id: int | None = None,
|
|
1003
|
+
business_connection_id: str | None = None,
|
|
975
1004
|
caption: str | None = None,
|
|
976
1005
|
parse_mode: str | None = None,
|
|
977
1006
|
caption_entities: list[MessageEntity] | None = None,
|
|
@@ -994,6 +1023,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
994
1023
|
returned. Bots can currently send video files of up to 50 MB in size, this
|
|
995
1024
|
limit may be changed in the future.
|
|
996
1025
|
|
|
1026
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1027
|
+
will be sent.
|
|
1028
|
+
|
|
997
1029
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
998
1030
|
(in the format @channelusername).
|
|
999
1031
|
|
|
@@ -1053,6 +1085,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1053
1085
|
self,
|
|
1054
1086
|
video_note: InputFile | str,
|
|
1055
1087
|
chat_id: int | str | None = None,
|
|
1088
|
+
business_connection_id: str | None = None,
|
|
1056
1089
|
duration: int | None = None,
|
|
1057
1090
|
length: int | None = None,
|
|
1058
1091
|
message_thread_id: int | None = None,
|
|
@@ -1069,6 +1102,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1069
1102
|
to 1 minute long. Use this method to send video messages. On success, the
|
|
1070
1103
|
sent Message is returned.
|
|
1071
1104
|
|
|
1105
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1106
|
+
will be sent.
|
|
1107
|
+
|
|
1072
1108
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1073
1109
|
(in the format @channelusername).
|
|
1074
1110
|
|
|
@@ -1114,6 +1150,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1114
1150
|
voice: InputFile | str,
|
|
1115
1151
|
chat_id: int | str | None = None,
|
|
1116
1152
|
message_thread_id: int | None = None,
|
|
1153
|
+
business_connection_id: str | None = None,
|
|
1117
1154
|
caption: str | None = None,
|
|
1118
1155
|
parse_mode: str | None = None,
|
|
1119
1156
|
caption_entities: list[MessageEntity] | None = None,
|
|
@@ -1132,6 +1169,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1132
1169
|
On success, the sent Message is returned. Bots can currently send voice
|
|
1133
1170
|
messages of up to 50 MB in size, this limit may be changed in the future.
|
|
1134
1171
|
|
|
1172
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1173
|
+
will be sent.
|
|
1174
|
+
|
|
1135
1175
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1136
1176
|
(in the format @channelusername).
|
|
1137
1177
|
|
|
@@ -1175,6 +1215,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1175
1215
|
question: str,
|
|
1176
1216
|
options: list[str],
|
|
1177
1217
|
chat_id: int | str | None = None,
|
|
1218
|
+
business_connection_id: str | None = None,
|
|
1178
1219
|
message_thread_id: int | None = None,
|
|
1179
1220
|
is_anonymous: bool | None = None,
|
|
1180
1221
|
type: typing.Literal["quiz", "regular"] | None = None,
|
|
@@ -1196,6 +1237,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1196
1237
|
|
|
1197
1238
|
Use this method to send a native poll. On success, the sent Message is returned.
|
|
1198
1239
|
|
|
1240
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1241
|
+
will be sent.
|
|
1242
|
+
|
|
1199
1243
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1200
1244
|
(in the format @channelusername).
|
|
1201
1245
|
|
|
@@ -1261,6 +1305,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1261
1305
|
title: str,
|
|
1262
1306
|
address: str,
|
|
1263
1307
|
chat_id: int | str | None = None,
|
|
1308
|
+
business_connection_id: str | None = None,
|
|
1264
1309
|
message_thread_id: int | None = None,
|
|
1265
1310
|
foursquare_id: str | None = None,
|
|
1266
1311
|
foursquare_type: str | None = None,
|
|
@@ -1277,6 +1322,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1277
1322
|
Use this method to send information about a venue. On success, the sent Message
|
|
1278
1323
|
is returned.
|
|
1279
1324
|
|
|
1325
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1326
|
+
will be sent.
|
|
1327
|
+
|
|
1280
1328
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1281
1329
|
(in the format @channelusername).
|
|
1282
1330
|
|
|
@@ -1321,6 +1369,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1321
1369
|
self,
|
|
1322
1370
|
emoji: DiceEmoji | None = None,
|
|
1323
1371
|
chat_id: int | str | None = None,
|
|
1372
|
+
business_connection_id: str | None = None,
|
|
1324
1373
|
message_thread_id: int | None = None,
|
|
1325
1374
|
disable_notification: bool | None = None,
|
|
1326
1375
|
protect_content: bool | None = None,
|
|
@@ -1333,6 +1382,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1333
1382
|
Use this method to send an animated emoji that will display a random value.
|
|
1334
1383
|
On success, the sent Message is returned.
|
|
1335
1384
|
|
|
1385
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1386
|
+
will be sent.
|
|
1387
|
+
|
|
1336
1388
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1337
1389
|
(in the format @channelusername).
|
|
1338
1390
|
|
|
@@ -1363,6 +1415,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1363
1415
|
async def answer_game(
|
|
1364
1416
|
self,
|
|
1365
1417
|
chat_id: int | str | None = None,
|
|
1418
|
+
business_connection_id: str | None = None,
|
|
1366
1419
|
message_thread_id: int | None = None,
|
|
1367
1420
|
game_short_name: str | None = None,
|
|
1368
1421
|
disable_notification: bool | None = None,
|
|
@@ -1375,6 +1428,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1375
1428
|
|
|
1376
1429
|
Use this method to send a game. On success, the sent Message is returned.
|
|
1377
1430
|
|
|
1431
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1432
|
+
will be sent.
|
|
1433
|
+
|
|
1378
1434
|
:param chat_id: Unique identifier for the target chat.
|
|
1379
1435
|
|
|
1380
1436
|
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
|
|
@@ -1408,6 +1464,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1408
1464
|
currency: str,
|
|
1409
1465
|
prices: list[LabeledPrice],
|
|
1410
1466
|
chat_id: int | str | None = None,
|
|
1467
|
+
business_connection_id: str | None = None,
|
|
1411
1468
|
message_thread_id: int | None = None,
|
|
1412
1469
|
max_tip_amount: int | None = None,
|
|
1413
1470
|
suggested_tip_amounts: list[int] | None = None,
|
|
@@ -1434,6 +1491,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1434
1491
|
|
|
1435
1492
|
Use this method to send invoices. On success, the sent Message is returned.
|
|
1436
1493
|
|
|
1494
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1495
|
+
will be sent.
|
|
1496
|
+
|
|
1437
1497
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1438
1498
|
(in the format @channelusername).
|
|
1439
1499
|
|
|
@@ -1519,6 +1579,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1519
1579
|
self,
|
|
1520
1580
|
action: ChatAction,
|
|
1521
1581
|
chat_id: int | str | None = None,
|
|
1582
|
+
business_connection_id: str | None = None,
|
|
1522
1583
|
message_thread_id: int | None = None,
|
|
1523
1584
|
**other: typing.Any,
|
|
1524
1585
|
) -> Result[bool, APIError]:
|
|
@@ -1530,6 +1591,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1530
1591
|
on success. We only recommend using this method when a response from the
|
|
1531
1592
|
bot will take a noticeable amount of time to arrive.
|
|
1532
1593
|
|
|
1594
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1595
|
+
will be sent.
|
|
1596
|
+
|
|
1533
1597
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1534
1598
|
(in the format @channelusername).
|
|
1535
1599
|
|
|
@@ -1552,6 +1616,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1552
1616
|
self,
|
|
1553
1617
|
media: list[InputMedia | tuple[MediaType, InputFile | str]],
|
|
1554
1618
|
chat_id: int | str | None = None,
|
|
1619
|
+
business_connection_id: str | None = None,
|
|
1555
1620
|
message_thread_id: int | None = None,
|
|
1556
1621
|
caption: str | None = None,
|
|
1557
1622
|
parse_mode: str | None = None,
|
|
@@ -1567,6 +1632,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1567
1632
|
an album. Documents and audio files can be only grouped in an album with messages
|
|
1568
1633
|
of the same type. On success, an array of Messages that were sent is returned.
|
|
1569
1634
|
|
|
1635
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1636
|
+
will be sent.
|
|
1637
|
+
|
|
1570
1638
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1571
1639
|
(in the format @channelusername).
|
|
1572
1640
|
|
|
@@ -1617,6 +1685,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1617
1685
|
longitude: float,
|
|
1618
1686
|
chat_id: int | str | None = None,
|
|
1619
1687
|
message_thread_id: int | None = None,
|
|
1688
|
+
business_connection_id: str | None = None,
|
|
1620
1689
|
horizontal_accuracy: float | None = None,
|
|
1621
1690
|
heading: int | None = None,
|
|
1622
1691
|
live_period: int | None = None,
|
|
@@ -1631,6 +1700,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1631
1700
|
|
|
1632
1701
|
Use this method to send point on the map. On success, the sent Message is returned.
|
|
1633
1702
|
|
|
1703
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1704
|
+
will be sent.
|
|
1705
|
+
|
|
1634
1706
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1635
1707
|
(in the format @channelusername).
|
|
1636
1708
|
|
|
@@ -1676,6 +1748,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1676
1748
|
last_name: str | None = None,
|
|
1677
1749
|
vcard: str | None = None,
|
|
1678
1750
|
chat_id: int | str | None = None,
|
|
1751
|
+
business_connection_id: str | None = None,
|
|
1679
1752
|
message_thread_id: int | None = None,
|
|
1680
1753
|
disable_notification: bool | None = None,
|
|
1681
1754
|
protect_content: bool | None = None,
|
|
@@ -1687,6 +1760,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1687
1760
|
|
|
1688
1761
|
Use this method to send phone contacts. On success, the sent Message is returned.
|
|
1689
1762
|
|
|
1763
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1764
|
+
will be sent.
|
|
1765
|
+
|
|
1690
1766
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1691
1767
|
(in the format @channelusername).
|
|
1692
1768
|
|
|
@@ -1722,6 +1798,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1722
1798
|
self,
|
|
1723
1799
|
audio: InputFile | str,
|
|
1724
1800
|
chat_id: int | str | None = None,
|
|
1801
|
+
business_connection_id: str | None = None,
|
|
1725
1802
|
message_thread_id: int | None = None,
|
|
1726
1803
|
caption: str | None = None,
|
|
1727
1804
|
parse_mode: str | None = None,
|
|
@@ -1744,6 +1821,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1744
1821
|
of up to 50 MB in size, this limit may be changed in the future. For sending
|
|
1745
1822
|
voice messages, use the sendVoice method instead.
|
|
1746
1823
|
|
|
1824
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1825
|
+
will be sent.
|
|
1826
|
+
|
|
1747
1827
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1748
1828
|
(in the format @channelusername).
|
|
1749
1829
|
|
|
@@ -1798,6 +1878,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1798
1878
|
self,
|
|
1799
1879
|
animation: InputFile | str,
|
|
1800
1880
|
chat_id: int | str | None = None,
|
|
1881
|
+
business_connection_id: str | None = None,
|
|
1801
1882
|
message_thread_id: int | None = None,
|
|
1802
1883
|
caption: str | None = None,
|
|
1803
1884
|
parse_mode: str | None = None,
|
|
@@ -1819,6 +1900,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1819
1900
|
sound). On success, the sent Message is returned. Bots can currently send
|
|
1820
1901
|
animation files of up to 50 MB in size, this limit may be changed in the future.
|
|
1821
1902
|
|
|
1903
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1904
|
+
will be sent.
|
|
1905
|
+
|
|
1822
1906
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1823
1907
|
(in the format @channelusername).
|
|
1824
1908
|
|
|
@@ -1876,6 +1960,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1876
1960
|
self,
|
|
1877
1961
|
document: InputFile | str,
|
|
1878
1962
|
chat_id: int | str | None = None,
|
|
1963
|
+
business_connection_id: str | None = None,
|
|
1879
1964
|
message_thread_id: int | None = None,
|
|
1880
1965
|
caption: str | None = None,
|
|
1881
1966
|
parse_mode: str | None = None,
|
|
@@ -1894,6 +1979,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1894
1979
|
Bots can currently send files of any type of up to 50 MB in size, this limit
|
|
1895
1980
|
may be changed in the future.
|
|
1896
1981
|
|
|
1982
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
1983
|
+
will be sent.
|
|
1984
|
+
|
|
1897
1985
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1898
1986
|
(in the format @channelusername).
|
|
1899
1987
|
|
|
@@ -1946,6 +2034,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1946
2034
|
self,
|
|
1947
2035
|
photo: InputFile | str,
|
|
1948
2036
|
chat_id: int | str | None = None,
|
|
2037
|
+
business_connection_id: str | None = None,
|
|
1949
2038
|
message_thread_id: int | None = None,
|
|
1950
2039
|
caption: str | None = None,
|
|
1951
2040
|
parse_mode: str | None = None,
|
|
@@ -1961,6 +2050,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
1961
2050
|
|
|
1962
2051
|
Use this method to send a reply to a message with photos. On success, the sent Message is returned.
|
|
1963
2052
|
|
|
2053
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2054
|
+
will be sent.
|
|
2055
|
+
|
|
1964
2056
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
1965
2057
|
(in the format @channelusername).
|
|
1966
2058
|
|
|
@@ -2006,6 +2098,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2006
2098
|
self,
|
|
2007
2099
|
sticker: InputFile | str,
|
|
2008
2100
|
chat_id: int | str | None = None,
|
|
2101
|
+
business_connection_id: str | None = None,
|
|
2009
2102
|
emoji: str | None = None,
|
|
2010
2103
|
message_thread_id: int | None = None,
|
|
2011
2104
|
disable_notification: bool | None = None,
|
|
@@ -2019,6 +2112,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2019
2112
|
Use this method to send a reply to a message with static .WEBP, animated .TGS, or video .WEBM stickers.
|
|
2020
2113
|
On success, the sent Message is returned.
|
|
2021
2114
|
|
|
2115
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2116
|
+
will be sent.
|
|
2117
|
+
|
|
2022
2118
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2023
2119
|
(in the format @channelusername).
|
|
2024
2120
|
|
|
@@ -2055,6 +2151,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2055
2151
|
self,
|
|
2056
2152
|
video: InputFile | str,
|
|
2057
2153
|
chat_id: int | str | None = None,
|
|
2154
|
+
business_connection_id: str | None = None,
|
|
2058
2155
|
message_thread_id: int | None = None,
|
|
2059
2156
|
caption: str | None = None,
|
|
2060
2157
|
parse_mode: str | None = None,
|
|
@@ -2078,6 +2175,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2078
2175
|
returned. Bots can currently send video files of up to 50 MB in size, this
|
|
2079
2176
|
limit may be changed in the future.
|
|
2080
2177
|
|
|
2178
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2179
|
+
will be sent.
|
|
2180
|
+
|
|
2081
2181
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2082
2182
|
(in the format @channelusername).
|
|
2083
2183
|
|
|
@@ -2139,6 +2239,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2139
2239
|
chat_id: int | str | None = None,
|
|
2140
2240
|
duration: int | None = None,
|
|
2141
2241
|
length: int | None = None,
|
|
2242
|
+
business_connection_id: str | None = None,
|
|
2142
2243
|
message_thread_id: int | None = None,
|
|
2143
2244
|
thumbnail: InputFile | str | None = None,
|
|
2144
2245
|
disable_notification: bool | None = None,
|
|
@@ -2153,6 +2254,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2153
2254
|
to 1 minute long. Use this method to send a reply to a message with video messages. On success, the
|
|
2154
2255
|
sent Message is returned.
|
|
2155
2256
|
|
|
2257
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2258
|
+
will be sent.
|
|
2259
|
+
|
|
2156
2260
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2157
2261
|
(in the format @channelusername).
|
|
2158
2262
|
|
|
@@ -2197,6 +2301,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2197
2301
|
self,
|
|
2198
2302
|
voice: InputFile | str,
|
|
2199
2303
|
chat_id: int | str | None = None,
|
|
2304
|
+
business_connection_id: str | None = None,
|
|
2200
2305
|
message_thread_id: int | None = None,
|
|
2201
2306
|
caption: str | None = None,
|
|
2202
2307
|
parse_mode: str | None = None,
|
|
@@ -2216,6 +2321,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2216
2321
|
On success, the sent Message is returned. Bots can currently send voice
|
|
2217
2322
|
messages of up to 50 MB in size, this limit may be changed in the future.
|
|
2218
2323
|
|
|
2324
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2325
|
+
will be sent.
|
|
2326
|
+
|
|
2219
2327
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2220
2328
|
(in the format @channelusername).
|
|
2221
2329
|
|
|
@@ -2259,6 +2367,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2259
2367
|
question: str,
|
|
2260
2368
|
options: list[str],
|
|
2261
2369
|
chat_id: int | str | None = None,
|
|
2370
|
+
business_connection_id: str | None = None,
|
|
2262
2371
|
message_thread_id: int | None = None,
|
|
2263
2372
|
is_anonymous: bool | None = None,
|
|
2264
2373
|
type: typing.Literal["quiz", "regular"] | None = None,
|
|
@@ -2280,6 +2389,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2280
2389
|
|
|
2281
2390
|
Use this method to send a reply to a message with a native poll. On success, the sent Message is returned.
|
|
2282
2391
|
|
|
2392
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2393
|
+
will be sent.
|
|
2394
|
+
|
|
2283
2395
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2284
2396
|
(in the format @channelusername).
|
|
2285
2397
|
|
|
@@ -2345,6 +2457,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2345
2457
|
title: str,
|
|
2346
2458
|
address: str,
|
|
2347
2459
|
chat_id: int | str | None = None,
|
|
2460
|
+
business_connection_id: str | None = None,
|
|
2348
2461
|
message_thread_id: int | None = None,
|
|
2349
2462
|
foursquare_id: str | None = None,
|
|
2350
2463
|
foursquare_type: str | None = None,
|
|
@@ -2361,6 +2474,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2361
2474
|
Use this method to send a reply to a message with information about a venue. On success, the sent Message
|
|
2362
2475
|
is returned.
|
|
2363
2476
|
|
|
2477
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2478
|
+
will be sent.
|
|
2479
|
+
|
|
2364
2480
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2365
2481
|
(in the format @channelusername).
|
|
2366
2482
|
|
|
@@ -2404,6 +2520,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2404
2520
|
async def reply_dice(
|
|
2405
2521
|
self,
|
|
2406
2522
|
chat_id: int | str | None = None,
|
|
2523
|
+
business_connection_id: str | None = None,
|
|
2407
2524
|
message_thread_id: int | None = None,
|
|
2408
2525
|
emoji: DiceEmoji | None = None,
|
|
2409
2526
|
disable_notification: bool | None = None,
|
|
@@ -2417,6 +2534,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2417
2534
|
Use this method to send a reply to a message with an animated emoji that will display a random value.
|
|
2418
2535
|
On success, the sent Message is returned.
|
|
2419
2536
|
|
|
2537
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2538
|
+
will be sent.
|
|
2539
|
+
|
|
2420
2540
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2421
2541
|
(in the format @channelusername).
|
|
2422
2542
|
|
|
@@ -2447,6 +2567,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2447
2567
|
async def reply_game(
|
|
2448
2568
|
self,
|
|
2449
2569
|
chat_id: int | str | None = None,
|
|
2570
|
+
business_connection_id: str | None = None,
|
|
2450
2571
|
message_thread_id: int | None = None,
|
|
2451
2572
|
game_short_name: str | None = None,
|
|
2452
2573
|
disable_notification: bool | None = None,
|
|
@@ -2459,6 +2580,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2459
2580
|
|
|
2460
2581
|
Use this method to send a reply to a message with a game. On success, the sent Message is returned.
|
|
2461
2582
|
|
|
2583
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2584
|
+
will be sent.
|
|
2585
|
+
|
|
2462
2586
|
:param chat_id: Unique identifier for the target chat.
|
|
2463
2587
|
|
|
2464
2588
|
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
|
|
@@ -2492,6 +2616,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2492
2616
|
currency: str,
|
|
2493
2617
|
prices: list[LabeledPrice],
|
|
2494
2618
|
chat_id: int | str | None = None,
|
|
2619
|
+
business_connection_id: str | None = None,
|
|
2495
2620
|
message_thread_id: int | None = None,
|
|
2496
2621
|
max_tip_amount: int | None = None,
|
|
2497
2622
|
suggested_tip_amounts: list[int] | None = None,
|
|
@@ -2518,6 +2643,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2518
2643
|
|
|
2519
2644
|
Use this method to send a reply to a message with invoices. On success, the sent Message is returned.
|
|
2520
2645
|
|
|
2646
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2647
|
+
will be sent.
|
|
2648
|
+
|
|
2521
2649
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2522
2650
|
(in the format @channelusername).
|
|
2523
2651
|
|
|
@@ -2609,6 +2737,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2609
2737
|
self,
|
|
2610
2738
|
media: list[InputMedia | tuple[MediaType, InputFile | str]],
|
|
2611
2739
|
chat_id: int | str | None = None,
|
|
2740
|
+
business_connection_id: str | None = None,
|
|
2612
2741
|
message_thread_id: int | None = None,
|
|
2613
2742
|
caption: str | None = None,
|
|
2614
2743
|
parse_mode: str | None = None,
|
|
@@ -2624,6 +2753,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2624
2753
|
an album. Documents and audio files can be only grouped in an album with messages
|
|
2625
2754
|
of the same type. On success, an array of Messages that were sent is returned.
|
|
2626
2755
|
|
|
2756
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2757
|
+
will be sent.
|
|
2758
|
+
|
|
2627
2759
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2628
2760
|
(in the format @channelusername).
|
|
2629
2761
|
|
|
@@ -2661,6 +2793,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2661
2793
|
latitude: float,
|
|
2662
2794
|
longitude: float,
|
|
2663
2795
|
chat_id: int | str | None = None,
|
|
2796
|
+
business_connection_id: str | None = None,
|
|
2664
2797
|
message_thread_id: int | None = None,
|
|
2665
2798
|
horizontal_accuracy: float | None = None,
|
|
2666
2799
|
heading: int | None = None,
|
|
@@ -2676,6 +2809,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2676
2809
|
|
|
2677
2810
|
Use this method to send a reply to a message with point on the map. On success, the sent Message is returned.
|
|
2678
2811
|
|
|
2812
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2813
|
+
will be sent.
|
|
2814
|
+
|
|
2679
2815
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2680
2816
|
(in the format @channelusername).
|
|
2681
2817
|
|
|
@@ -2721,6 +2857,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2721
2857
|
last_name: str | None = None,
|
|
2722
2858
|
vcard: str | None = None,
|
|
2723
2859
|
chat_id: int | str | None = None,
|
|
2860
|
+
business_connection_id: str | None = None,
|
|
2724
2861
|
message_thread_id: int | None = None,
|
|
2725
2862
|
disable_notification: bool | None = None,
|
|
2726
2863
|
protect_content: bool | None = None,
|
|
@@ -2732,6 +2869,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
|
|
|
2732
2869
|
|
|
2733
2870
|
Use this method to send a reply to a message with phone contacts. On success, the sent Message is returned.
|
|
2734
2871
|
|
|
2872
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the message \
|
|
2873
|
+
will be sent.
|
|
2874
|
+
|
|
2735
2875
|
:param chat_id: Unique identifier for the target chat or username of the target channel \
|
|
2736
2876
|
(in the format @channelusername).
|
|
2737
2877
|
|
|
@@ -37,7 +37,7 @@ class Composition:
|
|
|
37
37
|
return None
|
|
38
38
|
return NodeCollection(nodes)
|
|
39
39
|
|
|
40
|
-
async def __call__(self, **kwargs) -> typing.Any:
|
|
40
|
+
async def __call__(self, **kwargs: typing.Any) -> typing.Any:
|
|
41
41
|
return await self.func(**magic_bundle(self.func, kwargs, start_idx=0, bundle_ctx=False)) # type: ignore
|
|
42
42
|
|
|
43
43
|
|
|
@@ -11,7 +11,7 @@ if typing.TYPE_CHECKING:
|
|
|
11
11
|
from .machine import Identificator
|
|
12
12
|
|
|
13
13
|
EventModel = typing.TypeVar("EventModel", bound=BaseCute)
|
|
14
|
-
Behaviour = ABCHandler | None
|
|
14
|
+
Behaviour: typing.TypeAlias = ABCHandler | None
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class ShortState(typing.Generic[EventModel]):
|