telegrinder 0.1.dev159__py3-none-any.whl → 0.1.dev161__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/__init__.py +4 -2
- telegrinder/api/__init__.py +0 -0
- telegrinder/api/abc.py +5 -0
- telegrinder/api/api.py +4 -4
- telegrinder/api/error.py +0 -0
- telegrinder/api/response.py +0 -0
- telegrinder/bot/__init__.py +0 -0
- telegrinder/bot/bot.py +0 -0
- telegrinder/bot/cute_types/__init__.py +0 -0
- telegrinder/bot/cute_types/base.py +0 -0
- telegrinder/bot/cute_types/callback_query.py +81 -85
- telegrinder/bot/cute_types/inline_query.py +36 -9
- telegrinder/bot/cute_types/message.py +524 -568
- telegrinder/bot/cute_types/update.py +0 -0
- telegrinder/bot/cute_types/utils.py +201 -453
- telegrinder/bot/dispatch/__init__.py +0 -0
- telegrinder/bot/dispatch/abc.py +0 -0
- telegrinder/bot/dispatch/composition.py +0 -0
- telegrinder/bot/dispatch/context.py +0 -0
- telegrinder/bot/dispatch/dispatch.py +0 -0
- telegrinder/bot/dispatch/handler/__init__.py +0 -0
- telegrinder/bot/dispatch/handler/abc.py +0 -0
- telegrinder/bot/dispatch/handler/func.py +1 -1
- telegrinder/bot/dispatch/handler/message_reply.py +0 -0
- telegrinder/bot/dispatch/middleware/__init__.py +0 -0
- telegrinder/bot/dispatch/middleware/abc.py +0 -0
- telegrinder/bot/dispatch/process.py +0 -0
- telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
- telegrinder/bot/dispatch/return_manager/abc.py +0 -0
- telegrinder/bot/dispatch/return_manager/callback_query.py +0 -0
- telegrinder/bot/dispatch/return_manager/inline_query.py +0 -0
- telegrinder/bot/dispatch/return_manager/message.py +0 -0
- telegrinder/bot/dispatch/view/__init__.py +0 -0
- telegrinder/bot/dispatch/view/abc.py +20 -16
- telegrinder/bot/dispatch/view/box.py +0 -0
- telegrinder/bot/dispatch/view/callback_query.py +0 -0
- telegrinder/bot/dispatch/view/inline_query.py +0 -0
- telegrinder/bot/dispatch/view/message.py +0 -0
- telegrinder/bot/dispatch/waiter_machine/__init__.py +0 -0
- telegrinder/bot/dispatch/waiter_machine/machine.py +0 -0
- telegrinder/bot/dispatch/waiter_machine/middleware.py +0 -0
- telegrinder/bot/dispatch/waiter_machine/short_state.py +0 -0
- telegrinder/bot/polling/__init__.py +0 -0
- telegrinder/bot/polling/abc.py +0 -0
- telegrinder/bot/polling/polling.py +7 -11
- telegrinder/bot/rules/__init__.py +0 -0
- telegrinder/bot/rules/abc.py +1 -1
- telegrinder/bot/rules/adapter/__init__.py +0 -0
- telegrinder/bot/rules/adapter/abc.py +0 -0
- telegrinder/bot/rules/adapter/errors.py +0 -0
- telegrinder/bot/rules/adapter/event.py +0 -0
- telegrinder/bot/rules/adapter/raw_update.py +0 -0
- telegrinder/bot/rules/callback_data.py +3 -11
- telegrinder/bot/rules/command.py +0 -0
- telegrinder/bot/rules/enum_text.py +0 -0
- telegrinder/bot/rules/func.py +0 -0
- telegrinder/bot/rules/fuzzy.py +0 -0
- telegrinder/bot/rules/inline.py +2 -1
- telegrinder/bot/rules/integer.py +0 -0
- telegrinder/bot/rules/is_from.py +0 -0
- telegrinder/bot/rules/markup.py +3 -1
- telegrinder/bot/rules/mention.py +0 -0
- telegrinder/bot/rules/message_entities.py +3 -1
- telegrinder/bot/rules/regex.py +1 -1
- telegrinder/bot/rules/rule_enum.py +0 -0
- telegrinder/bot/rules/start.py +0 -0
- telegrinder/bot/rules/text.py +0 -0
- telegrinder/bot/scenario/__init__.py +2 -2
- telegrinder/bot/scenario/abc.py +0 -0
- telegrinder/bot/scenario/checkbox.py +9 -13
- telegrinder/bot/scenario/choice.py +2 -2
- telegrinder/client/__init__.py +0 -0
- telegrinder/client/abc.py +0 -0
- telegrinder/client/aiohttp.py +0 -0
- telegrinder/model.py +35 -36
- telegrinder/modules.py +21 -11
- telegrinder/msgspec_json.py +0 -0
- telegrinder/msgspec_utils.py +2 -2
- telegrinder/node/__init__.py +0 -0
- telegrinder/node/attachment.py +0 -0
- telegrinder/node/base.py +0 -0
- telegrinder/node/composer.py +0 -0
- telegrinder/node/container.py +0 -0
- telegrinder/node/message.py +0 -0
- telegrinder/node/rule.py +0 -0
- telegrinder/node/source.py +0 -0
- telegrinder/node/text.py +0 -0
- telegrinder/node/tools/__init__.py +0 -0
- telegrinder/node/tools/generator.py +0 -0
- telegrinder/node/update.py +0 -0
- telegrinder/rules.py +0 -0
- telegrinder/tools/__init__.py +2 -3
- telegrinder/tools/buttons.py +0 -0
- telegrinder/tools/error_handler/__init__.py +2 -0
- telegrinder/tools/error_handler/abc.py +5 -1
- telegrinder/tools/error_handler/error.py +10 -0
- telegrinder/tools/error_handler/error_handler.py +100 -81
- telegrinder/tools/formatting/__init__.py +0 -0
- telegrinder/tools/formatting/html.py +0 -0
- telegrinder/tools/formatting/links.py +0 -0
- telegrinder/tools/formatting/spec_html_formats.py +0 -0
- telegrinder/tools/global_context/__init__.py +0 -0
- telegrinder/tools/global_context/abc.py +0 -0
- telegrinder/tools/global_context/global_context.py +65 -67
- telegrinder/tools/global_context/telegrinder_ctx.py +0 -0
- telegrinder/tools/i18n/__init__.py +0 -0
- telegrinder/tools/i18n/base.py +0 -0
- telegrinder/tools/i18n/middleware/__init__.py +0 -0
- telegrinder/tools/i18n/middleware/base.py +0 -0
- telegrinder/tools/i18n/simple.py +0 -0
- telegrinder/tools/kb_set/__init__.py +0 -0
- telegrinder/tools/kb_set/base.py +0 -0
- telegrinder/tools/kb_set/yaml.py +3 -3
- telegrinder/tools/keyboard.py +17 -26
- telegrinder/tools/loop_wrapper/__init__.py +0 -0
- telegrinder/tools/loop_wrapper/abc.py +0 -0
- telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -0
- telegrinder/tools/magic.py +1 -1
- telegrinder/tools/parse_mode.py +0 -0
- telegrinder/types/__init__.py +0 -0
- telegrinder/types/enums.py +2 -0
- telegrinder/types/methods.py +477 -526
- telegrinder/types/objects.py +209 -97
- {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/LICENSE +0 -0
- {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/METADATA +9 -8
- {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/RECORD +38 -37
- {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/WHEEL +1 -1
telegrinder/types/objects.py
CHANGED
|
@@ -12,7 +12,8 @@ class ReactionType(Model):
|
|
|
12
12
|
|
|
13
13
|
This object describes the type of a reaction. Currently, it can be one of
|
|
14
14
|
- ReactionTypeEmoji
|
|
15
|
-
- ReactionTypeCustomEmoji
|
|
15
|
+
- ReactionTypeCustomEmoji
|
|
16
|
+
"""
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
class PassportElementError(Model):
|
|
@@ -27,7 +28,8 @@ class PassportElementError(Model):
|
|
|
27
28
|
- PassportElementErrorFiles
|
|
28
29
|
- PassportElementErrorTranslationFile
|
|
29
30
|
- PassportElementErrorTranslationFiles
|
|
30
|
-
- PassportElementErrorUnspecified
|
|
31
|
+
- PassportElementErrorUnspecified
|
|
32
|
+
"""
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
class MessageOrigin(Model):
|
|
@@ -37,7 +39,8 @@ class MessageOrigin(Model):
|
|
|
37
39
|
- MessageOriginUser
|
|
38
40
|
- MessageOriginHiddenUser
|
|
39
41
|
- MessageOriginChat
|
|
40
|
-
- MessageOriginChannel
|
|
42
|
+
- MessageOriginChannel
|
|
43
|
+
"""
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
class MaybeInaccessibleMessage(Model):
|
|
@@ -45,7 +48,8 @@ class MaybeInaccessibleMessage(Model):
|
|
|
45
48
|
|
|
46
49
|
This object describes a message that can be inaccessible to the bot. It can be one of
|
|
47
50
|
- Message
|
|
48
|
-
- InaccessibleMessage
|
|
51
|
+
- InaccessibleMessage
|
|
52
|
+
"""
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
class MenuButton(Model):
|
|
@@ -67,7 +71,8 @@ class InputMessageContent(Model):
|
|
|
67
71
|
- InputLocationMessageContent
|
|
68
72
|
- InputVenueMessageContent
|
|
69
73
|
- InputContactMessageContent
|
|
70
|
-
- InputInvoiceMessageContent
|
|
74
|
+
- InputInvoiceMessageContent
|
|
75
|
+
"""
|
|
71
76
|
|
|
72
77
|
|
|
73
78
|
class InputMedia(Model):
|
|
@@ -78,7 +83,8 @@ class InputMedia(Model):
|
|
|
78
83
|
- InputMediaDocument
|
|
79
84
|
- InputMediaAudio
|
|
80
85
|
- InputMediaPhoto
|
|
81
|
-
- InputMediaVideo
|
|
86
|
+
- InputMediaVideo
|
|
87
|
+
"""
|
|
82
88
|
|
|
83
89
|
|
|
84
90
|
class InlineQueryResult(Model):
|
|
@@ -118,7 +124,8 @@ class ChatMember(Model):
|
|
|
118
124
|
- ChatMemberMember
|
|
119
125
|
- ChatMemberRestricted
|
|
120
126
|
- ChatMemberLeft
|
|
121
|
-
- ChatMemberBanned
|
|
127
|
+
- ChatMemberBanned
|
|
128
|
+
"""
|
|
122
129
|
|
|
123
130
|
|
|
124
131
|
class ChatBoostSource(Model):
|
|
@@ -127,7 +134,8 @@ class ChatBoostSource(Model):
|
|
|
127
134
|
This object describes the source of a chat boost. It can be one of
|
|
128
135
|
- ChatBoostSourcePremium
|
|
129
136
|
- ChatBoostSourceGiftCode
|
|
130
|
-
- ChatBoostSourceGiveaway
|
|
137
|
+
- ChatBoostSourceGiveaway
|
|
138
|
+
"""
|
|
131
139
|
|
|
132
140
|
|
|
133
141
|
class BotCommandScope(Model):
|
|
@@ -140,14 +148,16 @@ class BotCommandScope(Model):
|
|
|
140
148
|
- BotCommandScopeAllChatAdministrators
|
|
141
149
|
- BotCommandScopeChat
|
|
142
150
|
- BotCommandScopeChatAdministrators
|
|
143
|
-
- BotCommandScopeChatMember
|
|
151
|
+
- BotCommandScopeChatMember
|
|
152
|
+
"""
|
|
144
153
|
|
|
145
154
|
|
|
146
155
|
class Update(Model):
|
|
147
156
|
"""Object `Update`, see the [documentation](https://core.telegram.org/bots/api#update)
|
|
148
157
|
|
|
149
158
|
This object represents an incoming update.
|
|
150
|
-
At most one of the optional parameters can be present in any given update.
|
|
159
|
+
At most one of the optional parameters can be present in any given update.
|
|
160
|
+
"""
|
|
151
161
|
|
|
152
162
|
update_id: int
|
|
153
163
|
"""The update's unique identifier. Update identifiers start from a certain
|
|
@@ -253,7 +263,8 @@ class Update(Model):
|
|
|
253
263
|
class WebhookInfo(Model):
|
|
254
264
|
"""Object `WebhookInfo`, see the [documentation](https://core.telegram.org/bots/api#webhookinfo)
|
|
255
265
|
|
|
256
|
-
Describes the current status of a webhook.
|
|
266
|
+
Describes the current status of a webhook.
|
|
267
|
+
"""
|
|
257
268
|
|
|
258
269
|
url: str
|
|
259
270
|
"""Webhook URL, may be empty if webhook is not set up."""
|
|
@@ -291,7 +302,8 @@ class WebhookInfo(Model):
|
|
|
291
302
|
class User(Model):
|
|
292
303
|
"""Object `User`, see the [documentation](https://core.telegram.org/bots/api#user)
|
|
293
304
|
|
|
294
|
-
This object represents a Telegram user or bot.
|
|
305
|
+
This object represents a Telegram user or bot.
|
|
306
|
+
"""
|
|
295
307
|
|
|
296
308
|
id: int
|
|
297
309
|
"""Unique identifier for this user or bot. This number may have more than 32
|
|
@@ -346,7 +358,8 @@ class User(Model):
|
|
|
346
358
|
class Chat(Model):
|
|
347
359
|
"""Object `Chat`, see the [documentation](https://core.telegram.org/bots/api#chat)
|
|
348
360
|
|
|
349
|
-
This object represents a chat.
|
|
361
|
+
This object represents a chat.
|
|
362
|
+
"""
|
|
350
363
|
|
|
351
364
|
id: int
|
|
352
365
|
"""Unique identifier for this chat. This number may have more than 32 significant
|
|
@@ -511,7 +524,8 @@ class Chat(Model):
|
|
|
511
524
|
class Message(MaybeInaccessibleMessage):
|
|
512
525
|
"""Object `Message`, see the [documentation](https://core.telegram.org/bots/api#message)
|
|
513
526
|
|
|
514
|
-
This object represents a message.
|
|
527
|
+
This object represents a message.
|
|
528
|
+
"""
|
|
515
529
|
|
|
516
530
|
message_id: int
|
|
517
531
|
"""Unique message identifier inside this chat."""
|
|
@@ -837,14 +851,19 @@ class Message(MaybeInaccessibleMessage):
|
|
|
837
851
|
else self.chat.title.unwrap()
|
|
838
852
|
)
|
|
839
853
|
|
|
840
|
-
def __eq__(self, other:
|
|
841
|
-
return
|
|
854
|
+
def __eq__(self, other: typing.Any) -> bool:
|
|
855
|
+
return (
|
|
856
|
+
isinstance(other, self.__class__)
|
|
857
|
+
and self.message_id == other.message_id
|
|
858
|
+
and self.chat_id == other.chat_id
|
|
859
|
+
)
|
|
842
860
|
|
|
843
861
|
|
|
844
862
|
class MessageId(Model):
|
|
845
863
|
"""Object `MessageId`, see the [documentation](https://core.telegram.org/bots/api#messageid)
|
|
846
864
|
|
|
847
|
-
This object represents a unique message identifier.
|
|
865
|
+
This object represents a unique message identifier.
|
|
866
|
+
"""
|
|
848
867
|
|
|
849
868
|
message_id: int
|
|
850
869
|
"""Unique message identifier."""
|
|
@@ -1017,7 +1036,8 @@ class ExternalReplyInfo(Model):
|
|
|
1017
1036
|
class ReplyParameters(Model):
|
|
1018
1037
|
"""Object `ReplyParameters`, see the [documentation](https://core.telegram.org/bots/api#replyparameters)
|
|
1019
1038
|
|
|
1020
|
-
Describes reply parameters for the message that is being sent.
|
|
1039
|
+
Describes reply parameters for the message that is being sent.
|
|
1040
|
+
"""
|
|
1021
1041
|
|
|
1022
1042
|
message_id: int
|
|
1023
1043
|
"""Identifier of the message that will be replied to in the current chat, or
|
|
@@ -1054,7 +1074,8 @@ class ReplyParameters(Model):
|
|
|
1054
1074
|
class MessageOriginUser(MessageOrigin):
|
|
1055
1075
|
"""Object `MessageOriginUser`, see the [documentation](https://core.telegram.org/bots/api#messageoriginuser)
|
|
1056
1076
|
|
|
1057
|
-
The message was originally sent by a known user.
|
|
1077
|
+
The message was originally sent by a known user.
|
|
1078
|
+
"""
|
|
1058
1079
|
|
|
1059
1080
|
type: typing.Literal["user"]
|
|
1060
1081
|
"""Type of the message origin, always `user`."""
|
|
@@ -1069,7 +1090,8 @@ class MessageOriginUser(MessageOrigin):
|
|
|
1069
1090
|
class MessageOriginHiddenUser(MessageOrigin):
|
|
1070
1091
|
"""Object `MessageOriginHiddenUser`, see the [documentation](https://core.telegram.org/bots/api#messageoriginhiddenuser)
|
|
1071
1092
|
|
|
1072
|
-
The message was originally sent by an unknown user.
|
|
1093
|
+
The message was originally sent by an unknown user.
|
|
1094
|
+
"""
|
|
1073
1095
|
|
|
1074
1096
|
type: typing.Literal["hidden_user"]
|
|
1075
1097
|
"""Type of the message origin, always `hidden_user`."""
|
|
@@ -1084,7 +1106,8 @@ class MessageOriginHiddenUser(MessageOrigin):
|
|
|
1084
1106
|
class MessageOriginChat(MessageOrigin):
|
|
1085
1107
|
"""Object `MessageOriginChat`, see the [documentation](https://core.telegram.org/bots/api#messageoriginchat)
|
|
1086
1108
|
|
|
1087
|
-
The message was originally sent on behalf of a chat to a group chat.
|
|
1109
|
+
The message was originally sent on behalf of a chat to a group chat.
|
|
1110
|
+
"""
|
|
1088
1111
|
|
|
1089
1112
|
type: typing.Literal["chat"]
|
|
1090
1113
|
"""Type of the message origin, always `chat`."""
|
|
@@ -1103,7 +1126,8 @@ class MessageOriginChat(MessageOrigin):
|
|
|
1103
1126
|
class MessageOriginChannel(MessageOrigin):
|
|
1104
1127
|
"""Object `MessageOriginChannel`, see the [documentation](https://core.telegram.org/bots/api#messageoriginchannel)
|
|
1105
1128
|
|
|
1106
|
-
The message was originally sent to a channel chat.
|
|
1129
|
+
The message was originally sent to a channel chat.
|
|
1130
|
+
"""
|
|
1107
1131
|
|
|
1108
1132
|
type: typing.Literal["channel"]
|
|
1109
1133
|
"""Type of the message origin, always `channel`."""
|
|
@@ -1124,7 +1148,8 @@ class MessageOriginChannel(MessageOrigin):
|
|
|
1124
1148
|
class PhotoSize(Model):
|
|
1125
1149
|
"""Object `PhotoSize`, see the [documentation](https://core.telegram.org/bots/api#photosize)
|
|
1126
1150
|
|
|
1127
|
-
This object represents one size of a photo or a file / sticker thumbnail.
|
|
1151
|
+
This object represents one size of a photo or a file / sticker thumbnail.
|
|
1152
|
+
"""
|
|
1128
1153
|
|
|
1129
1154
|
file_id: str
|
|
1130
1155
|
"""Identifier for this file, which can be used to download or reuse the file."""
|
|
@@ -1251,7 +1276,8 @@ class Document(Model):
|
|
|
1251
1276
|
class Story(Model):
|
|
1252
1277
|
"""Object `Story`, see the [documentation](https://core.telegram.org/bots/api#story)
|
|
1253
1278
|
|
|
1254
|
-
This object represents a story.
|
|
1279
|
+
This object represents a story.
|
|
1280
|
+
"""
|
|
1255
1281
|
|
|
1256
1282
|
chat: "Chat"
|
|
1257
1283
|
"""Chat that posted the story."""
|
|
@@ -1263,7 +1289,8 @@ class Story(Model):
|
|
|
1263
1289
|
class Video(Model):
|
|
1264
1290
|
"""Object `Video`, see the [documentation](https://core.telegram.org/bots/api#video)
|
|
1265
1291
|
|
|
1266
|
-
This object represents a video file.
|
|
1292
|
+
This object represents a video file.
|
|
1293
|
+
"""
|
|
1267
1294
|
|
|
1268
1295
|
file_id: str
|
|
1269
1296
|
"""Identifier for this file, which can be used to download or reuse the file."""
|
|
@@ -1300,7 +1327,8 @@ class Video(Model):
|
|
|
1300
1327
|
class VideoNote(Model):
|
|
1301
1328
|
"""Object `VideoNote`, see the [documentation](https://core.telegram.org/bots/api#videonote)
|
|
1302
1329
|
|
|
1303
|
-
This object represents a video message (available in Telegram apps as of v.4.0).
|
|
1330
|
+
This object represents a video message (available in Telegram apps as of v.4.0).
|
|
1331
|
+
"""
|
|
1304
1332
|
|
|
1305
1333
|
file_id: str
|
|
1306
1334
|
"""Identifier for this file, which can be used to download or reuse the file."""
|
|
@@ -1325,7 +1353,8 @@ class VideoNote(Model):
|
|
|
1325
1353
|
class Voice(Model):
|
|
1326
1354
|
"""Object `Voice`, see the [documentation](https://core.telegram.org/bots/api#voice)
|
|
1327
1355
|
|
|
1328
|
-
This object represents a voice note.
|
|
1356
|
+
This object represents a voice note.
|
|
1357
|
+
"""
|
|
1329
1358
|
|
|
1330
1359
|
file_id: str
|
|
1331
1360
|
"""Identifier for this file, which can be used to download or reuse the file."""
|
|
@@ -1350,7 +1379,8 @@ class Voice(Model):
|
|
|
1350
1379
|
class Contact(Model):
|
|
1351
1380
|
"""Object `Contact`, see the [documentation](https://core.telegram.org/bots/api#contact)
|
|
1352
1381
|
|
|
1353
|
-
This object represents a phone contact.
|
|
1382
|
+
This object represents a phone contact.
|
|
1383
|
+
"""
|
|
1354
1384
|
|
|
1355
1385
|
phone_number: str
|
|
1356
1386
|
"""Contact's phone number."""
|
|
@@ -1374,7 +1404,8 @@ class Contact(Model):
|
|
|
1374
1404
|
class Dice(Model):
|
|
1375
1405
|
"""Object `Dice`, see the [documentation](https://core.telegram.org/bots/api#dice)
|
|
1376
1406
|
|
|
1377
|
-
This object represents an animated emoji that displays a random value.
|
|
1407
|
+
This object represents an animated emoji that displays a random value.
|
|
1408
|
+
"""
|
|
1378
1409
|
|
|
1379
1410
|
emoji: DiceEmoji
|
|
1380
1411
|
"""Emoji on which the dice throw animation is based."""
|
|
@@ -1387,7 +1418,8 @@ class Dice(Model):
|
|
|
1387
1418
|
class PollOption(Model):
|
|
1388
1419
|
"""Object `PollOption`, see the [documentation](https://core.telegram.org/bots/api#polloption)
|
|
1389
1420
|
|
|
1390
|
-
This object contains information about one answer option in a poll.
|
|
1421
|
+
This object contains information about one answer option in a poll.
|
|
1422
|
+
"""
|
|
1391
1423
|
|
|
1392
1424
|
text: str
|
|
1393
1425
|
"""Option text, 1-100 characters."""
|
|
@@ -1399,7 +1431,8 @@ class PollOption(Model):
|
|
|
1399
1431
|
class PollAnswer(Model):
|
|
1400
1432
|
"""Object `PollAnswer`, see the [documentation](https://core.telegram.org/bots/api#pollanswer)
|
|
1401
1433
|
|
|
1402
|
-
This object represents an answer of a user in a non-anonymous poll.
|
|
1434
|
+
This object represents an answer of a user in a non-anonymous poll.
|
|
1435
|
+
"""
|
|
1403
1436
|
|
|
1404
1437
|
poll_id: str
|
|
1405
1438
|
"""Unique poll identifier."""
|
|
@@ -1419,7 +1452,8 @@ class PollAnswer(Model):
|
|
|
1419
1452
|
class Poll(Model):
|
|
1420
1453
|
"""Object `Poll`, see the [documentation](https://core.telegram.org/bots/api#poll)
|
|
1421
1454
|
|
|
1422
|
-
This object contains information about a poll.
|
|
1455
|
+
This object contains information about a poll.
|
|
1456
|
+
"""
|
|
1423
1457
|
|
|
1424
1458
|
id: str
|
|
1425
1459
|
"""Unique poll identifier."""
|
|
@@ -1469,7 +1503,8 @@ class Poll(Model):
|
|
|
1469
1503
|
class Location(Model):
|
|
1470
1504
|
"""Object `Location`, see the [documentation](https://core.telegram.org/bots/api#location)
|
|
1471
1505
|
|
|
1472
|
-
This object represents a point on the map.
|
|
1506
|
+
This object represents a point on the map.
|
|
1507
|
+
"""
|
|
1473
1508
|
|
|
1474
1509
|
latitude: float
|
|
1475
1510
|
"""Latitude as defined by sender."""
|
|
@@ -1497,7 +1532,8 @@ class Location(Model):
|
|
|
1497
1532
|
class Venue(Model):
|
|
1498
1533
|
"""Object `Venue`, see the [documentation](https://core.telegram.org/bots/api#venue)
|
|
1499
1534
|
|
|
1500
|
-
This object represents a venue.
|
|
1535
|
+
This object represents a venue.
|
|
1536
|
+
"""
|
|
1501
1537
|
|
|
1502
1538
|
location: "Location"
|
|
1503
1539
|
"""Venue location. Can't be a live location."""
|
|
@@ -1525,7 +1561,8 @@ class Venue(Model):
|
|
|
1525
1561
|
class WebAppData(Model):
|
|
1526
1562
|
"""Object `WebAppData`, see the [documentation](https://core.telegram.org/bots/api#webappdata)
|
|
1527
1563
|
|
|
1528
|
-
Describes data sent from a Web App to the bot.
|
|
1564
|
+
Describes data sent from a Web App to the bot.
|
|
1565
|
+
"""
|
|
1529
1566
|
|
|
1530
1567
|
data: str
|
|
1531
1568
|
"""The data. Be aware that a bad client can send arbitrary data in this field."""
|
|
@@ -1564,7 +1601,8 @@ class MessageAutoDeleteTimerChanged(Model):
|
|
|
1564
1601
|
class ChatBoostAdded(Model):
|
|
1565
1602
|
"""Object `ChatBoostAdded`, see the [documentation](https://core.telegram.org/bots/api#chatboostadded)
|
|
1566
1603
|
|
|
1567
|
-
This object represents a service message about a user boosting a chat.
|
|
1604
|
+
This object represents a service message about a user boosting a chat.
|
|
1605
|
+
"""
|
|
1568
1606
|
|
|
1569
1607
|
boost_count: int
|
|
1570
1608
|
"""Number of boosts added by the user."""
|
|
@@ -1596,7 +1634,8 @@ class ForumTopicClosed(Model):
|
|
|
1596
1634
|
class ForumTopicEdited(Model):
|
|
1597
1635
|
"""Object `ForumTopicEdited`, see the [documentation](https://core.telegram.org/bots/api#forumtopicedited)
|
|
1598
1636
|
|
|
1599
|
-
This object represents a service message about an edited forum topic.
|
|
1637
|
+
This object represents a service message about an edited forum topic.
|
|
1638
|
+
"""
|
|
1600
1639
|
|
|
1601
1640
|
name: Option[str] = Nothing
|
|
1602
1641
|
"""Optional. New name of the topic, if it was edited."""
|
|
@@ -1703,7 +1742,8 @@ class VideoChatStarted(Model):
|
|
|
1703
1742
|
class VideoChatEnded(Model):
|
|
1704
1743
|
"""Object `VideoChatEnded`, see the [documentation](https://core.telegram.org/bots/api#videochatended)
|
|
1705
1744
|
|
|
1706
|
-
This object represents a service message about a video chat ended in the chat.
|
|
1745
|
+
This object represents a service message about a video chat ended in the chat.
|
|
1746
|
+
"""
|
|
1707
1747
|
|
|
1708
1748
|
duration: int
|
|
1709
1749
|
"""Video chat duration in seconds."""
|
|
@@ -1729,7 +1769,8 @@ class GiveawayCreated(Model):
|
|
|
1729
1769
|
class Giveaway(Model):
|
|
1730
1770
|
"""Object `Giveaway`, see the [documentation](https://core.telegram.org/bots/api#giveaway)
|
|
1731
1771
|
|
|
1732
|
-
This object represents a message about a scheduled giveaway.
|
|
1772
|
+
This object represents a message about a scheduled giveaway.
|
|
1773
|
+
"""
|
|
1733
1774
|
|
|
1734
1775
|
chats: list["Chat"]
|
|
1735
1776
|
"""The list of chats which the user must join to participate in the giveaway."""
|
|
@@ -1824,7 +1865,8 @@ class GiveawayCompleted(Model):
|
|
|
1824
1865
|
class LinkPreviewOptions(Model):
|
|
1825
1866
|
"""Object `LinkPreviewOptions`, see the [documentation](https://core.telegram.org/bots/api#linkpreviewoptions)
|
|
1826
1867
|
|
|
1827
|
-
Describes the options used for link preview generation.
|
|
1868
|
+
Describes the options used for link preview generation.
|
|
1869
|
+
"""
|
|
1828
1870
|
|
|
1829
1871
|
is_disabled: Option[bool] = Nothing
|
|
1830
1872
|
"""Optional. True, if the link preview is disabled."""
|
|
@@ -1851,7 +1893,8 @@ class LinkPreviewOptions(Model):
|
|
|
1851
1893
|
class UserProfilePhotos(Model):
|
|
1852
1894
|
"""Object `UserProfilePhotos`, see the [documentation](https://core.telegram.org/bots/api#userprofilephotos)
|
|
1853
1895
|
|
|
1854
|
-
This object represent a user's profile pictures.
|
|
1896
|
+
This object represent a user's profile pictures.
|
|
1897
|
+
"""
|
|
1855
1898
|
|
|
1856
1899
|
total_count: int
|
|
1857
1900
|
"""Total number of profile pictures the target user has."""
|
|
@@ -1887,7 +1930,8 @@ class File(Model):
|
|
|
1887
1930
|
class WebAppInfo(Model):
|
|
1888
1931
|
"""Object `WebAppInfo`, see the [documentation](https://core.telegram.org/bots/api#webappinfo)
|
|
1889
1932
|
|
|
1890
|
-
Describes a Web App.
|
|
1933
|
+
Describes a Web App.
|
|
1934
|
+
"""
|
|
1891
1935
|
|
|
1892
1936
|
url: str
|
|
1893
1937
|
"""An HTTPS URL of a Web App to be opened with additional data as specified in
|
|
@@ -1932,6 +1976,12 @@ class ReplyKeyboardMarkup(Model):
|
|
|
1932
1976
|
change the bot's language, bot replies to the request with a keyboard to
|
|
1933
1977
|
select the new language. Other users in the group don't see the keyboard."""
|
|
1934
1978
|
|
|
1979
|
+
@property
|
|
1980
|
+
def empty_markup(self) -> "ReplyKeyboardRemove":
|
|
1981
|
+
"""Empty keyboard to remove the custom keyboard."""
|
|
1982
|
+
|
|
1983
|
+
return ReplyKeyboardRemove(remove_keyboard=True, selective=self.selective)
|
|
1984
|
+
|
|
1935
1985
|
|
|
1936
1986
|
class KeyboardButton(Model):
|
|
1937
1987
|
"""Object `KeyboardButton`, see the [documentation](https://core.telegram.org/bots/api#keyboardbutton)
|
|
@@ -2142,7 +2192,8 @@ class LoginUrl(Model):
|
|
|
2142
2192
|
"""Object `LoginUrl`, see the [documentation](https://core.telegram.org/bots/api#loginurl)
|
|
2143
2193
|
|
|
2144
2194
|
This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
|
|
2145
|
-
Telegram apps support these buttons as of version 5.7.
|
|
2195
|
+
Telegram apps support these buttons as of version 5.7.
|
|
2196
|
+
"""
|
|
2146
2197
|
|
|
2147
2198
|
url: str
|
|
2148
2199
|
"""An HTTPS URL to be opened with user authorization data added to the query
|
|
@@ -2246,7 +2297,8 @@ class ForceReply(Model):
|
|
|
2246
2297
|
class ChatPhoto(Model):
|
|
2247
2298
|
"""Object `ChatPhoto`, see the [documentation](https://core.telegram.org/bots/api#chatphoto)
|
|
2248
2299
|
|
|
2249
|
-
This object represents a chat photo.
|
|
2300
|
+
This object represents a chat photo.
|
|
2301
|
+
"""
|
|
2250
2302
|
|
|
2251
2303
|
small_file_id: str
|
|
2252
2304
|
"""File identifier of small (160x160) chat photo. This file_id can be used
|
|
@@ -2270,7 +2322,8 @@ class ChatPhoto(Model):
|
|
|
2270
2322
|
class ChatInviteLink(Model):
|
|
2271
2323
|
"""Object `ChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#chatinvitelink)
|
|
2272
2324
|
|
|
2273
|
-
Represents an invite link for a chat.
|
|
2325
|
+
Represents an invite link for a chat.
|
|
2326
|
+
"""
|
|
2274
2327
|
|
|
2275
2328
|
invite_link: str
|
|
2276
2329
|
"""The invite link. If the link was created by another chat administrator,
|
|
@@ -2306,7 +2359,8 @@ class ChatInviteLink(Model):
|
|
|
2306
2359
|
class ChatAdministratorRights(Model):
|
|
2307
2360
|
"""Object `ChatAdministratorRights`, see the [documentation](https://core.telegram.org/bots/api#chatadministratorrights)
|
|
2308
2361
|
|
|
2309
|
-
Represents the rights of an administrator in a chat.
|
|
2362
|
+
Represents the rights of an administrator in a chat.
|
|
2363
|
+
"""
|
|
2310
2364
|
|
|
2311
2365
|
is_anonymous: bool
|
|
2312
2366
|
"""True, if the user's presence in the chat is hidden."""
|
|
@@ -2366,7 +2420,8 @@ class ChatAdministratorRights(Model):
|
|
|
2366
2420
|
class ChatMemberUpdated(Model):
|
|
2367
2421
|
"""Object `ChatMemberUpdated`, see the [documentation](https://core.telegram.org/bots/api#chatmemberupdated)
|
|
2368
2422
|
|
|
2369
|
-
This object represents changes in the status of a chat member.
|
|
2423
|
+
This object represents changes in the status of a chat member.
|
|
2424
|
+
"""
|
|
2370
2425
|
|
|
2371
2426
|
chat: "Chat"
|
|
2372
2427
|
"""Chat the user belongs to."""
|
|
@@ -2408,7 +2463,8 @@ class ChatMemberUpdated(Model):
|
|
|
2408
2463
|
class ChatMemberOwner(ChatMember):
|
|
2409
2464
|
"""Object `ChatMemberOwner`, see the [documentation](https://core.telegram.org/bots/api#chatmemberowner)
|
|
2410
2465
|
|
|
2411
|
-
Represents a chat member that owns the chat and has all administrator privileges.
|
|
2466
|
+
Represents a chat member that owns the chat and has all administrator privileges.
|
|
2467
|
+
"""
|
|
2412
2468
|
|
|
2413
2469
|
status: typing.Literal["creator"]
|
|
2414
2470
|
"""The member's status in the chat, always `creator`."""
|
|
@@ -2426,7 +2482,8 @@ class ChatMemberOwner(ChatMember):
|
|
|
2426
2482
|
class ChatMemberAdministrator(ChatMember):
|
|
2427
2483
|
"""Object `ChatMemberAdministrator`, see the [documentation](https://core.telegram.org/bots/api#chatmemberadministrator)
|
|
2428
2484
|
|
|
2429
|
-
Represents a chat member that has some additional privileges.
|
|
2485
|
+
Represents a chat member that has some additional privileges.
|
|
2486
|
+
"""
|
|
2430
2487
|
|
|
2431
2488
|
status: typing.Literal["administrator"]
|
|
2432
2489
|
"""The member's status in the chat, always `administrator`."""
|
|
@@ -2498,7 +2555,8 @@ class ChatMemberAdministrator(ChatMember):
|
|
|
2498
2555
|
class ChatMemberMember(ChatMember):
|
|
2499
2556
|
"""Object `ChatMemberMember`, see the [documentation](https://core.telegram.org/bots/api#chatmembermember)
|
|
2500
2557
|
|
|
2501
|
-
Represents a chat member that has no additional privileges or restrictions.
|
|
2558
|
+
Represents a chat member that has no additional privileges or restrictions.
|
|
2559
|
+
"""
|
|
2502
2560
|
|
|
2503
2561
|
status: typing.Literal["member"]
|
|
2504
2562
|
"""The member's status in the chat, always `member`."""
|
|
@@ -2604,7 +2662,8 @@ class ChatMemberBanned(ChatMember):
|
|
|
2604
2662
|
class ChatJoinRequest(Model):
|
|
2605
2663
|
"""Object `ChatJoinRequest`, see the [documentation](https://core.telegram.org/bots/api#chatjoinrequest)
|
|
2606
2664
|
|
|
2607
|
-
Represents a join request sent to a chat.
|
|
2665
|
+
Represents a join request sent to a chat.
|
|
2666
|
+
"""
|
|
2608
2667
|
|
|
2609
2668
|
chat: "Chat"
|
|
2610
2669
|
"""Chat to which the request was sent."""
|
|
@@ -2634,7 +2693,8 @@ class ChatJoinRequest(Model):
|
|
|
2634
2693
|
class ChatPermissions(Model):
|
|
2635
2694
|
"""Object `ChatPermissions`, see the [documentation](https://core.telegram.org/bots/api#chatpermissions)
|
|
2636
2695
|
|
|
2637
|
-
Describes actions that a non-administrator user is allowed to take in a chat.
|
|
2696
|
+
Describes actions that a non-administrator user is allowed to take in a chat.
|
|
2697
|
+
"""
|
|
2638
2698
|
|
|
2639
2699
|
can_send_messages: Option[bool] = Nothing
|
|
2640
2700
|
"""Optional. True, if the user is allowed to send text messages, contacts,
|
|
@@ -2687,7 +2747,8 @@ class ChatPermissions(Model):
|
|
|
2687
2747
|
class ChatLocation(Model):
|
|
2688
2748
|
"""Object `ChatLocation`, see the [documentation](https://core.telegram.org/bots/api#chatlocation)
|
|
2689
2749
|
|
|
2690
|
-
Represents a location to which a chat is connected.
|
|
2750
|
+
Represents a location to which a chat is connected.
|
|
2751
|
+
"""
|
|
2691
2752
|
|
|
2692
2753
|
location: "Location"
|
|
2693
2754
|
"""The location to which the supergroup is connected. Can't be a live location."""
|
|
@@ -2699,7 +2760,8 @@ class ChatLocation(Model):
|
|
|
2699
2760
|
class ReactionTypeEmoji(ReactionType):
|
|
2700
2761
|
"""Object `ReactionTypeEmoji`, see the [documentation](https://core.telegram.org/bots/api#reactiontypeemoji)
|
|
2701
2762
|
|
|
2702
|
-
The reaction is based on an emoji.
|
|
2763
|
+
The reaction is based on an emoji.
|
|
2764
|
+
"""
|
|
2703
2765
|
|
|
2704
2766
|
type: typing.Literal["emoji"]
|
|
2705
2767
|
"""Type of the reaction, always `emoji`."""
|
|
@@ -2716,7 +2778,8 @@ class ReactionTypeEmoji(ReactionType):
|
|
|
2716
2778
|
class ReactionTypeCustomEmoji(ReactionType):
|
|
2717
2779
|
"""Object `ReactionTypeCustomEmoji`, see the [documentation](https://core.telegram.org/bots/api#reactiontypecustomemoji)
|
|
2718
2780
|
|
|
2719
|
-
The reaction is based on a custom emoji.
|
|
2781
|
+
The reaction is based on a custom emoji.
|
|
2782
|
+
"""
|
|
2720
2783
|
|
|
2721
2784
|
type: typing.Literal["custom_emoji"]
|
|
2722
2785
|
"""Type of the reaction, always `custom_emoji`."""
|
|
@@ -2741,7 +2804,8 @@ class ReactionCount(Model):
|
|
|
2741
2804
|
class MessageReactionUpdated(Model):
|
|
2742
2805
|
"""Object `MessageReactionUpdated`, see the [documentation](https://core.telegram.org/bots/api#messagereactionupdated)
|
|
2743
2806
|
|
|
2744
|
-
This object represents a change of a reaction on a message performed by a user.
|
|
2807
|
+
This object represents a change of a reaction on a message performed by a user.
|
|
2808
|
+
"""
|
|
2745
2809
|
|
|
2746
2810
|
chat: "Chat"
|
|
2747
2811
|
"""The chat containing the message the user reacted to."""
|
|
@@ -2769,7 +2833,8 @@ class MessageReactionUpdated(Model):
|
|
|
2769
2833
|
class MessageReactionCountUpdated(Model):
|
|
2770
2834
|
"""Object `MessageReactionCountUpdated`, see the [documentation](https://core.telegram.org/bots/api#messagereactioncountupdated)
|
|
2771
2835
|
|
|
2772
|
-
This object represents reaction changes on a message with anonymous reactions.
|
|
2836
|
+
This object represents reaction changes on a message with anonymous reactions.
|
|
2837
|
+
"""
|
|
2773
2838
|
|
|
2774
2839
|
chat: "Chat"
|
|
2775
2840
|
"""The chat containing the message."""
|
|
@@ -2787,7 +2852,8 @@ class MessageReactionCountUpdated(Model):
|
|
|
2787
2852
|
class ForumTopic(Model):
|
|
2788
2853
|
"""Object `ForumTopic`, see the [documentation](https://core.telegram.org/bots/api#forumtopic)
|
|
2789
2854
|
|
|
2790
|
-
This object represents a forum topic.
|
|
2855
|
+
This object represents a forum topic.
|
|
2856
|
+
"""
|
|
2791
2857
|
|
|
2792
2858
|
message_thread_id: int
|
|
2793
2859
|
"""Unique identifier of the forum topic."""
|
|
@@ -2805,7 +2871,8 @@ class ForumTopic(Model):
|
|
|
2805
2871
|
class BotCommand(Model):
|
|
2806
2872
|
"""Object `BotCommand`, see the [documentation](https://core.telegram.org/bots/api#botcommand)
|
|
2807
2873
|
|
|
2808
|
-
This object represents a bot command.
|
|
2874
|
+
This object represents a bot command.
|
|
2875
|
+
"""
|
|
2809
2876
|
|
|
2810
2877
|
command: str
|
|
2811
2878
|
"""Text of the command; 1-32 characters. Can contain only lowercase English
|
|
@@ -2828,7 +2895,8 @@ class BotCommandScopeDefault(BotCommandScope):
|
|
|
2828
2895
|
class BotCommandScopeAllPrivateChats(BotCommandScope):
|
|
2829
2896
|
"""Object `BotCommandScopeAllPrivateChats`, see the [documentation](https://core.telegram.org/bots/api#botcommandscopeallprivatechats)
|
|
2830
2897
|
|
|
2831
|
-
Represents the scope of bot commands, covering all private chats.
|
|
2898
|
+
Represents the scope of bot commands, covering all private chats.
|
|
2899
|
+
"""
|
|
2832
2900
|
|
|
2833
2901
|
type: typing.Literal["all_private_chats"]
|
|
2834
2902
|
"""Scope type, must be all_private_chats."""
|
|
@@ -2837,7 +2905,8 @@ class BotCommandScopeAllPrivateChats(BotCommandScope):
|
|
|
2837
2905
|
class BotCommandScopeAllGroupChats(BotCommandScope):
|
|
2838
2906
|
"""Object `BotCommandScopeAllGroupChats`, see the [documentation](https://core.telegram.org/bots/api#botcommandscopeallgroupchats)
|
|
2839
2907
|
|
|
2840
|
-
Represents the scope of bot commands, covering all group and supergroup chats.
|
|
2908
|
+
Represents the scope of bot commands, covering all group and supergroup chats.
|
|
2909
|
+
"""
|
|
2841
2910
|
|
|
2842
2911
|
type: typing.Literal["all_group_chats"]
|
|
2843
2912
|
"""Scope type, must be all_group_chats."""
|
|
@@ -2856,7 +2925,8 @@ class BotCommandScopeAllChatAdministrators(BotCommandScope):
|
|
|
2856
2925
|
class BotCommandScopeChat(BotCommandScope):
|
|
2857
2926
|
"""Object `BotCommandScopeChat`, see the [documentation](https://core.telegram.org/bots/api#botcommandscopechat)
|
|
2858
2927
|
|
|
2859
|
-
Represents the scope of bot commands, covering a specific chat.
|
|
2928
|
+
Represents the scope of bot commands, covering a specific chat.
|
|
2929
|
+
"""
|
|
2860
2930
|
|
|
2861
2931
|
type: typing.Literal["chat"]
|
|
2862
2932
|
"""Scope type, must be chat."""
|
|
@@ -2900,7 +2970,8 @@ class BotCommandScopeChatMember(BotCommandScope):
|
|
|
2900
2970
|
class BotName(Model):
|
|
2901
2971
|
"""Object `BotName`, see the [documentation](https://core.telegram.org/bots/api#botname)
|
|
2902
2972
|
|
|
2903
|
-
This object represents the bot's name.
|
|
2973
|
+
This object represents the bot's name.
|
|
2974
|
+
"""
|
|
2904
2975
|
|
|
2905
2976
|
name: str
|
|
2906
2977
|
"""The bot's name."""
|
|
@@ -2909,7 +2980,8 @@ class BotName(Model):
|
|
|
2909
2980
|
class BotDescription(Model):
|
|
2910
2981
|
"""Object `BotDescription`, see the [documentation](https://core.telegram.org/bots/api#botdescription)
|
|
2911
2982
|
|
|
2912
|
-
This object represents the bot's description.
|
|
2983
|
+
This object represents the bot's description.
|
|
2984
|
+
"""
|
|
2913
2985
|
|
|
2914
2986
|
description: str
|
|
2915
2987
|
"""The bot's description."""
|
|
@@ -2918,7 +2990,8 @@ class BotDescription(Model):
|
|
|
2918
2990
|
class BotShortDescription(Model):
|
|
2919
2991
|
"""Object `BotShortDescription`, see the [documentation](https://core.telegram.org/bots/api#botshortdescription)
|
|
2920
2992
|
|
|
2921
|
-
This object represents the bot's short description.
|
|
2993
|
+
This object represents the bot's short description.
|
|
2994
|
+
"""
|
|
2922
2995
|
|
|
2923
2996
|
short_description: str
|
|
2924
2997
|
"""The bot's short description."""
|
|
@@ -2927,7 +3000,8 @@ class BotShortDescription(Model):
|
|
|
2927
3000
|
class MenuButtonCommands(MenuButton):
|
|
2928
3001
|
"""Object `MenuButtonCommands`, see the [documentation](https://core.telegram.org/bots/api#menubuttoncommands)
|
|
2929
3002
|
|
|
2930
|
-
Represents a menu button, which opens the bot's list of commands.
|
|
3003
|
+
Represents a menu button, which opens the bot's list of commands.
|
|
3004
|
+
"""
|
|
2931
3005
|
|
|
2932
3006
|
type: typing.Literal["commands"]
|
|
2933
3007
|
"""Type of the button, must be commands."""
|
|
@@ -2936,7 +3010,8 @@ class MenuButtonCommands(MenuButton):
|
|
|
2936
3010
|
class MenuButtonWebApp(MenuButton):
|
|
2937
3011
|
"""Object `MenuButtonWebApp`, see the [documentation](https://core.telegram.org/bots/api#menubuttonwebapp)
|
|
2938
3012
|
|
|
2939
|
-
Represents a menu button, which launches a Web App.
|
|
3013
|
+
Represents a menu button, which launches a Web App.
|
|
3014
|
+
"""
|
|
2940
3015
|
|
|
2941
3016
|
type: typing.Literal["web_app"]
|
|
2942
3017
|
"""Type of the button, must be web_app."""
|
|
@@ -2953,7 +3028,8 @@ class MenuButtonWebApp(MenuButton):
|
|
|
2953
3028
|
class MenuButtonDefault(MenuButton):
|
|
2954
3029
|
"""Object `MenuButtonDefault`, see the [documentation](https://core.telegram.org/bots/api#menubuttondefault)
|
|
2955
3030
|
|
|
2956
|
-
Describes that no specific value for the menu button was set.
|
|
3031
|
+
Describes that no specific value for the menu button was set.
|
|
3032
|
+
"""
|
|
2957
3033
|
|
|
2958
3034
|
type: typing.Literal["default"]
|
|
2959
3035
|
"""Type of the button, must be default."""
|
|
@@ -3009,7 +3085,8 @@ class ChatBoostSourceGiveaway(ChatBoostSource):
|
|
|
3009
3085
|
class ChatBoost(Model):
|
|
3010
3086
|
"""Object `ChatBoost`, see the [documentation](https://core.telegram.org/bots/api#chatboost)
|
|
3011
3087
|
|
|
3012
|
-
This object contains information about a chat boost.
|
|
3088
|
+
This object contains information about a chat boost.
|
|
3089
|
+
"""
|
|
3013
3090
|
|
|
3014
3091
|
boost_id: str
|
|
3015
3092
|
"""Unique identifier of the boost."""
|
|
@@ -3030,7 +3107,8 @@ class ChatBoost(Model):
|
|
|
3030
3107
|
class ChatBoostUpdated(Model):
|
|
3031
3108
|
"""Object `ChatBoostUpdated`, see the [documentation](https://core.telegram.org/bots/api#chatboostupdated)
|
|
3032
3109
|
|
|
3033
|
-
This object represents a boost added to a chat or changed.
|
|
3110
|
+
This object represents a boost added to a chat or changed.
|
|
3111
|
+
"""
|
|
3034
3112
|
|
|
3035
3113
|
chat: "Chat"
|
|
3036
3114
|
"""Chat which was boosted."""
|
|
@@ -3042,7 +3120,8 @@ class ChatBoostUpdated(Model):
|
|
|
3042
3120
|
class ChatBoostRemoved(Model):
|
|
3043
3121
|
"""Object `ChatBoostRemoved`, see the [documentation](https://core.telegram.org/bots/api#chatboostremoved)
|
|
3044
3122
|
|
|
3045
|
-
This object represents a boost removed from a chat.
|
|
3123
|
+
This object represents a boost removed from a chat.
|
|
3124
|
+
"""
|
|
3046
3125
|
|
|
3047
3126
|
chat: "Chat"
|
|
3048
3127
|
"""Chat which was boosted."""
|
|
@@ -3062,7 +3141,8 @@ class ChatBoostRemoved(Model):
|
|
|
3062
3141
|
class UserChatBoosts(Model):
|
|
3063
3142
|
"""Object `UserChatBoosts`, see the [documentation](https://core.telegram.org/bots/api#userchatboosts)
|
|
3064
3143
|
|
|
3065
|
-
This object represents a list of boosts added to a chat by a user.
|
|
3144
|
+
This object represents a list of boosts added to a chat by a user.
|
|
3145
|
+
"""
|
|
3066
3146
|
|
|
3067
3147
|
boosts: list["ChatBoost"]
|
|
3068
3148
|
"""The list of boosts added to the chat by the user."""
|
|
@@ -3071,7 +3151,8 @@ class UserChatBoosts(Model):
|
|
|
3071
3151
|
class ResponseParameters(Model):
|
|
3072
3152
|
"""Object `ResponseParameters`, see the [documentation](https://core.telegram.org/bots/api#responseparameters)
|
|
3073
3153
|
|
|
3074
|
-
Describes why a request was unsuccessful.
|
|
3154
|
+
Describes why a request was unsuccessful.
|
|
3155
|
+
"""
|
|
3075
3156
|
|
|
3076
3157
|
migrate_to_chat_id: Option[int] = Nothing
|
|
3077
3158
|
"""Optional. The group has been migrated to a supergroup with the specified
|
|
@@ -3088,7 +3169,8 @@ class ResponseParameters(Model):
|
|
|
3088
3169
|
class InputMediaPhoto(InputMedia):
|
|
3089
3170
|
"""Object `InputMediaPhoto`, see the [documentation](https://core.telegram.org/bots/api#inputmediaphoto)
|
|
3090
3171
|
|
|
3091
|
-
Represents a photo to be sent.
|
|
3172
|
+
Represents a photo to be sent.
|
|
3173
|
+
"""
|
|
3092
3174
|
|
|
3093
3175
|
type: typing.Literal["photo"]
|
|
3094
3176
|
"""Type of the result, must be photo."""
|
|
@@ -3118,7 +3200,8 @@ class InputMediaPhoto(InputMedia):
|
|
|
3118
3200
|
class InputMediaVideo(InputMedia):
|
|
3119
3201
|
"""Object `InputMediaVideo`, see the [documentation](https://core.telegram.org/bots/api#inputmediavideo)
|
|
3120
3202
|
|
|
3121
|
-
Represents a video to be sent.
|
|
3203
|
+
Represents a video to be sent.
|
|
3204
|
+
"""
|
|
3122
3205
|
|
|
3123
3206
|
type: typing.Literal["video"]
|
|
3124
3207
|
"""Type of the result, must be video."""
|
|
@@ -3218,7 +3301,8 @@ class InputMediaAnimation(InputMedia):
|
|
|
3218
3301
|
class InputMediaAudio(InputMedia):
|
|
3219
3302
|
"""Object `InputMediaAudio`, see the [documentation](https://core.telegram.org/bots/api#inputmediaaudio)
|
|
3220
3303
|
|
|
3221
|
-
Represents an audio file to be treated as music to be sent.
|
|
3304
|
+
Represents an audio file to be treated as music to be sent.
|
|
3305
|
+
"""
|
|
3222
3306
|
|
|
3223
3307
|
type: typing.Literal["audio"]
|
|
3224
3308
|
"""Type of the result, must be audio."""
|
|
@@ -3263,7 +3347,8 @@ class InputMediaAudio(InputMedia):
|
|
|
3263
3347
|
class InputMediaDocument(InputMedia):
|
|
3264
3348
|
"""Object `InputMediaDocument`, see the [documentation](https://core.telegram.org/bots/api#inputmediadocument)
|
|
3265
3349
|
|
|
3266
|
-
Represents a general file to be sent.
|
|
3350
|
+
Represents a general file to be sent.
|
|
3351
|
+
"""
|
|
3267
3352
|
|
|
3268
3353
|
type: typing.Literal["document"]
|
|
3269
3354
|
"""Type of the result, must be document."""
|
|
@@ -3317,7 +3402,8 @@ class InputFile(typing.NamedTuple):
|
|
|
3317
3402
|
class Sticker(Model):
|
|
3318
3403
|
"""Object `Sticker`, see the [documentation](https://core.telegram.org/bots/api#sticker)
|
|
3319
3404
|
|
|
3320
|
-
This object represents a sticker.
|
|
3405
|
+
This object represents a sticker.
|
|
3406
|
+
"""
|
|
3321
3407
|
|
|
3322
3408
|
file_id: str
|
|
3323
3409
|
"""Identifier for this file, which can be used to download or reuse the file."""
|
|
@@ -3373,7 +3459,8 @@ class Sticker(Model):
|
|
|
3373
3459
|
class StickerSet(Model):
|
|
3374
3460
|
"""Object `StickerSet`, see the [documentation](https://core.telegram.org/bots/api#stickerset)
|
|
3375
3461
|
|
|
3376
|
-
This object represents a sticker set.
|
|
3462
|
+
This object represents a sticker set.
|
|
3463
|
+
"""
|
|
3377
3464
|
|
|
3378
3465
|
name: str
|
|
3379
3466
|
"""Sticker set name."""
|
|
@@ -3424,7 +3511,8 @@ class MaskPosition(Model):
|
|
|
3424
3511
|
class InputSticker(Model):
|
|
3425
3512
|
"""Object `InputSticker`, see the [documentation](https://core.telegram.org/bots/api#inputsticker)
|
|
3426
3513
|
|
|
3427
|
-
This object describes a sticker to be added to a sticker set.
|
|
3514
|
+
This object describes a sticker to be added to a sticker set.
|
|
3515
|
+
"""
|
|
3428
3516
|
|
|
3429
3517
|
sticker: Variative["InputFile", str]
|
|
3430
3518
|
"""The added sticker. Pass a file_id as a String to send a file that already exists
|
|
@@ -3505,7 +3593,8 @@ class InlineQueryResultsButton(Model):
|
|
|
3505
3593
|
class InlineQueryResultArticle(InlineQueryResult):
|
|
3506
3594
|
"""Object `InlineQueryResultArticle`, see the [documentation](https://core.telegram.org/bots/api#inlinequeryresultarticle)
|
|
3507
3595
|
|
|
3508
|
-
Represents a link to an article or web page.
|
|
3596
|
+
Represents a link to an article or web page.
|
|
3597
|
+
"""
|
|
3509
3598
|
|
|
3510
3599
|
type: typing.Literal["article"]
|
|
3511
3600
|
"""Type of the result, must be article."""
|
|
@@ -4128,7 +4217,8 @@ class InlineQueryResultContact(InlineQueryResult):
|
|
|
4128
4217
|
class InlineQueryResultGame(InlineQueryResult):
|
|
4129
4218
|
"""Object `InlineQueryResultGame`, see the [documentation](https://core.telegram.org/bots/api#inlinequeryresultgame)
|
|
4130
4219
|
|
|
4131
|
-
Represents a Game.
|
|
4220
|
+
Represents a Game.
|
|
4221
|
+
"""
|
|
4132
4222
|
|
|
4133
4223
|
type: typing.Literal["game"]
|
|
4134
4224
|
"""Type of the result, must be game."""
|
|
@@ -4705,7 +4795,8 @@ class ChosenInlineResult(Model):
|
|
|
4705
4795
|
class SentWebAppMessage(Model):
|
|
4706
4796
|
"""Object `SentWebAppMessage`, see the [documentation](https://core.telegram.org/bots/api#sentwebappmessage)
|
|
4707
4797
|
|
|
4708
|
-
Describes an inline message sent by a Web App on behalf of a user.
|
|
4798
|
+
Describes an inline message sent by a Web App on behalf of a user.
|
|
4799
|
+
"""
|
|
4709
4800
|
|
|
4710
4801
|
inline_message_id: Option[str] = Nothing
|
|
4711
4802
|
"""Optional. Identifier of the sent inline message. Available only if there
|
|
@@ -4715,7 +4806,8 @@ class SentWebAppMessage(Model):
|
|
|
4715
4806
|
class LabeledPrice(Model):
|
|
4716
4807
|
"""Object `LabeledPrice`, see the [documentation](https://core.telegram.org/bots/api#labeledprice)
|
|
4717
4808
|
|
|
4718
|
-
This object represents a portion of the price for goods or services.
|
|
4809
|
+
This object represents a portion of the price for goods or services.
|
|
4810
|
+
"""
|
|
4719
4811
|
|
|
4720
4812
|
label: str
|
|
4721
4813
|
"""Portion label."""
|
|
@@ -4730,7 +4822,8 @@ class LabeledPrice(Model):
|
|
|
4730
4822
|
class Invoice(Model):
|
|
4731
4823
|
"""Object `Invoice`, see the [documentation](https://core.telegram.org/bots/api#invoice)
|
|
4732
4824
|
|
|
4733
|
-
This object contains basic information about an invoice.
|
|
4825
|
+
This object contains basic information about an invoice.
|
|
4826
|
+
"""
|
|
4734
4827
|
|
|
4735
4828
|
title: str
|
|
4736
4829
|
"""Product name."""
|
|
@@ -4754,7 +4847,8 @@ class Invoice(Model):
|
|
|
4754
4847
|
class ShippingAddress(Model):
|
|
4755
4848
|
"""Object `ShippingAddress`, see the [documentation](https://core.telegram.org/bots/api#shippingaddress)
|
|
4756
4849
|
|
|
4757
|
-
This object represents a shipping address.
|
|
4850
|
+
This object represents a shipping address.
|
|
4851
|
+
"""
|
|
4758
4852
|
|
|
4759
4853
|
country_code: str
|
|
4760
4854
|
"""Two-letter ISO 3166-1 alpha-2 country code."""
|
|
@@ -4778,7 +4872,8 @@ class ShippingAddress(Model):
|
|
|
4778
4872
|
class OrderInfo(Model):
|
|
4779
4873
|
"""Object `OrderInfo`, see the [documentation](https://core.telegram.org/bots/api#orderinfo)
|
|
4780
4874
|
|
|
4781
|
-
This object represents information about an order.
|
|
4875
|
+
This object represents information about an order.
|
|
4876
|
+
"""
|
|
4782
4877
|
|
|
4783
4878
|
name: Option[str] = Nothing
|
|
4784
4879
|
"""Optional. User name."""
|
|
@@ -4796,7 +4891,8 @@ class OrderInfo(Model):
|
|
|
4796
4891
|
class ShippingOption(Model):
|
|
4797
4892
|
"""Object `ShippingOption`, see the [documentation](https://core.telegram.org/bots/api#shippingoption)
|
|
4798
4893
|
|
|
4799
|
-
This object represents one shipping option.
|
|
4894
|
+
This object represents one shipping option.
|
|
4895
|
+
"""
|
|
4800
4896
|
|
|
4801
4897
|
id: str
|
|
4802
4898
|
"""Shipping option identifier."""
|
|
@@ -4811,7 +4907,8 @@ class ShippingOption(Model):
|
|
|
4811
4907
|
class SuccessfulPayment(Model):
|
|
4812
4908
|
"""Object `SuccessfulPayment`, see the [documentation](https://core.telegram.org/bots/api#successfulpayment)
|
|
4813
4909
|
|
|
4814
|
-
This object contains basic information about a successful payment.
|
|
4910
|
+
This object contains basic information about a successful payment.
|
|
4911
|
+
"""
|
|
4815
4912
|
|
|
4816
4913
|
currency: str
|
|
4817
4914
|
"""Three-letter ISO 4217 currency code."""
|
|
@@ -4841,7 +4938,8 @@ class SuccessfulPayment(Model):
|
|
|
4841
4938
|
class ShippingQuery(Model):
|
|
4842
4939
|
"""Object `ShippingQuery`, see the [documentation](https://core.telegram.org/bots/api#shippingquery)
|
|
4843
4940
|
|
|
4844
|
-
This object contains information about an incoming shipping query.
|
|
4941
|
+
This object contains information about an incoming shipping query.
|
|
4942
|
+
"""
|
|
4845
4943
|
|
|
4846
4944
|
id: str
|
|
4847
4945
|
"""Unique query identifier."""
|
|
@@ -4859,7 +4957,8 @@ class ShippingQuery(Model):
|
|
|
4859
4957
|
class PreCheckoutQuery(Model):
|
|
4860
4958
|
"""Object `PreCheckoutQuery`, see the [documentation](https://core.telegram.org/bots/api#precheckoutquery)
|
|
4861
4959
|
|
|
4862
|
-
This object contains information about an incoming pre-checkout query.
|
|
4960
|
+
This object contains information about an incoming pre-checkout query.
|
|
4961
|
+
"""
|
|
4863
4962
|
|
|
4864
4963
|
id: str
|
|
4865
4964
|
"""Unique query identifier."""
|
|
@@ -4889,7 +4988,8 @@ class PreCheckoutQuery(Model):
|
|
|
4889
4988
|
class PassportData(Model):
|
|
4890
4989
|
"""Object `PassportData`, see the [documentation](https://core.telegram.org/bots/api#passportdata)
|
|
4891
4990
|
|
|
4892
|
-
Describes Telegram Passport data shared with the bot by the user.
|
|
4991
|
+
Describes Telegram Passport data shared with the bot by the user.
|
|
4992
|
+
"""
|
|
4893
4993
|
|
|
4894
4994
|
data: list["EncryptedPassportElement"]
|
|
4895
4995
|
"""Array with information about documents and other Telegram Passport elements
|
|
@@ -5007,7 +5107,11 @@ class PassportElementErrorDataField(PassportElementError):
|
|
|
5007
5107
|
"""Error source, must be data."""
|
|
5008
5108
|
|
|
5009
5109
|
type: typing.Literal[
|
|
5010
|
-
"passport",
|
|
5110
|
+
"passport",
|
|
5111
|
+
"driver_license",
|
|
5112
|
+
"identity_card",
|
|
5113
|
+
"internal_passport",
|
|
5114
|
+
"address",
|
|
5011
5115
|
]
|
|
5012
5116
|
"""The section of the user's Telegram Passport which has the error, one of `personal_details`,
|
|
5013
5117
|
`passport`, `driver_license`, `identity_card`, `internal_passport`,
|
|
@@ -5033,7 +5137,10 @@ class PassportElementErrorFrontSide(PassportElementError):
|
|
|
5033
5137
|
"""Error source, must be front_side."""
|
|
5034
5138
|
|
|
5035
5139
|
type: typing.Literal[
|
|
5036
|
-
"passport",
|
|
5140
|
+
"passport",
|
|
5141
|
+
"driver_license",
|
|
5142
|
+
"identity_card",
|
|
5143
|
+
"internal_passport",
|
|
5037
5144
|
]
|
|
5038
5145
|
"""The section of the user's Telegram Passport which has the issue, one of `passport`,
|
|
5039
5146
|
`driver_license`, `identity_card`, `internal_passport`."""
|
|
@@ -5075,7 +5182,10 @@ class PassportElementErrorSelfie(PassportElementError):
|
|
|
5075
5182
|
"""Error source, must be selfie."""
|
|
5076
5183
|
|
|
5077
5184
|
type: typing.Literal[
|
|
5078
|
-
"passport",
|
|
5185
|
+
"passport",
|
|
5186
|
+
"driver_license",
|
|
5187
|
+
"identity_card",
|
|
5188
|
+
"internal_passport",
|
|
5079
5189
|
]
|
|
5080
5190
|
"""The section of the user's Telegram Passport which has the issue, one of `passport`,
|
|
5081
5191
|
`driver_license`, `identity_card`, `internal_passport`."""
|
|
@@ -5257,13 +5367,15 @@ class Game(Model):
|
|
|
5257
5367
|
class CallbackGame(Model):
|
|
5258
5368
|
"""Object `CallbackGame`, see the [documentation](https://core.telegram.org/bots/api#callbackgame)
|
|
5259
5369
|
|
|
5260
|
-
A placeholder, currently holds no information. Use BotFather to set up your game.
|
|
5370
|
+
A placeholder, currently holds no information. Use BotFather to set up your game.
|
|
5371
|
+
"""
|
|
5261
5372
|
|
|
5262
5373
|
|
|
5263
5374
|
class GameHighScore(Model):
|
|
5264
5375
|
"""Object `GameHighScore`, see the [documentation](https://core.telegram.org/bots/api#gamehighscore)
|
|
5265
5376
|
|
|
5266
|
-
This object represents one row of the high scores table for a game.
|
|
5377
|
+
This object represents one row of the high scores table for a game.
|
|
5378
|
+
"""
|
|
5267
5379
|
|
|
5268
5380
|
position: int
|
|
5269
5381
|
"""Position in high score table for the game."""
|