telegrinder 0.3.4__py3-none-any.whl → 0.4.0__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 +148 -149
- telegrinder/api/__init__.py +9 -8
- telegrinder/api/api.py +101 -93
- telegrinder/api/error.py +20 -16
- telegrinder/api/response.py +20 -20
- telegrinder/api/token.py +36 -36
- telegrinder/bot/__init__.py +72 -66
- telegrinder/bot/bot.py +83 -76
- telegrinder/bot/cute_types/__init__.py +19 -17
- telegrinder/bot/cute_types/base.py +184 -258
- telegrinder/bot/cute_types/callback_query.py +400 -385
- telegrinder/bot/cute_types/chat_join_request.py +62 -61
- telegrinder/bot/cute_types/chat_member_updated.py +157 -160
- telegrinder/bot/cute_types/inline_query.py +44 -43
- telegrinder/bot/cute_types/message.py +2590 -2637
- telegrinder/bot/cute_types/pre_checkout_query.py +42 -0
- telegrinder/bot/cute_types/update.py +112 -104
- telegrinder/bot/cute_types/utils.py +62 -95
- telegrinder/bot/dispatch/__init__.py +59 -55
- telegrinder/bot/dispatch/abc.py +76 -77
- telegrinder/bot/dispatch/context.py +96 -98
- telegrinder/bot/dispatch/dispatch.py +254 -202
- telegrinder/bot/dispatch/handler/__init__.py +13 -13
- telegrinder/bot/dispatch/handler/abc.py +23 -24
- telegrinder/bot/dispatch/handler/audio_reply.py +44 -44
- telegrinder/bot/dispatch/handler/base.py +57 -57
- telegrinder/bot/dispatch/handler/document_reply.py +44 -44
- telegrinder/bot/dispatch/handler/func.py +129 -135
- telegrinder/bot/dispatch/handler/media_group_reply.py +44 -43
- telegrinder/bot/dispatch/handler/message_reply.py +36 -36
- telegrinder/bot/dispatch/handler/photo_reply.py +44 -44
- telegrinder/bot/dispatch/handler/sticker_reply.py +37 -37
- telegrinder/bot/dispatch/handler/video_reply.py +44 -44
- telegrinder/bot/dispatch/middleware/__init__.py +3 -3
- telegrinder/bot/dispatch/middleware/abc.py +97 -22
- telegrinder/bot/dispatch/middleware/global_middleware.py +70 -0
- telegrinder/bot/dispatch/process.py +151 -157
- telegrinder/bot/dispatch/return_manager/__init__.py +15 -13
- telegrinder/bot/dispatch/return_manager/abc.py +104 -108
- telegrinder/bot/dispatch/return_manager/callback_query.py +20 -20
- telegrinder/bot/dispatch/return_manager/inline_query.py +15 -15
- telegrinder/bot/dispatch/return_manager/message.py +36 -36
- telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +20 -0
- telegrinder/bot/dispatch/view/__init__.py +15 -13
- telegrinder/bot/dispatch/view/abc.py +45 -41
- telegrinder/bot/dispatch/view/base.py +231 -200
- telegrinder/bot/dispatch/view/box.py +140 -129
- telegrinder/bot/dispatch/view/callback_query.py +16 -17
- telegrinder/bot/dispatch/view/chat_join_request.py +11 -16
- telegrinder/bot/dispatch/view/chat_member.py +37 -39
- telegrinder/bot/dispatch/view/inline_query.py +16 -17
- telegrinder/bot/dispatch/view/message.py +43 -44
- telegrinder/bot/dispatch/view/pre_checkout_query.py +16 -0
- telegrinder/bot/dispatch/view/raw.py +116 -114
- telegrinder/bot/dispatch/waiter_machine/__init__.py +17 -17
- telegrinder/bot/dispatch/waiter_machine/actions.py +14 -13
- telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +8 -8
- telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +55 -55
- telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +59 -57
- telegrinder/bot/dispatch/waiter_machine/hasher/message.py +51 -51
- telegrinder/bot/dispatch/waiter_machine/hasher/state.py +20 -19
- telegrinder/bot/dispatch/waiter_machine/machine.py +251 -172
- telegrinder/bot/dispatch/waiter_machine/middleware.py +94 -89
- telegrinder/bot/dispatch/waiter_machine/short_state.py +57 -68
- telegrinder/bot/polling/__init__.py +4 -4
- telegrinder/bot/polling/abc.py +25 -25
- telegrinder/bot/polling/polling.py +139 -131
- telegrinder/bot/rules/__init__.py +85 -62
- telegrinder/bot/rules/abc.py +213 -206
- telegrinder/bot/rules/callback_data.py +122 -163
- telegrinder/bot/rules/chat_join.py +45 -43
- telegrinder/bot/rules/command.py +126 -126
- telegrinder/bot/rules/enum_text.py +33 -36
- telegrinder/bot/rules/func.py +28 -26
- telegrinder/bot/rules/fuzzy.py +24 -24
- telegrinder/bot/rules/id.py +24 -0
- telegrinder/bot/rules/inline.py +58 -56
- telegrinder/bot/rules/integer.py +21 -20
- telegrinder/bot/rules/is_from.py +127 -127
- telegrinder/bot/rules/logic.py +18 -0
- telegrinder/bot/rules/markup.py +42 -43
- telegrinder/bot/rules/mention.py +14 -14
- telegrinder/bot/rules/message.py +15 -17
- telegrinder/bot/rules/message_entities.py +33 -35
- telegrinder/bot/rules/node.py +33 -27
- telegrinder/bot/rules/payload.py +81 -0
- telegrinder/bot/rules/payment_invoice.py +29 -0
- telegrinder/bot/rules/regex.py +36 -37
- telegrinder/bot/rules/rule_enum.py +72 -72
- telegrinder/bot/rules/start.py +42 -42
- telegrinder/bot/rules/state.py +35 -37
- telegrinder/bot/rules/text.py +38 -33
- telegrinder/bot/rules/update.py +15 -15
- telegrinder/bot/scenario/__init__.py +5 -5
- telegrinder/bot/scenario/abc.py +17 -19
- telegrinder/bot/scenario/checkbox.py +174 -176
- telegrinder/bot/scenario/choice.py +48 -51
- telegrinder/client/__init__.py +12 -4
- telegrinder/client/abc.py +100 -75
- telegrinder/client/aiohttp.py +134 -130
- telegrinder/client/form_data.py +31 -0
- telegrinder/client/sonic.py +212 -0
- telegrinder/model.py +208 -315
- telegrinder/modules.py +239 -237
- telegrinder/msgspec_json.py +14 -14
- telegrinder/msgspec_utils.py +478 -410
- telegrinder/node/__init__.py +86 -25
- telegrinder/node/attachment.py +163 -87
- telegrinder/node/base.py +288 -160
- telegrinder/node/callback_query.py +54 -53
- telegrinder/node/command.py +34 -33
- telegrinder/node/composer.py +163 -198
- telegrinder/node/container.py +33 -27
- telegrinder/node/either.py +82 -0
- telegrinder/node/event.py +54 -65
- telegrinder/node/file.py +51 -0
- telegrinder/node/me.py +15 -16
- telegrinder/node/payload.py +78 -0
- telegrinder/node/polymorphic.py +67 -48
- telegrinder/node/rule.py +72 -76
- telegrinder/node/scope.py +36 -38
- telegrinder/node/source.py +87 -71
- telegrinder/node/text.py +53 -41
- telegrinder/node/tools/__init__.py +3 -3
- telegrinder/node/tools/generator.py +36 -40
- telegrinder/py.typed +0 -0
- telegrinder/rules.py +1 -62
- telegrinder/tools/__init__.py +152 -93
- telegrinder/tools/adapter/__init__.py +19 -0
- telegrinder/tools/adapter/abc.py +49 -0
- telegrinder/tools/adapter/dataclass.py +56 -0
- telegrinder/{bot/rules → tools}/adapter/errors.py +5 -5
- telegrinder/{bot/rules → tools}/adapter/event.py +63 -65
- telegrinder/{bot/rules → tools}/adapter/node.py +46 -48
- telegrinder/{bot/rules → tools}/adapter/raw_event.py +27 -27
- telegrinder/{bot/rules → tools}/adapter/raw_update.py +30 -30
- telegrinder/tools/buttons.py +106 -80
- telegrinder/tools/callback_data_serilization/__init__.py +5 -0
- telegrinder/tools/callback_data_serilization/abc.py +51 -0
- telegrinder/tools/callback_data_serilization/json_ser.py +60 -0
- telegrinder/tools/callback_data_serilization/msgpack_ser.py +172 -0
- telegrinder/tools/error_handler/__init__.py +7 -7
- telegrinder/tools/error_handler/abc.py +30 -33
- telegrinder/tools/error_handler/error.py +9 -9
- telegrinder/tools/error_handler/error_handler.py +179 -193
- telegrinder/tools/formatting/__init__.py +83 -63
- telegrinder/tools/formatting/deep_links.py +541 -0
- telegrinder/tools/formatting/{html.py → html_formatter.py} +266 -294
- telegrinder/tools/formatting/spec_html_formats.py +71 -117
- telegrinder/tools/functional.py +8 -12
- telegrinder/tools/global_context/__init__.py +7 -7
- telegrinder/tools/global_context/abc.py +63 -63
- telegrinder/tools/global_context/global_context.py +387 -412
- telegrinder/tools/global_context/telegrinder_ctx.py +27 -27
- telegrinder/tools/i18n/__init__.py +7 -7
- telegrinder/tools/i18n/abc.py +30 -30
- telegrinder/tools/i18n/middleware/__init__.py +3 -3
- telegrinder/tools/i18n/middleware/abc.py +22 -25
- telegrinder/tools/i18n/simple.py +43 -43
- telegrinder/tools/input_file_directory.py +30 -0
- telegrinder/tools/keyboard.py +128 -128
- telegrinder/tools/lifespan.py +105 -0
- telegrinder/tools/limited_dict.py +32 -37
- telegrinder/tools/loop_wrapper/__init__.py +4 -4
- telegrinder/tools/loop_wrapper/abc.py +20 -15
- telegrinder/tools/loop_wrapper/loop_wrapper.py +169 -224
- telegrinder/tools/magic.py +307 -157
- telegrinder/tools/parse_mode.py +6 -6
- telegrinder/tools/state_storage/__init__.py +4 -4
- telegrinder/tools/state_storage/abc.py +31 -35
- telegrinder/tools/state_storage/memory.py +25 -25
- telegrinder/tools/strings.py +13 -0
- telegrinder/types/__init__.py +268 -260
- telegrinder/types/enums.py +711 -701
- telegrinder/types/input_file.py +51 -0
- telegrinder/types/methods.py +5055 -4633
- telegrinder/types/objects.py +7058 -6950
- telegrinder/verification_utils.py +30 -32
- {telegrinder-0.3.4.dist-info → telegrinder-0.4.0.dist-info}/LICENSE +22 -22
- telegrinder-0.4.0.dist-info/METADATA +144 -0
- telegrinder-0.4.0.dist-info/RECORD +182 -0
- {telegrinder-0.3.4.dist-info → telegrinder-0.4.0.dist-info}/WHEEL +1 -1
- telegrinder/bot/rules/adapter/__init__.py +0 -17
- telegrinder/bot/rules/adapter/abc.py +0 -31
- telegrinder/node/message.py +0 -14
- telegrinder/node/update.py +0 -15
- telegrinder/tools/formatting/links.py +0 -38
- telegrinder/tools/kb_set/__init__.py +0 -4
- telegrinder/tools/kb_set/base.py +0 -15
- telegrinder/tools/kb_set/yaml.py +0 -63
- telegrinder-0.3.4.dist-info/METADATA +0 -110
- telegrinder-0.3.4.dist-info/RECORD +0 -165
telegrinder/types/enums.py
CHANGED
|
@@ -1,701 +1,711 @@
|
|
|
1
|
-
import enum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class ProgrammingLanguage(str, enum.Enum):
|
|
5
|
-
"""Type of ProgrammingLanguage."""
|
|
6
|
-
|
|
7
|
-
ASSEMBLY = "assembly"
|
|
8
|
-
PYTHON = "python"
|
|
9
|
-
RUST = "rust"
|
|
10
|
-
RUBY = "ruby"
|
|
11
|
-
JAVA = "java"
|
|
12
|
-
C = "c"
|
|
13
|
-
C_SHARP = "cs"
|
|
14
|
-
CPP = "cpp"
|
|
15
|
-
CSS = "css"
|
|
16
|
-
OBJECTIVE_C = "Objective-C"
|
|
17
|
-
CYTHON = "cython"
|
|
18
|
-
CARBON = "carbon"
|
|
19
|
-
COBRA = "cobra"
|
|
20
|
-
SWIFT = "swift"
|
|
21
|
-
LAURELANG = "laurelang"
|
|
22
|
-
DART = "dart"
|
|
23
|
-
DELPHI = "delphi"
|
|
24
|
-
ELIXIR = "elixir"
|
|
25
|
-
HASKELL = "haskell"
|
|
26
|
-
PASCAL = "pascal"
|
|
27
|
-
TYPE_SCRIPT = "ts"
|
|
28
|
-
JAVA_SCRIPT = "js"
|
|
29
|
-
PHP = "php"
|
|
30
|
-
GO = "go"
|
|
31
|
-
SQL = "sql"
|
|
32
|
-
F_SHARP = "fs"
|
|
33
|
-
FORTRAN = "fortran"
|
|
34
|
-
KOTLIN = "kotlin"
|
|
35
|
-
HTML = "html"
|
|
36
|
-
YAML = "yaml"
|
|
37
|
-
JSON = "json"
|
|
38
|
-
MARKDOWN = "markdown"
|
|
39
|
-
MARKUP = "markup"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class ChatAction(str, enum.Enum):
|
|
43
|
-
"""Type of ChatAction.
|
|
44
|
-
|
|
45
|
-
Choose one, depending on what the user is about to receive:
|
|
46
|
-
- typing for text messages,
|
|
47
|
-
- upload_photo for photos,
|
|
48
|
-
- record_video or upload_video for videos,
|
|
49
|
-
- record_voice or upload_voice for voice notes,
|
|
50
|
-
- upload_document for general files,
|
|
51
|
-
- choose_sticker for stickers,
|
|
52
|
-
- find_location for location data,
|
|
53
|
-
- record_video_note or upload_video_note for video notes.
|
|
54
|
-
|
|
55
|
-
Docs: https://core.telegram.org/bots/api#sendchataction
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
"""
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
""
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
""
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
""
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
""
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
(
|
|
480
|
-
(
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
class
|
|
541
|
-
"""
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
"""
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
"""
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
VIDEO_MP4 = "video/mp4"
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
class
|
|
582
|
-
"""
|
|
583
|
-
|
|
584
|
-
"""
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
""
|
|
599
|
-
|
|
600
|
-
""
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
class
|
|
617
|
-
"""MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
|
|
618
|
-
or `video/mp4`. Defaults to `image/jpeg`.
|
|
619
|
-
"""
|
|
620
|
-
|
|
621
|
-
IMAGE_JPEG = "image/jpeg"
|
|
622
|
-
IMAGE_GIF = "image/gif"
|
|
623
|
-
VIDEO_MP4 = "video/mp4"
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
class
|
|
627
|
-
"""MIME type of the
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
"
|
|
674
|
-
|
|
675
|
-
"
|
|
676
|
-
"
|
|
677
|
-
"
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
"
|
|
682
|
-
"
|
|
683
|
-
"
|
|
684
|
-
"
|
|
685
|
-
"
|
|
686
|
-
"
|
|
687
|
-
"
|
|
688
|
-
"
|
|
689
|
-
"
|
|
690
|
-
"
|
|
691
|
-
"
|
|
692
|
-
"
|
|
693
|
-
"
|
|
694
|
-
"
|
|
695
|
-
"
|
|
696
|
-
"
|
|
697
|
-
"
|
|
698
|
-
"
|
|
699
|
-
"
|
|
700
|
-
"
|
|
701
|
-
|
|
1
|
+
import enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ProgrammingLanguage(str, enum.Enum):
|
|
5
|
+
"""Type of ProgrammingLanguage."""
|
|
6
|
+
|
|
7
|
+
ASSEMBLY = "assembly"
|
|
8
|
+
PYTHON = "python"
|
|
9
|
+
RUST = "rust"
|
|
10
|
+
RUBY = "ruby"
|
|
11
|
+
JAVA = "java"
|
|
12
|
+
C = "c"
|
|
13
|
+
C_SHARP = "cs"
|
|
14
|
+
CPP = "cpp"
|
|
15
|
+
CSS = "css"
|
|
16
|
+
OBJECTIVE_C = "Objective-C"
|
|
17
|
+
CYTHON = "cython"
|
|
18
|
+
CARBON = "carbon"
|
|
19
|
+
COBRA = "cobra"
|
|
20
|
+
SWIFT = "swift"
|
|
21
|
+
LAURELANG = "laurelang"
|
|
22
|
+
DART = "dart"
|
|
23
|
+
DELPHI = "delphi"
|
|
24
|
+
ELIXIR = "elixir"
|
|
25
|
+
HASKELL = "haskell"
|
|
26
|
+
PASCAL = "pascal"
|
|
27
|
+
TYPE_SCRIPT = "ts"
|
|
28
|
+
JAVA_SCRIPT = "js"
|
|
29
|
+
PHP = "php"
|
|
30
|
+
GO = "go"
|
|
31
|
+
SQL = "sql"
|
|
32
|
+
F_SHARP = "fs"
|
|
33
|
+
FORTRAN = "fortran"
|
|
34
|
+
KOTLIN = "kotlin"
|
|
35
|
+
HTML = "html"
|
|
36
|
+
YAML = "yaml"
|
|
37
|
+
JSON = "json"
|
|
38
|
+
MARKDOWN = "markdown"
|
|
39
|
+
MARKUP = "markup"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ChatAction(str, enum.Enum):
|
|
43
|
+
"""Type of ChatAction.
|
|
44
|
+
|
|
45
|
+
Choose one, depending on what the user is about to receive:
|
|
46
|
+
- typing for text messages,
|
|
47
|
+
- upload_photo for photos,
|
|
48
|
+
- record_video or upload_video for videos,
|
|
49
|
+
- record_voice or upload_voice for voice notes,
|
|
50
|
+
- upload_document for general files,
|
|
51
|
+
- choose_sticker for stickers,
|
|
52
|
+
- find_location for location data,
|
|
53
|
+
- record_video_note or upload_video_note for video notes.
|
|
54
|
+
|
|
55
|
+
Docs: https://core.telegram.org/bots/api#sendchataction
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
TYPING = "typing"
|
|
59
|
+
UPLOAD_PHOTO = "upload_photo"
|
|
60
|
+
RECORD_VIDEO = "record_video"
|
|
61
|
+
UPLOAD_VIDEO = "upload_video"
|
|
62
|
+
RECORD_VOICE = "record_voice"
|
|
63
|
+
UPLOAD_VOICE = "upload_voice"
|
|
64
|
+
UPLOAD_DOCUMENT = "upload_document"
|
|
65
|
+
CHOOSE_STICKER = "choose_sticker"
|
|
66
|
+
FIND_LOCATION = "find_location"
|
|
67
|
+
RECORD_VIDEO_NOTE = "record_video_note"
|
|
68
|
+
UPLOAD_VIDEO_NOTE = "upload_video_note"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class ReactionEmoji(str, enum.Enum):
|
|
72
|
+
"""Type of ReactionEmoji.
|
|
73
|
+
|
|
74
|
+
Currently, it can be one of `👍`, `👎`, `❤`, `🔥`, `🥰`, `👏`,
|
|
75
|
+
`😁`, `🤔`, `🤯`, `😱`, `🤬`, `😢`, `🎉`, `🤩`, `🤮`, `💩`, `🙏`, `👌`, `🕊`, `🤡`, `🥱`,
|
|
76
|
+
`🥴`, `😍`, `🐳`, `❤🔥`, `🌚`, `🌭`, `💯`, `🤣`, `⚡`, `🍌`, `🏆`, `💔`, `🤨`, `😐`, `🍓`,
|
|
77
|
+
`🍾`, `💋`, `🖕`, `😈`, `😴`, `😭`, `🤓`, `👻`, `👨💻`, `👀`, `🎃`, `🙈`, `😇`, `😨`, `🤝`,
|
|
78
|
+
`✍`, `🤗`, `🫡`, `🎅`, `🎄`, `☃`, `💅`, `🤪`, `🗿`, `🆒`, `💘`, `🙉`, `🦄`, `😘`, `💊`,
|
|
79
|
+
`🙊`, `😎`, `👾`, `🤷♂`, `🤷`, `🤷♀`, `😡`.
|
|
80
|
+
|
|
81
|
+
Docs: https://core.telegram.org/bots/api#reactiontypeemoji
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
THUMBS_UP = "👍"
|
|
85
|
+
THUMBS_DOWN = "👎"
|
|
86
|
+
RED_HEART = "❤"
|
|
87
|
+
FIRE = "🔥"
|
|
88
|
+
SMILING_FACE_WITH_HEARTS = "🥰"
|
|
89
|
+
CLAPPING_HANDS = "👏"
|
|
90
|
+
BEAMING_FACE_WITH_SMILING_EYES = "😁"
|
|
91
|
+
THINKING_FACE = "🤔"
|
|
92
|
+
EXPLODING_HEAD = "🤯"
|
|
93
|
+
FACE_SCREAMING_IN_FEAR = "😱"
|
|
94
|
+
FACE_WITH_SYMBOLS_ON_MOUTH = "🤬"
|
|
95
|
+
CRYING_FACE = "😢"
|
|
96
|
+
PARTY_POPPER = "🎉"
|
|
97
|
+
STAR_STRUCK = "🤩"
|
|
98
|
+
FACE_VOMITING = "🤮"
|
|
99
|
+
PILE_OF_POO = "💩"
|
|
100
|
+
FOLDED_HANDS = "🙏"
|
|
101
|
+
OK_HAND = "👌"
|
|
102
|
+
DOVE = "🕊"
|
|
103
|
+
CLOWN_FACE = "🤡"
|
|
104
|
+
YAWNING_FACE = "🥱"
|
|
105
|
+
WOOZY_FACE = "🥴"
|
|
106
|
+
SMILING_FACE_WITH_HEART_EYES = "😍"
|
|
107
|
+
SPOUTING_WHALE = "🐳"
|
|
108
|
+
HEART_ON_FIRE = "❤🔥"
|
|
109
|
+
NEW_MOON_FACE = "🌚"
|
|
110
|
+
HOT_DOG = "🌭"
|
|
111
|
+
HUNDRED_POINTS = "💯"
|
|
112
|
+
ROLLING_ON_THE_FLOOR_LAUGHING = "🤣"
|
|
113
|
+
HIGH_VOLTAGE = "⚡"
|
|
114
|
+
BANANA = "🍌"
|
|
115
|
+
TROPHY = "🏆"
|
|
116
|
+
BROKEN_HEART = "💔"
|
|
117
|
+
FACE_WITH_RAISED_EYEBROW = "🤨"
|
|
118
|
+
NEUTRAL_FACE = "😐"
|
|
119
|
+
STRAWBERRY = "🍓"
|
|
120
|
+
BOTTLE_WITH_POPPING_CORK = "🍾"
|
|
121
|
+
KISS_MARK = "💋"
|
|
122
|
+
MIDDLE_FINGER = "🖕"
|
|
123
|
+
SMILING_FACE_WITH_HORNS = "😈"
|
|
124
|
+
SLEEPING_FACE = "😴"
|
|
125
|
+
LOUDLY_CRYING_FACE = "😭"
|
|
126
|
+
NERD_FACE = "🤓"
|
|
127
|
+
GHOST = "👻"
|
|
128
|
+
MAN_TECHNOLOGIST = "👨💻"
|
|
129
|
+
EYES = "👀"
|
|
130
|
+
JACK_O_LANTERN = "🎃"
|
|
131
|
+
SEE_NO_EVIL_MONKEY = "🙈"
|
|
132
|
+
SMILING_FACE_WITH_HALO = "😇"
|
|
133
|
+
FEARFUL_FACE = "😨"
|
|
134
|
+
HANDSHAKE = "🤝"
|
|
135
|
+
WRITING_HAND = "✍"
|
|
136
|
+
SMILING_FACE_WITH_OPEN_HANDS = "🤗"
|
|
137
|
+
SALUTING_FACE = "🫡"
|
|
138
|
+
SANTA_CLAUS = "🎅"
|
|
139
|
+
CHRISTMAS_TREE = "🎄"
|
|
140
|
+
SNOWMAN = "☃"
|
|
141
|
+
NAIL_POLISH = "💅"
|
|
142
|
+
ZANY_FACE = "🤪"
|
|
143
|
+
MOAI = "🗿"
|
|
144
|
+
COOL_BUTTON = "🆒"
|
|
145
|
+
HEART_WITH_ARROW = "💘"
|
|
146
|
+
HEAR_NO_EVIL_MONKEY = "🙉"
|
|
147
|
+
UNICORN = "🦄"
|
|
148
|
+
FACE_BLOWING_A_KISS = "😘"
|
|
149
|
+
PILL = "💊"
|
|
150
|
+
SPEAK_NO_EVIL_MONKEY = "🙊"
|
|
151
|
+
SMILING_FACE_WITH_SUNGLASSES = "😎"
|
|
152
|
+
ALIEN_MONSTER = "👾"
|
|
153
|
+
MAN_SHRUGGING = "🤷♂"
|
|
154
|
+
PERSON_SHRUGGING = "🤷"
|
|
155
|
+
WOMAN_SHRUGGING = "🤷♀"
|
|
156
|
+
ENRAGED_FACE = "😡"
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class DefaultAccentColor(int, enum.Enum):
|
|
160
|
+
"""Type of DefaultAccentColor.
|
|
161
|
+
|
|
162
|
+
One of 7 possible user colors:
|
|
163
|
+
- Red
|
|
164
|
+
- Orange
|
|
165
|
+
- Purple
|
|
166
|
+
- Green
|
|
167
|
+
- Cyan
|
|
168
|
+
- Blue
|
|
169
|
+
- Pink
|
|
170
|
+
|
|
171
|
+
Docs: https://core.telegram.org/bots/api#accent-colors
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
RED = 0
|
|
175
|
+
ORANGE = 1
|
|
176
|
+
PURPLE = 2
|
|
177
|
+
GREEN = 3
|
|
178
|
+
CYAN = 4
|
|
179
|
+
BLUE = 5
|
|
180
|
+
PINK = 6
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class TopicIconColor(int, enum.Enum):
|
|
184
|
+
"""Type of TopicIconColor.
|
|
185
|
+
|
|
186
|
+
Docs: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
BLUE = 0x6FB9F0
|
|
190
|
+
YELLOW = 0xFFD67E
|
|
191
|
+
VIOLET = 0xCB86DB
|
|
192
|
+
GREEN = 0x8EEE98
|
|
193
|
+
ROSE = 0xFF93B2
|
|
194
|
+
RED = 0xFB6F5F
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class ChatBoostSourceType(str, enum.Enum):
|
|
198
|
+
"""Type of ChatBoostSourceType
|
|
199
|
+
Docs: https://core.telegram.org/bots/api#chatboostsource
|
|
200
|
+
"""
|
|
201
|
+
|
|
202
|
+
PREMIUM = "premium"
|
|
203
|
+
GIFT_CODE = "gift_code"
|
|
204
|
+
GIVEAWAY = "giveaway"
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class ContentType(str, enum.Enum):
|
|
208
|
+
"""Type of ContentType."""
|
|
209
|
+
|
|
210
|
+
TEXT = "text"
|
|
211
|
+
ANIMATION = "animation"
|
|
212
|
+
AUDIO = "audio"
|
|
213
|
+
DOCUMENT = "document"
|
|
214
|
+
PHOTO = "photo"
|
|
215
|
+
STICKER = "sticker"
|
|
216
|
+
STORY = "story"
|
|
217
|
+
VIDEO = "video"
|
|
218
|
+
VIDEO_NOTE = "video_note"
|
|
219
|
+
VOICE = "voice"
|
|
220
|
+
HAS_MEDIA_SPOILER = "has_media_spoiler"
|
|
221
|
+
CONTACT = "contact"
|
|
222
|
+
DICE = "dice"
|
|
223
|
+
GAME = "game"
|
|
224
|
+
POLL = "poll"
|
|
225
|
+
VENUE = "venue"
|
|
226
|
+
LOCATION = "location"
|
|
227
|
+
NEW_CHAT_MEMBERS = "new_chat_members"
|
|
228
|
+
LEFT_CHAT_MEMBER = "left_chat_member"
|
|
229
|
+
NEW_CHAT_TITLE = "new_chat_title"
|
|
230
|
+
NEW_CHAT_PHOTO = "new_chat_photo"
|
|
231
|
+
DELETE_CHAT_PHOTO = "delete_chat_photo"
|
|
232
|
+
GROUP_CHAT_CREATED = "group_chat_created"
|
|
233
|
+
BOOST_ADDED = "boost_added"
|
|
234
|
+
SUPERGROUP_CHAT_CREATED = "supergroup_chat_created"
|
|
235
|
+
CHANNEL_CHAT_CREATED = "channel_chat_created"
|
|
236
|
+
MESSAGE_AUTO_DELETE_TIMER_CHANGED = "message_auto_delete_timer_changed"
|
|
237
|
+
MIGRATE_TO_CHAT_ID = "migrate_to_chat_id"
|
|
238
|
+
MIGRATE_FROM_CHAT_ID = "migrate_from_chat_id"
|
|
239
|
+
PINNED_MESSAGE = "pinned_message"
|
|
240
|
+
INVOICE = "invoice"
|
|
241
|
+
SUCCESSFUL_PAYMENT = "successful_payment"
|
|
242
|
+
USERS_SHARED = "users_shared"
|
|
243
|
+
CHAT_SHARED = "chat_shared"
|
|
244
|
+
CONNECTED_WEBSITE = "connected_website"
|
|
245
|
+
WRITE_ACCESS_ALLOWED = "write_access_allowed"
|
|
246
|
+
PASSPORT_DATA = "passport_data"
|
|
247
|
+
PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered"
|
|
248
|
+
FORUM_TOPIC_CREATED = "forum_topic_created"
|
|
249
|
+
FORUM_TOPIC_EDITED = "forum_topic_edited"
|
|
250
|
+
FORUM_TOPIC_CLOSED = "forum_topic_closed"
|
|
251
|
+
FORUM_TOPIC_REOPENED = "forum_topic_reopened"
|
|
252
|
+
GENERAL_FORUM_TOPIC_HIDDEN = "general_forum_topic_hidden"
|
|
253
|
+
GENERAL_FORUM_TOPIC_UNHIDDEN = "general_forum_topic_unhidden"
|
|
254
|
+
GIVEAWAY_CREATED = "giveaway_created"
|
|
255
|
+
GIVEAWAY = "giveaway"
|
|
256
|
+
GIVEAWAY_WINNERS = "giveaway_winners"
|
|
257
|
+
GIVEAWAY_COMPLETED = "giveaway_completed"
|
|
258
|
+
VIDEO_CHAT_SCHEDULED = "video_chat_scheduled"
|
|
259
|
+
VIDEO_CHAT_STARTED = "video_chat_started"
|
|
260
|
+
VIDEO_CHAT_ENDED = "video_chat_ended"
|
|
261
|
+
VIDEO_CHAT_PARTICIPANTS_INVITED = "video_chat_participants_invited"
|
|
262
|
+
WEB_APP_DATA = "web_app_data"
|
|
263
|
+
USER_SHARED = "user_shared"
|
|
264
|
+
UNKNOWN = "unknown"
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
class Currency(str, enum.Enum):
|
|
268
|
+
"""Type of Currency.
|
|
269
|
+
Docs: https://core.telegram.org/bots/payments#supported-currencies
|
|
270
|
+
"""
|
|
271
|
+
|
|
272
|
+
AED = "AED"
|
|
273
|
+
AFN = "AFN"
|
|
274
|
+
ALL = "ALL"
|
|
275
|
+
AMD = "AMD"
|
|
276
|
+
ARS = "ARS"
|
|
277
|
+
AUD = "AUD"
|
|
278
|
+
AZN = "AZN"
|
|
279
|
+
BAM = "BAM"
|
|
280
|
+
BDT = "BDT"
|
|
281
|
+
BGN = "BGN"
|
|
282
|
+
BND = "BND"
|
|
283
|
+
BOB = "BOB"
|
|
284
|
+
BRL = "BRL"
|
|
285
|
+
BYN = "BYN"
|
|
286
|
+
CAD = "CAD"
|
|
287
|
+
CHF = "CHF"
|
|
288
|
+
CLP = "CLP"
|
|
289
|
+
CNY = "CNY"
|
|
290
|
+
COP = "COP"
|
|
291
|
+
CRC = "CRC"
|
|
292
|
+
CZK = "CZK"
|
|
293
|
+
DKK = "DKK"
|
|
294
|
+
DOP = "DOP"
|
|
295
|
+
DZD = "DZD"
|
|
296
|
+
EGP = "EGP"
|
|
297
|
+
ETB = "ETB"
|
|
298
|
+
EUR = "EUR"
|
|
299
|
+
GBP = "GBP"
|
|
300
|
+
GEL = "GEL"
|
|
301
|
+
GTQ = "GTQ"
|
|
302
|
+
HKD = "HKD"
|
|
303
|
+
HNL = "HNL"
|
|
304
|
+
HRK = "HRK"
|
|
305
|
+
HUF = "HUF"
|
|
306
|
+
IDR = "IDR"
|
|
307
|
+
ILS = "ILS"
|
|
308
|
+
INR = "INR"
|
|
309
|
+
ISK = "ISK"
|
|
310
|
+
JMD = "JMD"
|
|
311
|
+
JPY = "JPY"
|
|
312
|
+
KES = "KES"
|
|
313
|
+
KGS = "KGS"
|
|
314
|
+
KRW = "KRW"
|
|
315
|
+
KZT = "KZT"
|
|
316
|
+
LBP = "LBP"
|
|
317
|
+
LKR = "LKR"
|
|
318
|
+
MAD = "MAD"
|
|
319
|
+
MDL = "MDL"
|
|
320
|
+
MNT = "MNT"
|
|
321
|
+
MUR = "MUR"
|
|
322
|
+
MVR = "MVR"
|
|
323
|
+
MXN = "MXN"
|
|
324
|
+
MYR = "MYR"
|
|
325
|
+
MZN = "MZN"
|
|
326
|
+
NGN = "NGN"
|
|
327
|
+
NIO = "NIO"
|
|
328
|
+
NOK = "NOK"
|
|
329
|
+
NPR = "NPR"
|
|
330
|
+
NZD = "NZD"
|
|
331
|
+
PAB = "PAB"
|
|
332
|
+
PEN = "PEN"
|
|
333
|
+
PHP = "PHP"
|
|
334
|
+
PKR = "PKR"
|
|
335
|
+
PLN = "PLN"
|
|
336
|
+
PYG = "PYG"
|
|
337
|
+
QAR = "QAR"
|
|
338
|
+
RON = "RON"
|
|
339
|
+
RSD = "RSD"
|
|
340
|
+
RUB = "RUB"
|
|
341
|
+
SAR = "SAR"
|
|
342
|
+
SEK = "SEK"
|
|
343
|
+
SGD = "SGD"
|
|
344
|
+
THB = "THB"
|
|
345
|
+
TJS = "TJS"
|
|
346
|
+
TRY = "TRY"
|
|
347
|
+
TTD = "TTD"
|
|
348
|
+
TWD = "TWD"
|
|
349
|
+
TZS = "TZS"
|
|
350
|
+
UAH = "UAH"
|
|
351
|
+
UGX = "UGX"
|
|
352
|
+
USD = "USD"
|
|
353
|
+
UYU = "UYU"
|
|
354
|
+
UZS = "UZS"
|
|
355
|
+
VND = "VND"
|
|
356
|
+
YER = "YER"
|
|
357
|
+
ZAR = "ZAR"
|
|
358
|
+
XTR = "XTR"
|
|
359
|
+
"""Telegram stars."""
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
class InlineQueryResultType(str, enum.Enum):
|
|
363
|
+
"""Type of InlineQueryResultType.
|
|
364
|
+
Docs: https://core.telegram.org/bots/api#inlinequeryresult
|
|
365
|
+
"""
|
|
366
|
+
|
|
367
|
+
AUDIO = "audio"
|
|
368
|
+
DOCUMENT = "document"
|
|
369
|
+
GIF = "gif"
|
|
370
|
+
MPEG4_GIF = "mpeg4_gif"
|
|
371
|
+
PHOTO = "photo"
|
|
372
|
+
STICKER = "sticker"
|
|
373
|
+
VIDEO = "video"
|
|
374
|
+
VOICE = "voice"
|
|
375
|
+
ARTICLE = "article"
|
|
376
|
+
CONTACT = "contact"
|
|
377
|
+
GAME = "game"
|
|
378
|
+
LOCATION = "location"
|
|
379
|
+
VENUE = "venue"
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class MenuButtonType(str, enum.Enum):
|
|
383
|
+
"""TType of MenuButtonType.
|
|
384
|
+
Docs: https://core.telegram.org/bots/api#menubuttondefault
|
|
385
|
+
"""
|
|
386
|
+
|
|
387
|
+
DEFAULT = "default"
|
|
388
|
+
COMMANDS = "commands"
|
|
389
|
+
WEB_APP = "web_app"
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
class InputMediaType(str, enum.Enum):
|
|
393
|
+
"""Type of InputMediaType.
|
|
394
|
+
Docs: https://core.telegram.org/bots/api#inputmedia
|
|
395
|
+
"""
|
|
396
|
+
|
|
397
|
+
ANIMATION = "animation"
|
|
398
|
+
AUDIO = "audio"
|
|
399
|
+
DOCUMENT = "document"
|
|
400
|
+
PHOTO = "photo"
|
|
401
|
+
VIDEO = "video"
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
class UpdateType(str, enum.Enum):
|
|
405
|
+
"""Type of update."""
|
|
406
|
+
|
|
407
|
+
MESSAGE = "message"
|
|
408
|
+
EDITED_MESSAGE = "edited_message"
|
|
409
|
+
CHANNEL_POST = "channel_post"
|
|
410
|
+
EDITED_CHANNEL_POST = "edited_channel_post"
|
|
411
|
+
MESSAGE_REACTION = "message_reaction"
|
|
412
|
+
MESSAGE_REACTION_COUNT = "message_reaction_count"
|
|
413
|
+
INLINE_QUERY = "inline_query"
|
|
414
|
+
CHOSEN_INLINE_RESULT = "chosen_inline_result"
|
|
415
|
+
CALLBACK_QUERY = "callback_query"
|
|
416
|
+
SHIPPING_QUERY = "shipping_query"
|
|
417
|
+
PRE_CHECKOUT_QUERY = "pre_checkout_query"
|
|
418
|
+
POLL = "poll"
|
|
419
|
+
POLL_ANSWER = "poll_answer"
|
|
420
|
+
MY_CHAT_MEMBER = "my_chat_member"
|
|
421
|
+
CHAT_MEMBER = "chat_member"
|
|
422
|
+
CHAT_JOIN_REQUEST = "chat_join_request"
|
|
423
|
+
CHAT_BOOST = "chat_boost"
|
|
424
|
+
REMOVED_CHAT_BOOST = "removed_chat_boost"
|
|
425
|
+
BUSINESS_CONNECTION = "business_connection"
|
|
426
|
+
BUSINESS_MESSAGE = "business_message"
|
|
427
|
+
EDITED_BUSINESS_MESSAGE = "edited_business_message"
|
|
428
|
+
DELETE_BUSINESS_MESSAGE = "delete_business_messages"
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
class BotCommandScopeType(str, enum.Enum):
|
|
432
|
+
"""Type of BotCommandScope.
|
|
433
|
+
Represents the scope to which bot commands are applied.
|
|
434
|
+
"""
|
|
435
|
+
|
|
436
|
+
DEFAULT = "default"
|
|
437
|
+
ALL_PRIVATE_CHATS = "all_private_chats"
|
|
438
|
+
ALL_GROUP_CHATS = "all_group_chats"
|
|
439
|
+
ALL_CHAT_ADMINISTRATORS = "all_chat_administrators"
|
|
440
|
+
CHAT = "chat"
|
|
441
|
+
CHAT_ADMINISTRATORS = "chat_administrators"
|
|
442
|
+
CHAT_MEMBER = "chat_member"
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
class ChatType(str, enum.Enum):
|
|
446
|
+
"""Type of chat, can be either `private`, `group`, `supergroup` or `channel`."""
|
|
447
|
+
|
|
448
|
+
PRIVATE = "private"
|
|
449
|
+
GROUP = "group"
|
|
450
|
+
SUPERGROUP = "supergroup"
|
|
451
|
+
CHANNEL = "channel"
|
|
452
|
+
SENDER = "sender"
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
class ChatMemberStatus(str, enum.Enum):
|
|
456
|
+
"""Type of ChatMemberStatus."""
|
|
457
|
+
|
|
458
|
+
CREATOR = "creator"
|
|
459
|
+
ADMINISTRATOR = "administrator"
|
|
460
|
+
MEMBER = "member"
|
|
461
|
+
RESTRICTED = "restricted"
|
|
462
|
+
LEFT = "left"
|
|
463
|
+
KICKED = "kicked"
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
class DiceEmoji(str, enum.Enum):
|
|
467
|
+
"""Emoji on which the dice throw animation is based."""
|
|
468
|
+
|
|
469
|
+
DICE = "🎲"
|
|
470
|
+
DART = "🎯"
|
|
471
|
+
BASKETBALL = "🏀"
|
|
472
|
+
FOOTBALL = "⚽"
|
|
473
|
+
SLOT_MACHINE = "🎰"
|
|
474
|
+
BOWLING = "🎳"
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
class MessageEntityType(str, enum.Enum):
|
|
478
|
+
"""Type of the entity. Currently, can be `mention` (@username), `hashtag`
|
|
479
|
+
(#hashtag or #hashtag@chatusername), `cashtag` ($USD or $USD@chatusername),
|
|
480
|
+
`bot_command` (/start@jobs_bot), `url` (https://telegram.org), `email`
|
|
481
|
+
(do-not-reply@telegram.org), `phone_number` (+1-212-555-0123),
|
|
482
|
+
`bold` (bold text), `italic` (italic text), `underline` (underlined
|
|
483
|
+
text), `strikethrough` (strikethrough text), `spoiler` (spoiler message),
|
|
484
|
+
`blockquote` (block quotation), `expandable_blockquote` (collapsed-by-default
|
|
485
|
+
block quotation), `code` (monowidth string), `pre` (monowidth block),
|
|
486
|
+
`text_link` (for clickable text URLs), `text_mention` (for users without
|
|
487
|
+
usernames), `custom_emoji` (for inline custom emoji stickers).
|
|
488
|
+
"""
|
|
489
|
+
|
|
490
|
+
MENTION = "mention"
|
|
491
|
+
HASHTAG = "hashtag"
|
|
492
|
+
CASHTAG = "cashtag"
|
|
493
|
+
BOT_COMMAND = "bot_command"
|
|
494
|
+
URL = "url"
|
|
495
|
+
EMAIL = "email"
|
|
496
|
+
PHONE_NUMBER = "phone_number"
|
|
497
|
+
BOLD = "bold"
|
|
498
|
+
ITALIC = "italic"
|
|
499
|
+
UNDERLINE = "underline"
|
|
500
|
+
STRIKETHROUGH = "strikethrough"
|
|
501
|
+
SPOILER = "spoiler"
|
|
502
|
+
BLOCKQUOTE = "blockquote"
|
|
503
|
+
CODE = "code"
|
|
504
|
+
PRE = "pre"
|
|
505
|
+
TEXT_LINK = "text_link"
|
|
506
|
+
TEXT_MENTION = "text_mention"
|
|
507
|
+
CUSTOM_EMOJI = "custom_emoji"
|
|
508
|
+
EXPANDABLE_BLOCKQUOTE = "expandable_blockquote"
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class PollType(str, enum.Enum):
|
|
512
|
+
"""Poll type, currently can be `regular` or `quiz`."""
|
|
513
|
+
|
|
514
|
+
REGULAR = "regular"
|
|
515
|
+
QUIZ = "quiz"
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
class StickerType(str, enum.Enum):
|
|
519
|
+
"""Type of the sticker, currently one of `regular`, `mask`, `custom_emoji`.
|
|
520
|
+
The type of the sticker is independent from its format, which is determined
|
|
521
|
+
by the fields `is_animated` and `is_video`.
|
|
522
|
+
"""
|
|
523
|
+
|
|
524
|
+
REGULAR = "regular"
|
|
525
|
+
MASK = "mask"
|
|
526
|
+
CUSTOM_EMOJI = "custom_emoji"
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
class MessageOriginType(str, enum.Enum):
|
|
530
|
+
"""Type of MessageOriginType
|
|
531
|
+
Docs: https://core.telegram.org/bots/api#messageorigin
|
|
532
|
+
"""
|
|
533
|
+
|
|
534
|
+
USER = "user"
|
|
535
|
+
HIDDEN_USER = "hidden_user"
|
|
536
|
+
CHAT = "chat"
|
|
537
|
+
CHANNEL = "channel"
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
class StickerSetStickerType(str, enum.Enum):
|
|
541
|
+
"""Type of stickers in the set, currently one of `regular`, `mask`, `custom_emoji`."""
|
|
542
|
+
|
|
543
|
+
REGULAR = "regular"
|
|
544
|
+
MASK = "mask"
|
|
545
|
+
CUSTOM_EMOJI = "custom_emoji"
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
class MaskPositionPoint(str, enum.Enum):
|
|
549
|
+
"""The part of the face relative to which the mask should be placed. One of `forehead`,
|
|
550
|
+
`eyes`, `mouth`, or `chin`.
|
|
551
|
+
"""
|
|
552
|
+
|
|
553
|
+
FOREHEAD = "forehead"
|
|
554
|
+
EYES = "eyes"
|
|
555
|
+
MOUTH = "mouth"
|
|
556
|
+
CHIN = "chin"
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
class InlineQueryChatType(str, enum.Enum):
|
|
560
|
+
"""Type of the chat from which the inline query was sent. Can be
|
|
561
|
+
either `sender` for a private chat with the inline query sender, `private`,
|
|
562
|
+
`group`, `supergroup`, or `channel`. The chat type should be always known
|
|
563
|
+
for requests sent from official clients and most third-party clients,
|
|
564
|
+
unless the request was sent from a secret chat.
|
|
565
|
+
"""
|
|
566
|
+
|
|
567
|
+
SENDER = "sender"
|
|
568
|
+
PRIVATE = "private"
|
|
569
|
+
GROUP = "group"
|
|
570
|
+
SUPERGROUP = "supergroup"
|
|
571
|
+
CHANNEL = "channel"
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
class InlineQueryResultMimeType(str, enum.Enum):
|
|
575
|
+
"""MIME type of the content of the video URL, `text/html` or `video/mp4`."""
|
|
576
|
+
|
|
577
|
+
TEXT_HTML = "text/html"
|
|
578
|
+
VIDEO_MP4 = "video/mp4"
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
class InlineQueryResultThumbnailMimeType(str, enum.Enum):
|
|
582
|
+
"""MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
|
|
583
|
+
or `video/mp4`. Defaults to `image/jpeg`
|
|
584
|
+
"""
|
|
585
|
+
|
|
586
|
+
IMAGE_JPEG = "image/jpeg"
|
|
587
|
+
IMAGE_GIF = "image/gif"
|
|
588
|
+
VIDEO_MP4 = "video/mp4"
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
class PassportElementErrorType(str, enum.Enum):
|
|
592
|
+
"""Type of PassportElementErrorType.
|
|
593
|
+
Docs: https://core.telegram.org/bots/api#passportelementerror
|
|
594
|
+
"""
|
|
595
|
+
|
|
596
|
+
DATA = "data"
|
|
597
|
+
FRONT_SIDE = "front_side"
|
|
598
|
+
REVERSE_SIDE = "reverse_side"
|
|
599
|
+
SELFIE = "selfie"
|
|
600
|
+
FILE = "file"
|
|
601
|
+
FILES = "files"
|
|
602
|
+
TRANSLATION_FILE = "translation_file"
|
|
603
|
+
TRANSLATION_FILES = "translation_files"
|
|
604
|
+
UNSPECIFIED = "unspecified"
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
class ReactionTypeType(str, enum.Enum):
|
|
608
|
+
"""Type of ReactionTypeType.
|
|
609
|
+
Docs: https://core.telegram.org/bots/api#reactiontype
|
|
610
|
+
"""
|
|
611
|
+
|
|
612
|
+
EMOJI = "emoji"
|
|
613
|
+
CUSTOM_EMOJI = "custom_emoji"
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
class InlineQueryResultGifThumbnailMimeType(str, enum.Enum):
|
|
617
|
+
"""MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
|
|
618
|
+
or `video/mp4`. Defaults to `image/jpeg`.
|
|
619
|
+
"""
|
|
620
|
+
|
|
621
|
+
IMAGE_JPEG = "image/jpeg"
|
|
622
|
+
IMAGE_GIF = "image/gif"
|
|
623
|
+
VIDEO_MP4 = "video/mp4"
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
class InlineQueryResultMpeg4GifThumbnailMimeType(str, enum.Enum):
|
|
627
|
+
"""MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
|
|
628
|
+
or `video/mp4`. Defaults to `image/jpeg`.
|
|
629
|
+
"""
|
|
630
|
+
|
|
631
|
+
IMAGE_JPEG = "image/jpeg"
|
|
632
|
+
IMAGE_GIF = "image/gif"
|
|
633
|
+
VIDEO_MP4 = "video/mp4"
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
class InlineQueryResultVideoMimeType(str, enum.Enum):
|
|
637
|
+
"""MIME type of the content of the video URL, `text/html` or `video/mp4`."""
|
|
638
|
+
|
|
639
|
+
TEXT_HTML = "text/html"
|
|
640
|
+
VIDEO_MP4 = "video/mp4"
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
class InlineQueryResultDocumentMimeType(str, enum.Enum):
|
|
644
|
+
"""MIME type of the content of the file, either `application/pdf` or `application/zip`."""
|
|
645
|
+
|
|
646
|
+
APPLICATION_PDF = "application/pdf"
|
|
647
|
+
APPLICATION_ZIP = "application/zip"
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
class EncryptedPassportElementType(str, enum.Enum):
|
|
651
|
+
"""Element type. One of `personal_details`, `passport`, `driver_license`,
|
|
652
|
+
`identity_card`, `internal_passport`, `address`, `utility_bill`,
|
|
653
|
+
`bank_statement`, `rental_agreement`, `passport_registration`,
|
|
654
|
+
`temporary_registration`, `phone_number`, `email`.
|
|
655
|
+
"""
|
|
656
|
+
|
|
657
|
+
PERSONAL_DETAILS = "personal_details"
|
|
658
|
+
PASSPORT = "passport"
|
|
659
|
+
DRIVER_LICENSE = "driver_license"
|
|
660
|
+
IDENTITY_CARD = "identity_card"
|
|
661
|
+
INTERNAL_PASSPORT = "internal_passport"
|
|
662
|
+
ADDRESS = "address"
|
|
663
|
+
UTILITY_BILL = "utility_bill"
|
|
664
|
+
BANK_STATEMENT = "bank_statement"
|
|
665
|
+
RENTAL_AGREEMENT = "rental_agreement"
|
|
666
|
+
PASSPORT_REGISTRATION = "passport_registration"
|
|
667
|
+
TEMPORARY_REGISTRATION = "temporary_registration"
|
|
668
|
+
PHONE_NUMBER = "phone_number"
|
|
669
|
+
EMAIL = "email"
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
class StickerFormat(str, enum.Enum):
|
|
673
|
+
"""Format of the sticker."""
|
|
674
|
+
|
|
675
|
+
STATIC = "static"
|
|
676
|
+
ANIMATED = "animated"
|
|
677
|
+
VIDEO = "video"
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
__all__ = (
|
|
681
|
+
"BotCommandScopeType",
|
|
682
|
+
"ChatAction",
|
|
683
|
+
"ChatBoostSourceType",
|
|
684
|
+
"ChatMemberStatus",
|
|
685
|
+
"ChatType",
|
|
686
|
+
"ContentType",
|
|
687
|
+
"Currency",
|
|
688
|
+
"DefaultAccentColor",
|
|
689
|
+
"DiceEmoji",
|
|
690
|
+
"EncryptedPassportElementType",
|
|
691
|
+
"InlineQueryChatType",
|
|
692
|
+
"InlineQueryResultDocumentMimeType",
|
|
693
|
+
"InlineQueryResultGifThumbnailMimeType",
|
|
694
|
+
"InlineQueryResultMimeType",
|
|
695
|
+
"InlineQueryResultMpeg4GifThumbnailMimeType",
|
|
696
|
+
"InlineQueryResultThumbnailMimeType",
|
|
697
|
+
"InlineQueryResultVideoMimeType",
|
|
698
|
+
"MaskPositionPoint",
|
|
699
|
+
"MessageEntityType",
|
|
700
|
+
"MessageOriginType",
|
|
701
|
+
"PassportElementErrorType",
|
|
702
|
+
"PollType",
|
|
703
|
+
"ProgrammingLanguage",
|
|
704
|
+
"ReactionEmoji",
|
|
705
|
+
"ReactionTypeType",
|
|
706
|
+
"StickerFormat",
|
|
707
|
+
"StickerSetStickerType",
|
|
708
|
+
"StickerType",
|
|
709
|
+
"TopicIconColor",
|
|
710
|
+
"UpdateType",
|
|
711
|
+
)
|