telegrinder 0.1.dev167__py3-none-any.whl → 0.1.dev169__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.

Files changed (101) hide show
  1. telegrinder/__init__.py +9 -3
  2. telegrinder/bot/__init__.py +7 -5
  3. telegrinder/bot/cute_types/base.py +12 -14
  4. telegrinder/bot/cute_types/callback_query.py +55 -44
  5. telegrinder/bot/cute_types/chat_join_request.py +8 -7
  6. telegrinder/bot/cute_types/chat_member_updated.py +23 -17
  7. telegrinder/bot/cute_types/inline_query.py +1 -1
  8. telegrinder/bot/cute_types/message.py +331 -183
  9. telegrinder/bot/cute_types/update.py +4 -8
  10. telegrinder/bot/cute_types/utils.py +1 -5
  11. telegrinder/bot/dispatch/__init__.py +2 -3
  12. telegrinder/bot/dispatch/abc.py +4 -0
  13. telegrinder/bot/dispatch/context.py +9 -4
  14. telegrinder/bot/dispatch/dispatch.py +33 -30
  15. telegrinder/bot/dispatch/handler/func.py +33 -12
  16. telegrinder/bot/dispatch/handler/message_reply.py +6 -3
  17. telegrinder/bot/dispatch/middleware/abc.py +4 -4
  18. telegrinder/bot/dispatch/process.py +40 -13
  19. telegrinder/bot/dispatch/return_manager/abc.py +12 -12
  20. telegrinder/bot/dispatch/return_manager/callback_query.py +1 -3
  21. telegrinder/bot/dispatch/return_manager/inline_query.py +1 -3
  22. telegrinder/bot/dispatch/view/abc.py +74 -31
  23. telegrinder/bot/dispatch/view/box.py +66 -50
  24. telegrinder/bot/dispatch/view/message.py +1 -5
  25. telegrinder/bot/dispatch/view/raw.py +6 -6
  26. telegrinder/bot/dispatch/waiter_machine/__init__.py +2 -1
  27. telegrinder/bot/dispatch/waiter_machine/machine.py +86 -50
  28. telegrinder/bot/dispatch/waiter_machine/middleware.py +31 -7
  29. telegrinder/bot/dispatch/waiter_machine/short_state.py +26 -7
  30. telegrinder/bot/polling/polling.py +4 -4
  31. telegrinder/bot/rules/__init__.py +9 -6
  32. telegrinder/bot/rules/abc.py +99 -22
  33. telegrinder/bot/rules/adapter/__init__.py +4 -1
  34. telegrinder/bot/rules/adapter/abc.py +11 -6
  35. telegrinder/bot/rules/adapter/errors.py +1 -2
  36. telegrinder/bot/rules/adapter/event.py +14 -9
  37. telegrinder/bot/rules/adapter/node.py +42 -0
  38. telegrinder/bot/rules/callback_data.py +13 -15
  39. telegrinder/bot/rules/chat_join.py +3 -2
  40. telegrinder/bot/rules/command.py +26 -14
  41. telegrinder/bot/rules/enum_text.py +5 -5
  42. telegrinder/bot/rules/func.py +6 -6
  43. telegrinder/bot/rules/fuzzy.py +5 -7
  44. telegrinder/bot/rules/inline.py +4 -5
  45. telegrinder/bot/rules/integer.py +10 -8
  46. telegrinder/bot/rules/is_from.py +63 -91
  47. telegrinder/bot/rules/markup.py +5 -5
  48. telegrinder/bot/rules/mention.py +4 -4
  49. telegrinder/bot/rules/message.py +1 -1
  50. telegrinder/bot/rules/node.py +27 -0
  51. telegrinder/bot/rules/regex.py +5 -5
  52. telegrinder/bot/rules/rule_enum.py +4 -4
  53. telegrinder/bot/rules/start.py +5 -5
  54. telegrinder/bot/rules/text.py +9 -13
  55. telegrinder/bot/rules/update.py +4 -4
  56. telegrinder/bot/scenario/__init__.py +3 -3
  57. telegrinder/bot/scenario/checkbox.py +5 -5
  58. telegrinder/bot/scenario/choice.py +5 -5
  59. telegrinder/model.py +49 -15
  60. telegrinder/modules.py +14 -6
  61. telegrinder/msgspec_utils.py +8 -17
  62. telegrinder/node/__init__.py +26 -8
  63. telegrinder/node/attachment.py +13 -9
  64. telegrinder/node/base.py +27 -14
  65. telegrinder/node/callback_query.py +18 -0
  66. telegrinder/node/command.py +29 -0
  67. telegrinder/node/composer.py +119 -30
  68. telegrinder/node/me.py +14 -0
  69. telegrinder/node/message.py +2 -4
  70. telegrinder/node/polymorphic.py +44 -0
  71. telegrinder/node/rule.py +26 -22
  72. telegrinder/node/scope.py +36 -0
  73. telegrinder/node/source.py +37 -10
  74. telegrinder/node/text.py +11 -5
  75. telegrinder/node/tools/__init__.py +2 -2
  76. telegrinder/node/tools/generator.py +6 -6
  77. telegrinder/tools/__init__.py +9 -14
  78. telegrinder/tools/buttons.py +23 -17
  79. telegrinder/tools/error_handler/error_handler.py +11 -14
  80. telegrinder/tools/formatting/__init__.py +0 -6
  81. telegrinder/tools/formatting/html.py +10 -12
  82. telegrinder/tools/formatting/links.py +0 -5
  83. telegrinder/tools/formatting/spec_html_formats.py +0 -11
  84. telegrinder/tools/global_context/abc.py +1 -3
  85. telegrinder/tools/global_context/global_context.py +6 -16
  86. telegrinder/tools/i18n/simple.py +1 -3
  87. telegrinder/tools/kb_set/yaml.py +1 -2
  88. telegrinder/tools/keyboard.py +7 -8
  89. telegrinder/tools/limited_dict.py +13 -3
  90. telegrinder/tools/loop_wrapper/loop_wrapper.py +6 -5
  91. telegrinder/tools/magic.py +27 -5
  92. telegrinder/types/__init__.py +20 -0
  93. telegrinder/types/enums.py +37 -31
  94. telegrinder/types/methods.py +613 -401
  95. telegrinder/types/objects.py +1151 -757
  96. {telegrinder-0.1.dev167.dist-info → telegrinder-0.1.dev169.dist-info}/LICENSE +1 -1
  97. {telegrinder-0.1.dev167.dist-info → telegrinder-0.1.dev169.dist-info}/METADATA +9 -8
  98. telegrinder-0.1.dev169.dist-info/RECORD +143 -0
  99. telegrinder/bot/dispatch/composition.py +0 -88
  100. telegrinder-0.1.dev167.dist-info/RECORD +0 -137
  101. {telegrinder-0.1.dev167.dist-info → telegrinder-0.1.dev169.dist-info}/WHEEL +0 -0
@@ -1,12 +1,34 @@
1
+ import pathlib
1
2
  import typing
2
3
 
3
- from fntypes.co import Some, Variative
4
+ from fntypes.co import Variative
4
5
 
5
6
  from telegrinder.model import Model
6
7
  from telegrinder.msgspec_utils import Nothing, Option, datetime
7
8
  from telegrinder.types.enums import * # noqa: F403
8
9
 
9
10
 
11
+ class TransactionPartner(Model):
12
+ """Base object `TransactionPartner`, see the [documentation](https://core.telegram.org/bots/api#transactionpartner).
13
+
14
+ This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
15
+ - TransactionPartnerUser
16
+ - TransactionPartnerFragment
17
+ - TransactionPartnerTelegramAds
18
+ - TransactionPartnerOther
19
+ """
20
+
21
+
22
+ class RevenueWithdrawalState(Model):
23
+ """Base object `RevenueWithdrawalState`, see the [documentation](https://core.telegram.org/bots/api#revenuewithdrawalstate).
24
+
25
+ This object describes the state of a revenue withdrawal operation. Currently, it can be one of
26
+ - RevenueWithdrawalStatePending
27
+ - RevenueWithdrawalStateSucceeded
28
+ - RevenueWithdrawalStateFailed
29
+ """
30
+
31
+
10
32
  class ReactionType(Model):
11
33
  """Base object `ReactionType`, see the [documentation](https://core.telegram.org/bots/api#reactiontype).
12
34
 
@@ -32,6 +54,16 @@ class PassportElementError(Model):
32
54
  """
33
55
 
34
56
 
57
+ class PaidMedia(Model):
58
+ """Base object `PaidMedia`, see the [documentation](https://core.telegram.org/bots/api#paidmedia).
59
+
60
+ This object describes paid media. Currently, it can be one of
61
+ - PaidMediaPreview
62
+ - PaidMediaPhoto
63
+ - PaidMediaVideo
64
+ """
65
+
66
+
35
67
  class MessageOrigin(Model):
36
68
  """Base object `MessageOrigin`, see the [documentation](https://core.telegram.org/bots/api#messageorigin).
37
69
 
@@ -75,6 +107,15 @@ class InputMessageContent(Model):
75
107
  """
76
108
 
77
109
 
110
+ class InputPaidMedia(Model):
111
+ """Base object `InputPaidMedia`, see the [documentation](https://core.telegram.org/bots/api#inputpaidmedia).
112
+
113
+ This object describes the paid media to be sent. Currently, it can be one of
114
+ - InputPaidMediaPhoto
115
+ - InputPaidMediaVideo
116
+ """
117
+
118
+
78
119
  class InputMedia(Model):
79
120
  """Base object `InputMedia`, see the [documentation](https://core.telegram.org/bots/api#inputmedia).
80
121
 
@@ -181,32 +222,32 @@ class Update(Model):
181
222
  """
182
223
 
183
224
  update_id: int
184
- """The update's unique identifier. Update identifiers start from a certain
185
- positive number and increase sequentially. This identifier becomes especially
186
- handy if you're using webhooks, since it allows you to ignore repeated updates
187
- or to restore the correct update sequence, should they get out of order.
188
- If there are no new updates for at least a week, then identifier of the next
225
+ """The update's unique identifier. Update identifiers start from a certain
226
+ positive number and increase sequentially. This identifier becomes especially
227
+ handy if you're using webhooks, since it allows you to ignore repeated updates
228
+ or to restore the correct update sequence, should they get out of order.
229
+ If there are no new updates for at least a week, then identifier of the next
189
230
  update will be chosen randomly instead of sequentially."""
190
231
 
191
232
  message: Option["Message"] = Nothing
192
233
  """Optional. New incoming message of any kind - text, photo, sticker, etc."""
193
234
 
194
235
  edited_message: Option["Message"] = Nothing
195
- """Optional. New version of a message that is known to the bot and was edited.
196
- This update may at times be triggered by changes to message fields that are
236
+ """Optional. New version of a message that is known to the bot and was edited.
237
+ This update may at times be triggered by changes to message fields that are
197
238
  either unavailable or not actively used by your bot."""
198
239
 
199
240
  channel_post: Option["Message"] = Nothing
200
- """Optional. New incoming channel post of any kind - text, photo, sticker,
241
+ """Optional. New incoming channel post of any kind - text, photo, sticker,
201
242
  etc."""
202
243
 
203
244
  edited_channel_post: Option["Message"] = Nothing
204
- """Optional. New version of a channel post that is known to the bot and was edited.
205
- This update may at times be triggered by changes to message fields that are
245
+ """Optional. New version of a channel post that is known to the bot and was edited.
246
+ This update may at times be triggered by changes to message fields that are
206
247
  either unavailable or not actively used by your bot."""
207
248
 
208
249
  business_connection: Option["BusinessConnection"] = Nothing
209
- """Optional. The bot was connected to or disconnected from a business account,
250
+ """Optional. The bot was connected to or disconnected from a business account,
210
251
  or a user edited an existing connection with the bot."""
211
252
 
212
253
  business_message: Option["Message"] = Nothing
@@ -219,79 +260,81 @@ class Update(Model):
219
260
  """Optional. Messages were deleted from a connected business account."""
220
261
 
221
262
  message_reaction: Option["MessageReactionUpdated"] = Nothing
222
- """Optional. A reaction to a message was changed by a user. The bot must be an
223
- administrator in the chat and must explicitly specify `message_reaction`
224
- in the list of allowed_updates to receive these updates. The update isn't
263
+ """Optional. A reaction to a message was changed by a user. The bot must be an
264
+ administrator in the chat and must explicitly specify `message_reaction`
265
+ in the list of allowed_updates to receive these updates. The update isn't
225
266
  received for reactions set by bots."""
226
267
 
227
268
  message_reaction_count: Option["MessageReactionCountUpdated"] = Nothing
228
- """Optional. Reactions to a message with anonymous reactions were changed.
229
- The bot must be an administrator in the chat and must explicitly specify
230
- `message_reaction_count` in the list of allowed_updates to receive these
269
+ """Optional. Reactions to a message with anonymous reactions were changed.
270
+ The bot must be an administrator in the chat and must explicitly specify
271
+ `message_reaction_count` in the list of allowed_updates to receive these
231
272
  updates. The updates are grouped and can be sent with delay up to a few minutes."""
232
273
 
233
274
  inline_query: Option["InlineQuery"] = Nothing
234
275
  """Optional. New incoming inline query."""
235
276
 
236
277
  chosen_inline_result: Option["ChosenInlineResult"] = Nothing
237
- """Optional. The result of an inline query that was chosen by a user and sent
238
- to their chat partner. Please see our documentation on the feedback collecting
278
+ """Optional. The result of an inline query that was chosen by a user and sent
279
+ to their chat partner. Please see our documentation on the feedback collecting
239
280
  for details on how to enable these updates for your bot."""
240
281
 
241
282
  callback_query: Option["CallbackQuery"] = Nothing
242
283
  """Optional. New incoming callback query."""
243
284
 
244
285
  shipping_query: Option["ShippingQuery"] = Nothing
245
- """Optional. New incoming shipping query. Only for invoices with flexible
286
+ """Optional. New incoming shipping query. Only for invoices with flexible
246
287
  price."""
247
288
 
248
289
  pre_checkout_query: Option["PreCheckoutQuery"] = Nothing
249
- """Optional. New incoming pre-checkout query. Contains full information
290
+ """Optional. New incoming pre-checkout query. Contains full information
250
291
  about checkout."""
251
292
 
252
293
  poll: Option["Poll"] = Nothing
253
- """Optional. New poll state. Bots receive only updates about manually stopped
294
+ """Optional. New poll state. Bots receive only updates about manually stopped
254
295
  polls and polls, which are sent by the bot."""
255
296
 
256
297
  poll_answer: Option["PollAnswer"] = Nothing
257
- """Optional. A user changed their answer in a non-anonymous poll. Bots receive
298
+ """Optional. A user changed their answer in a non-anonymous poll. Bots receive
258
299
  new votes only in polls that were sent by the bot itself."""
259
300
 
260
301
  my_chat_member: Option["ChatMemberUpdated"] = Nothing
261
- """Optional. The bot's chat member status was updated in a chat. For private
262
- chats, this update is received only when the bot is blocked or unblocked
302
+ """Optional. The bot's chat member status was updated in a chat. For private
303
+ chats, this update is received only when the bot is blocked or unblocked
263
304
  by the user."""
264
305
 
265
306
  chat_member: Option["ChatMemberUpdated"] = Nothing
266
- """Optional. A chat member's status was updated in a chat. The bot must be an
267
- administrator in the chat and must explicitly specify `chat_member` in
307
+ """Optional. A chat member's status was updated in a chat. The bot must be an
308
+ administrator in the chat and must explicitly specify `chat_member` in
268
309
  the list of allowed_updates to receive these updates."""
269
310
 
270
311
  chat_join_request: Option["ChatJoinRequest"] = Nothing
271
- """Optional. A request to join the chat has been sent. The bot must have the can_invite_users
312
+ """Optional. A request to join the chat has been sent. The bot must have the can_invite_users
272
313
  administrator right in the chat to receive these updates."""
273
314
 
274
315
  chat_boost: Option["ChatBoostUpdated"] = Nothing
275
- """Optional. A chat boost was added or changed. The bot must be an administrator
316
+ """Optional. A chat boost was added or changed. The bot must be an administrator
276
317
  in the chat to receive these updates."""
277
318
 
278
319
  removed_chat_boost: Option["ChatBoostRemoved"] = Nothing
279
- """Optional. A boost was removed from a chat. The bot must be an administrator
320
+ """Optional. A boost was removed from a chat. The bot must be an administrator
280
321
  in the chat to receive these updates."""
281
322
 
323
+ def __eq__(self, other: typing.Any) -> bool:
324
+ return isinstance(other, self.__class__) and self.update_type == other.update_type
325
+
282
326
  @property
283
- def update_type(self) -> Option[UpdateType]:
327
+ def update_type(self) -> UpdateType:
284
328
  """Incoming update type."""
285
329
 
286
- if update := next(
287
- filter(
288
- lambda x: bool(x[1]),
289
- self.to_dict(exclude_fields={"update_id"}).items(),
290
- ),
291
- None,
292
- ):
293
- return Some(UpdateType(update[0]))
294
- return Nothing
330
+ return UpdateType(
331
+ next(
332
+ filter(
333
+ lambda x: bool(x[1]),
334
+ self.to_dict(exclude_fields={"update_id"}).items(),
335
+ ),
336
+ )[0],
337
+ )
295
338
 
296
339
 
297
340
  class WebhookInfo(Model):
@@ -313,23 +356,23 @@ class WebhookInfo(Model):
313
356
  """Optional. Currently used webhook IP address."""
314
357
 
315
358
  last_error_date: Option[datetime] = Nothing
316
- """Optional. Unix time for the most recent error that happened when trying
359
+ """Optional. Unix time for the most recent error that happened when trying
317
360
  to deliver an update via webhook."""
318
361
 
319
362
  last_error_message: Option[str] = Nothing
320
- """Optional. Error message in human-readable format for the most recent error
363
+ """Optional. Error message in human-readable format for the most recent error
321
364
  that happened when trying to deliver an update via webhook."""
322
365
 
323
366
  last_synchronization_error_date: Option[datetime] = Nothing
324
- """Optional. Unix time of the most recent error that happened when trying to
367
+ """Optional. Unix time of the most recent error that happened when trying to
325
368
  synchronize available updates with Telegram datacenters."""
326
369
 
327
370
  max_connections: Option[int] = Nothing
328
- """Optional. The maximum allowed number of simultaneous HTTPS connections
371
+ """Optional. The maximum allowed number of simultaneous HTTPS connections
329
372
  to the webhook for update delivery."""
330
373
 
331
374
  allowed_updates: Option[list[str]] = Nothing
332
- """Optional. A list of update types the bot is subscribed to. Defaults to all
375
+ """Optional. A list of update types the bot is subscribed to. Defaults to all
333
376
  update types except chat_member."""
334
377
 
335
378
 
@@ -340,9 +383,9 @@ class User(Model):
340
383
  """
341
384
 
342
385
  id: int
343
- """Unique identifier for this user or bot. This number may have more than 32
344
- significant bits and some programming languages may have difficulty/silent
345
- defects in interpreting it. But it has at most 52 significant bits, so a 64-bit
386
+ """Unique identifier for this user or bot. This number may have more than 32
387
+ significant bits and some programming languages may have difficulty/silent
388
+ defects in interpreting it. But it has at most 52 significant bits, so a 64-bit
346
389
  integer or double-precision float type are safe for storing this identifier."""
347
390
 
348
391
  is_bot: bool
@@ -370,16 +413,19 @@ class User(Model):
370
413
  """Optional. True, if the bot can be invited to groups. Returned only in getMe."""
371
414
 
372
415
  can_read_all_group_messages: Option[bool] = Nothing
373
- """Optional. True, if privacy mode is disabled for the bot. Returned only in
416
+ """Optional. True, if privacy mode is disabled for the bot. Returned only in
374
417
  getMe."""
375
418
 
376
419
  supports_inline_queries: Option[bool] = Nothing
377
420
  """Optional. True, if the bot supports inline queries. Returned only in getMe."""
378
421
 
379
422
  can_connect_to_business: Option[bool] = Nothing
380
- """Optional. True, if the bot can be connected to a Telegram Business account
423
+ """Optional. True, if the bot can be connected to a Telegram Business account
381
424
  to receive its messages. Returned only in getMe."""
382
425
 
426
+ def __eq__(self, other: typing.Any) -> bool:
427
+ return isinstance(other, self.__class__) and self.id == other.id
428
+
383
429
  @property
384
430
  def default_accent_color(self) -> DefaultAccentColor:
385
431
  """User's or bot's accent color (non-premium)."""
@@ -400,9 +446,9 @@ class Chat(Model):
400
446
  """
401
447
 
402
448
  id: int
403
- """Unique identifier for this chat. This number may have more than 32 significant
404
- bits and some programming languages may have difficulty/silent defects
405
- in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
449
+ """Unique identifier for this chat. This number may have more than 32 significant
450
+ bits and some programming languages may have difficulty/silent defects
451
+ in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
406
452
  integer or double-precision float type are safe for storing this identifier."""
407
453
 
408
454
  type: ChatType
@@ -423,6 +469,9 @@ class Chat(Model):
423
469
  is_forum: Option[bool] = Nothing
424
470
  """Optional. True, if the supergroup chat is a forum (has topics enabled)."""
425
471
 
472
+ def __eq__(self, other: typing.Any) -> bool:
473
+ return isinstance(other, self.__class__) and self.id == other.id
474
+
426
475
  @property
427
476
  def full_name(self) -> Option[str]:
428
477
  """Optional. Full name (`first_name` + `last_name`) of the
@@ -438,16 +487,16 @@ class ChatFullInfo(Model):
438
487
  """
439
488
 
440
489
  id: int
441
- """Unique identifier for this chat. This number may have more than 32 significant
442
- bits and some programming languages may have difficulty/silent defects
443
- in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
490
+ """Unique identifier for this chat. This number may have more than 32 significant
491
+ bits and some programming languages may have difficulty/silent defects
492
+ in interpreting it. But it has at most 52 significant bits, so a signed 64-bit
444
493
  integer or double-precision float type are safe for storing this identifier."""
445
494
 
446
495
  type: ChatType
447
496
  """Type of the chat, can be either `private`, `group`, `supergroup` or `channel`."""
448
497
 
449
498
  accent_color_id: int
450
- """Identifier of the accent color for the chat name and backgrounds of the chat
499
+ """Identifier of the accent color for the chat name and backgrounds of the chat
451
500
  photo, reply header, and link preview. See accent colors for more details."""
452
501
 
453
502
  max_reaction_count: int
@@ -472,7 +521,7 @@ class ChatFullInfo(Model):
472
521
  """Optional. Chat photo."""
473
522
 
474
523
  active_usernames: Option[list[str]] = Nothing
475
- """Optional. If non-empty, the list of all active chat usernames; for private
524
+ """Optional. If non-empty, the list of all active chat usernames; for private
476
525
  chats, supergroups and channels."""
477
526
 
478
527
  birthdate: Option["Birthdate"] = Nothing
@@ -482,59 +531,57 @@ class ChatFullInfo(Model):
482
531
  """Optional. For private chats with business accounts, the intro of the business."""
483
532
 
484
533
  business_location: Option["BusinessLocation"] = Nothing
485
- """Optional. For private chats with business accounts, the location of the
534
+ """Optional. For private chats with business accounts, the location of the
486
535
  business."""
487
536
 
488
537
  business_opening_hours: Option["BusinessOpeningHours"] = Nothing
489
- """Optional. For private chats with business accounts, the opening hours
538
+ """Optional. For private chats with business accounts, the opening hours
490
539
  of the business."""
491
540
 
492
541
  personal_chat: Option["Chat"] = Nothing
493
542
  """Optional. For private chats, the personal channel of the user."""
494
543
 
495
- available_reactions: Option[
496
- list[Variative["ReactionTypeEmoji", "ReactionTypeCustomEmoji"]]
497
- ] = Nothing
498
- """Optional. List of available reactions allowed in the chat. If omitted,
544
+ available_reactions: Option[list[Variative["ReactionTypeEmoji", "ReactionTypeCustomEmoji"]]] = Nothing
545
+ """Optional. List of available reactions allowed in the chat. If omitted,
499
546
  then all emoji reactions are allowed."""
500
547
 
501
548
  background_custom_emoji_id: Option[str] = Nothing
502
- """Optional. Custom emoji identifier of the emoji chosen by the chat for the
549
+ """Optional. Custom emoji identifier of the emoji chosen by the chat for the
503
550
  reply header and link preview background."""
504
551
 
505
552
  profile_accent_color_id: Option[int] = Nothing
506
- """Optional. Identifier of the accent color for the chat's profile background.
553
+ """Optional. Identifier of the accent color for the chat's profile background.
507
554
  See profile accent colors for more details."""
508
555
 
509
556
  profile_background_custom_emoji_id: Option[str] = Nothing
510
- """Optional. Custom emoji identifier of the emoji chosen by the chat for its
557
+ """Optional. Custom emoji identifier of the emoji chosen by the chat for its
511
558
  profile background."""
512
559
 
513
560
  emoji_status_custom_emoji_id: Option[str] = Nothing
514
- """Optional. Custom emoji identifier of the emoji status of the chat or the
561
+ """Optional. Custom emoji identifier of the emoji status of the chat or the
515
562
  other party in a private chat."""
516
563
 
517
564
  emoji_status_expiration_date: Option[datetime] = Nothing
518
- """Optional. Expiration date of the emoji status of the chat or the other party
565
+ """Optional. Expiration date of the emoji status of the chat or the other party
519
566
  in a private chat, in Unix time, if any."""
520
567
 
521
568
  bio: Option[str] = Nothing
522
569
  """Optional. Bio of the other party in a private chat."""
523
570
 
524
571
  has_private_forwards: Option[bool] = Nothing
525
- """Optional. True, if privacy settings of the other party in the private chat
572
+ """Optional. True, if privacy settings of the other party in the private chat
526
573
  allows to use tg://user?id=<user_id> links only in chats with the user."""
527
574
 
528
575
  has_restricted_voice_and_video_messages: Option[bool] = Nothing
529
- """Optional. True, if the privacy settings of the other party restrict sending
576
+ """Optional. True, if the privacy settings of the other party restrict sending
530
577
  voice and video note messages in the private chat."""
531
578
 
532
579
  join_to_send_messages: Option[bool] = Nothing
533
- """Optional. True, if users need to join the supergroup before they can send
580
+ """Optional. True, if users need to join the supergroup before they can send
534
581
  messages."""
535
582
 
536
583
  join_by_request: Option[bool] = Nothing
537
- """Optional. True, if all users directly joining the supergroup without using
584
+ """Optional. True, if all users directly joining the supergroup without using
538
585
  an invite link need to be approved by supergroup administrators."""
539
586
 
540
587
  description: Option[str] = Nothing
@@ -549,31 +596,35 @@ class ChatFullInfo(Model):
549
596
  permissions: Option["ChatPermissions"] = Nothing
550
597
  """Optional. Default chat member permissions, for groups and supergroups."""
551
598
 
599
+ can_send_paid_media: Option[bool] = Nothing
600
+ """Optional. True, if paid media messages can be sent or forwarded to the channel
601
+ chat. The field is available only for channel chats."""
602
+
552
603
  slow_mode_delay: Option[int] = Nothing
553
- """Optional. For supergroups, the minimum allowed delay between consecutive
604
+ """Optional. For supergroups, the minimum allowed delay between consecutive
554
605
  messages sent by each unprivileged user; in seconds."""
555
606
 
556
607
  unrestrict_boost_count: Option[int] = Nothing
557
- """Optional. For supergroups, the minimum number of boosts that a non-administrator
608
+ """Optional. For supergroups, the minimum number of boosts that a non-administrator
558
609
  user needs to add in order to ignore slow mode and chat permissions."""
559
610
 
560
611
  message_auto_delete_time: Option[int] = Nothing
561
- """Optional. The time after which all messages sent to the chat will be automatically
612
+ """Optional. The time after which all messages sent to the chat will be automatically
562
613
  deleted; in seconds."""
563
614
 
564
615
  has_aggressive_anti_spam_enabled: Option[bool] = Nothing
565
- """Optional. True, if aggressive anti-spam checks are enabled in the supergroup.
616
+ """Optional. True, if aggressive anti-spam checks are enabled in the supergroup.
566
617
  The field is only available to chat administrators."""
567
618
 
568
619
  has_hidden_members: Option[bool] = Nothing
569
- """Optional. True, if non-administrators can only get the list of bots and
620
+ """Optional. True, if non-administrators can only get the list of bots and
570
621
  administrators in the chat."""
571
622
 
572
623
  has_protected_content: Option[bool] = Nothing
573
624
  """Optional. True, if messages from the chat can't be forwarded to other chats."""
574
625
 
575
626
  has_visible_history: Option[bool] = Nothing
576
- """Optional. True, if new chat members will have access to old messages; available
627
+ """Optional. True, if new chat members will have access to old messages; available
577
628
  only to chat administrators."""
578
629
 
579
630
  sticker_set_name: Option[str] = Nothing
@@ -583,15 +634,15 @@ class ChatFullInfo(Model):
583
634
  """Optional. True, if the bot can change the group sticker set."""
584
635
 
585
636
  custom_emoji_sticker_set_name: Option[str] = Nothing
586
- """Optional. For supergroups, the name of the group's custom emoji sticker
637
+ """Optional. For supergroups, the name of the group's custom emoji sticker
587
638
  set. Custom emoji from this set can be used by all users and bots in the group."""
588
639
 
589
640
  linked_chat_id: Option[int] = Nothing
590
- """Optional. Unique identifier for the linked chat, i.e. the discussion group
591
- identifier for a channel and vice versa; for supergroups and channel chats.
592
- This identifier may be greater than 32 bits and some programming languages
593
- may have difficulty/silent defects in interpreting it. But it is smaller
594
- than 52 bits, so a signed 64 bit integer or double-precision float type are
641
+ """Optional. Unique identifier for the linked chat, i.e. the discussion group
642
+ identifier for a channel and vice versa; for supergroups and channel chats.
643
+ This identifier may be greater than 32 bits and some programming languages
644
+ may have difficulty/silent defects in interpreting it. But it is smaller
645
+ than 52 bits, so a signed 64 bit integer or double-precision float type are
595
646
  safe for storing this identifier."""
596
647
 
597
648
  location: Option["ChatLocation"] = Nothing
@@ -608,51 +659,46 @@ class Message(MaybeInaccessibleMessage):
608
659
  """Unique message identifier inside this chat."""
609
660
 
610
661
  date: datetime
611
- """Date the message was sent in Unix time. It is always a positive number, representing
662
+ """Date the message was sent in Unix time. It is always a positive number, representing
612
663
  a valid date."""
613
664
 
614
665
  chat: "Chat"
615
666
  """Chat the message belongs to."""
616
667
 
617
668
  message_thread_id: Option[int] = Nothing
618
- """Optional. Unique identifier of a message thread to which the message belongs;
669
+ """Optional. Unique identifier of a message thread to which the message belongs;
619
670
  for supergroups only."""
620
671
 
621
672
  from_: Option["User"] = Nothing
622
- """Optional. Sender of the message; empty for messages sent to channels. For
623
- backward compatibility, the field contains a fake sender user in non-channel
673
+ """Optional. Sender of the message; empty for messages sent to channels. For
674
+ backward compatibility, the field contains a fake sender user in non-channel
624
675
  chats, if the message was sent on behalf of a chat."""
625
676
 
626
677
  sender_chat: Option["Chat"] = Nothing
627
- """Optional. Sender of the message, sent on behalf of a chat. For example, the
628
- channel itself for channel posts, the supergroup itself for messages from
629
- anonymous group administrators, the linked channel for messages automatically
630
- forwarded to the discussion group. For backward compatibility, the field
631
- from contains a fake sender user in non-channel chats, if the message was
678
+ """Optional. Sender of the message, sent on behalf of a chat. For example, the
679
+ channel itself for channel posts, the supergroup itself for messages from
680
+ anonymous group administrators, the linked channel for messages automatically
681
+ forwarded to the discussion group. For backward compatibility, the field
682
+ from contains a fake sender user in non-channel chats, if the message was
632
683
  sent on behalf of a chat."""
633
684
 
634
685
  sender_boost_count: Option[int] = Nothing
635
- """Optional. If the sender of the message boosted the chat, the number of boosts
686
+ """Optional. If the sender of the message boosted the chat, the number of boosts
636
687
  added by the user."""
637
688
 
638
689
  sender_business_bot: Option["User"] = Nothing
639
- """Optional. The bot that actually sent the message on behalf of the business
640
- account. Available only for outgoing messages sent on behalf of the connected
690
+ """Optional. The bot that actually sent the message on behalf of the business
691
+ account. Available only for outgoing messages sent on behalf of the connected
641
692
  business account."""
642
693
 
643
694
  business_connection_id: Option[str] = Nothing
644
- """Optional. Unique identifier of the business connection from which the
645
- message was received. If non-empty, the message belongs to a chat of the
646
- corresponding business account that is independent from any potential
695
+ """Optional. Unique identifier of the business connection from which the
696
+ message was received. If non-empty, the message belongs to a chat of the
697
+ corresponding business account that is independent from any potential
647
698
  bot chat which might share the same identifier."""
648
699
 
649
700
  forward_origin: Option[
650
- Variative[
651
- "MessageOriginUser",
652
- "MessageOriginHiddenUser",
653
- "MessageOriginChat",
654
- "MessageOriginChannel",
655
- ]
701
+ Variative["MessageOriginUser", "MessageOriginHiddenUser", "MessageOriginChat", "MessageOriginChannel"]
656
702
  ] = Nothing
657
703
  """Optional. Information about the original message for forwarded messages."""
658
704
 
@@ -660,20 +706,20 @@ class Message(MaybeInaccessibleMessage):
660
706
  """Optional. True, if the message is sent to a forum topic."""
661
707
 
662
708
  is_automatic_forward: Option[bool] = Nothing
663
- """Optional. True, if the message is a channel post that was automatically
709
+ """Optional. True, if the message is a channel post that was automatically
664
710
  forwarded to the connected discussion group."""
665
711
 
666
712
  reply_to_message: Option["Message"] = Nothing
667
- """Optional. For replies in the same chat and message thread, the original
668
- message. Note that the Message object in this field will not contain further
713
+ """Optional. For replies in the same chat and message thread, the original
714
+ message. Note that the Message object in this field will not contain further
669
715
  reply_to_message fields even if it itself is a reply."""
670
716
 
671
717
  external_reply: Option["ExternalReplyInfo"] = Nothing
672
- """Optional. Information about the message that is being replied to, which
718
+ """Optional. Information about the message that is being replied to, which
673
719
  may come from another chat or forum topic."""
674
720
 
675
721
  quote: Option["TextQuote"] = Nothing
676
- """Optional. For replies that quote part of the original message, the quoted
722
+ """Optional. For replies that quote part of the original message, the quoted
677
723
  part of the message."""
678
724
 
679
725
  reply_to_story: Option["Story"] = Nothing
@@ -689,31 +735,34 @@ class Message(MaybeInaccessibleMessage):
689
735
  """Optional. True, if the message can't be forwarded."""
690
736
 
691
737
  is_from_offline: Option[bool] = Nothing
692
- """Optional. True, if the message was sent by an implicit action, for example,
738
+ """Optional. True, if the message was sent by an implicit action, for example,
693
739
  as an away or a greeting business message, or as a scheduled message."""
694
740
 
695
741
  media_group_id: Option[str] = Nothing
696
- """Optional. The unique identifier of a media message group this message belongs
742
+ """Optional. The unique identifier of a media message group this message belongs
697
743
  to."""
698
744
 
699
745
  author_signature: Option[str] = Nothing
700
- """Optional. Signature of the post author for messages in channels, or the
746
+ """Optional. Signature of the post author for messages in channels, or the
701
747
  custom title of an anonymous group administrator."""
702
748
 
703
749
  text: Option[str] = Nothing
704
750
  """Optional. For text messages, the actual UTF-8 text of the message."""
705
751
 
706
752
  entities: Option[list["MessageEntity"]] = Nothing
707
- """Optional. For text messages, special entities like usernames, URLs, bot
753
+ """Optional. For text messages, special entities like usernames, URLs, bot
708
754
  commands, etc. that appear in the text."""
709
755
 
710
756
  link_preview_options: Option["LinkPreviewOptions"] = Nothing
711
- """Optional. Options used for link preview generation for the message, if
757
+ """Optional. Options used for link preview generation for the message, if
712
758
  it is a text message and link preview options were changed."""
713
759
 
760
+ effect_id: Option[str] = Nothing
761
+ """Optional. Unique identifier of the message effect added to the message."""
762
+
714
763
  animation: Option["Animation"] = Nothing
715
- """Optional. Message is an animation, information about the animation. For
716
- backward compatibility, when this field is set, the document field will
764
+ """Optional. Message is an animation, information about the animation. For
765
+ backward compatibility, when this field is set, the document field will
717
766
  also be set."""
718
767
 
719
768
  audio: Option["Audio"] = Nothing
@@ -722,6 +771,9 @@ class Message(MaybeInaccessibleMessage):
722
771
  document: Option["Document"] = Nothing
723
772
  """Optional. Message is a general file, information about the file."""
724
773
 
774
+ paid_media: Option["PaidMediaInfo"] = Nothing
775
+ """Optional. Message contains paid media; information about the paid media."""
776
+
725
777
  photo: Option[list["PhotoSize"]] = Nothing
726
778
  """Optional. Message is a photo, available sizes of the photo."""
727
779
 
@@ -741,13 +793,16 @@ class Message(MaybeInaccessibleMessage):
741
793
  """Optional. Message is a voice message, information about the file."""
742
794
 
743
795
  caption: Option[str] = Nothing
744
- """Optional. Caption for the animation, audio, document, photo, video or
745
- voice."""
796
+ """Optional. Caption for the animation, audio, document, paid media, photo,
797
+ video or voice."""
746
798
 
747
799
  caption_entities: Option[list["MessageEntity"]] = Nothing
748
- """Optional. For messages with a caption, special entities like usernames,
800
+ """Optional. For messages with a caption, special entities like usernames,
749
801
  URLs, bot commands, etc. that appear in the caption."""
750
802
 
803
+ show_caption_above_media: Option[bool] = Nothing
804
+ """Optional. True, if the caption must be shown above the message media."""
805
+
751
806
  has_media_spoiler: Option[bool] = Nothing
752
807
  """Optional. True, if the message media is covered by a spoiler animation."""
753
808
 
@@ -758,25 +813,25 @@ class Message(MaybeInaccessibleMessage):
758
813
  """Optional. Message is a dice with random value."""
759
814
 
760
815
  game: Option["Game"] = Nothing
761
- """Optional. Message is a game, information about the game. More about games:
816
+ """Optional. Message is a game, information about the game. More about games:
762
817
  https://core.telegram.org/bots/api#games."""
763
818
 
764
819
  poll: Option["Poll"] = Nothing
765
820
  """Optional. Message is a native poll, information about the poll."""
766
821
 
767
822
  venue: Option["Venue"] = Nothing
768
- """Optional. Message is a venue, information about the venue. For backward
823
+ """Optional. Message is a venue, information about the venue. For backward
769
824
  compatibility, when this field is set, the location field will also be set."""
770
825
 
771
826
  location: Option["Location"] = Nothing
772
827
  """Optional. Message is a shared location, information about the location."""
773
828
 
774
829
  new_chat_members: Option[list["User"]] = Nothing
775
- """Optional. New members that were added to the group or supergroup and information
830
+ """Optional. New members that were added to the group or supergroup and information
776
831
  about them (the bot itself may be one of these members)."""
777
832
 
778
833
  left_chat_member: Option["User"] = Nothing
779
- """Optional. A member was removed from the group, information about them (this
834
+ """Optional. A member was removed from the group, information about them (this
780
835
  member may be the bot itself)."""
781
836
 
782
837
  new_chat_title: Option[str] = Nothing
@@ -792,46 +847,50 @@ class Message(MaybeInaccessibleMessage):
792
847
  """Optional. Service message: the group has been created."""
793
848
 
794
849
  supergroup_chat_created: Option[bool] = Nothing
795
- """Optional. Service message: the supergroup has been created. This field
796
- can't be received in a message coming through updates, because bot can't
797
- be a member of a supergroup when it is created. It can only be found in reply_to_message
850
+ """Optional. Service message: the supergroup has been created. This field
851
+ can't be received in a message coming through updates, because bot can't
852
+ be a member of a supergroup when it is created. It can only be found in reply_to_message
798
853
  if someone replies to a very first message in a directly created supergroup."""
799
854
 
800
855
  channel_chat_created: Option[bool] = Nothing
801
- """Optional. Service message: the channel has been created. This field can't
802
- be received in a message coming through updates, because bot can't be a member
803
- of a channel when it is created. It can only be found in reply_to_message
856
+ """Optional. Service message: the channel has been created. This field can't
857
+ be received in a message coming through updates, because bot can't be a member
858
+ of a channel when it is created. It can only be found in reply_to_message
804
859
  if someone replies to a very first message in a channel."""
805
860
 
806
861
  message_auto_delete_timer_changed: Option["MessageAutoDeleteTimerChanged"] = Nothing
807
- """Optional. Service message: auto-delete timer settings changed in the
862
+ """Optional. Service message: auto-delete timer settings changed in the
808
863
  chat."""
809
864
 
810
865
  migrate_to_chat_id: Option[int] = Nothing
811
- """Optional. The group has been migrated to a supergroup with the specified
812
- identifier. This number may have more than 32 significant bits and some
813
- programming languages may have difficulty/silent defects in interpreting
814
- it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
866
+ """Optional. The group has been migrated to a supergroup with the specified
867
+ identifier. This number may have more than 32 significant bits and some
868
+ programming languages may have difficulty/silent defects in interpreting
869
+ it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
815
870
  float type are safe for storing this identifier."""
816
871
 
817
872
  migrate_from_chat_id: Option[int] = Nothing
818
- """Optional. The supergroup has been migrated from a group with the specified
819
- identifier. This number may have more than 32 significant bits and some
820
- programming languages may have difficulty/silent defects in interpreting
821
- it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
873
+ """Optional. The supergroup has been migrated from a group with the specified
874
+ identifier. This number may have more than 32 significant bits and some
875
+ programming languages may have difficulty/silent defects in interpreting
876
+ it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
822
877
  float type are safe for storing this identifier."""
823
878
 
824
879
  pinned_message: Option[Variative["Message", "InaccessibleMessage"]] = Nothing
825
- """Optional. Specified message was pinned. Note that the Message object in
826
- this field will not contain further reply_to_message fields even if it
880
+ """Optional. Specified message was pinned. Note that the Message object in
881
+ this field will not contain further reply_to_message fields even if it
827
882
  itself is a reply."""
828
883
 
829
884
  invoice: Option["Invoice"] = Nothing
830
- """Optional. Message is an invoice for a payment, information about the invoice.
885
+ """Optional. Message is an invoice for a payment, information about the invoice.
831
886
  More about payments: https://core.telegram.org/bots/api#payments."""
832
887
 
833
888
  successful_payment: Option["SuccessfulPayment"] = Nothing
834
- """Optional. Message is a service message about a successful payment, information
889
+ """Optional. Message is a service message about a successful payment, information
890
+ about the payment. More about payments: https://core.telegram.org/bots/api#payments."""
891
+
892
+ refunded_payment: Option["RefundedPayment"] = Nothing
893
+ """Optional. Message is a service message about a refunded payment, information
835
894
  about the payment. More about payments: https://core.telegram.org/bots/api#payments."""
836
895
 
837
896
  users_shared: Option["UsersShared"] = Nothing
@@ -841,19 +900,19 @@ class Message(MaybeInaccessibleMessage):
841
900
  """Optional. Service message: a chat was shared with the bot."""
842
901
 
843
902
  connected_website: Option[str] = Nothing
844
- """Optional. The domain name of the website on which the user has logged in.
903
+ """Optional. The domain name of the website on which the user has logged in.
845
904
  More about Telegram Login: https://core.telegram.org/widgets/login."""
846
905
 
847
906
  write_access_allowed: Option["WriteAccessAllowed"] = Nothing
848
- """Optional. Service message: the user allowed the bot to write messages after
849
- adding it to the attachment or side menu, launching a Web App from a link,
907
+ """Optional. Service message: the user allowed the bot to write messages after
908
+ adding it to the attachment or side menu, launching a Web App from a link,
850
909
  or accepting an explicit request from a Web App sent by the method requestWriteAccess."""
851
910
 
852
911
  passport_data: Option["PassportData"] = Nothing
853
912
  """Optional. Telegram Passport data."""
854
913
 
855
914
  proximity_alert_triggered: Option["ProximityAlertTriggered"] = Nothing
856
- """Optional. Service message. A user in the chat triggered another user's
915
+ """Optional. Service message. A user in the chat triggered another user's
857
916
  proximity alert while sharing Live Location."""
858
917
 
859
918
  boost_added: Option["ChatBoostAdded"] = Nothing
@@ -908,9 +967,16 @@ class Message(MaybeInaccessibleMessage):
908
967
  """Optional. Service message: data sent by a Web App."""
909
968
 
910
969
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
911
- """Optional. Inline keyboard attached to the message. login_url buttons
970
+ """Optional. Inline keyboard attached to the message. login_url buttons
912
971
  are represented as ordinary url buttons."""
913
972
 
973
+ def __eq__(self, other: typing.Any) -> bool:
974
+ return (
975
+ isinstance(other, self.__class__)
976
+ and self.message_id == other.message_id
977
+ and self.chat_id == other.chat_id
978
+ )
979
+
914
980
  @property
915
981
  def content_type(self) -> ContentType:
916
982
  """Type of content that the message contains."""
@@ -941,16 +1007,7 @@ class Message(MaybeInaccessibleMessage):
941
1007
  Full name, for `private` chat."""
942
1008
 
943
1009
  return (
944
- self.chat.full_name.unwrap()
945
- if self.chat.type == ChatType.PRIVATE
946
- else self.chat.title.unwrap()
947
- )
948
-
949
- def __eq__(self, other: typing.Any) -> bool:
950
- return (
951
- isinstance(other, self.__class__)
952
- and self.message_id == other.message_id
953
- and self.chat_id == other.chat_id
1010
+ self.chat.full_name.unwrap() if self.chat.type == ChatType.PRIVATE else self.chat.title.unwrap()
954
1011
  )
955
1012
 
956
1013
 
@@ -977,7 +1034,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
977
1034
  """Unique message identifier inside the chat."""
978
1035
 
979
1036
  date: typing.Literal[0]
980
- """Always 0. The field can be used to differentiate regular and inaccessible
1037
+ """Always 0. The field can be used to differentiate regular and inaccessible
981
1038
  messages."""
982
1039
 
983
1040
 
@@ -988,15 +1045,16 @@ class MessageEntity(Model):
988
1045
  """
989
1046
 
990
1047
  type: MessageEntityType
991
- """Type of the entity. Currently, can be `mention` (@username), `hashtag`
992
- (#hashtag), `cashtag` ($USD), `bot_command` (/start@jobs_bot), `url`
993
- (https://telegram.org), `email` (do-not-reply@telegram.org), `phone_number`
994
- (+1-212-555-0123), `bold` (bold text), `italic` (italic text), `underline`
995
- (underlined text), `strikethrough` (strikethrough text), `spoiler`
996
- (spoiler message), `blockquote` (block quotation), `code` (monowidth
997
- string), `pre` (monowidth block), `text_link` (for clickable text URLs),
998
- `text_mention` (for users without usernames), `custom_emoji` (for inline
999
- custom emoji stickers)."""
1048
+ """Type of the entity. Currently, can be `mention` (@username), `hashtag`
1049
+ (#hashtag), `cashtag` ($USD), `bot_command` (/start@jobs_bot), `url`
1050
+ (https://telegram.org), `email` (do-not-reply@telegram.org), `phone_number`
1051
+ (+1-212-555-0123), `bold` (bold text), `italic` (italic text), `underline`
1052
+ (underlined text), `strikethrough` (strikethrough text), `spoiler`
1053
+ (spoiler message), `blockquote` (block quotation), `expandable_blockquote`
1054
+ (collapsed-by-default block quotation), `code` (monowidth string),
1055
+ `pre` (monowidth block), `text_link` (for clickable text URLs), `text_mention`
1056
+ (for users without usernames), `custom_emoji` (for inline custom emoji
1057
+ stickers)."""
1000
1058
 
1001
1059
  offset: int
1002
1060
  """Offset in UTF-16 code units to the start of the entity."""
@@ -1005,7 +1063,7 @@ class MessageEntity(Model):
1005
1063
  """Length of the entity in UTF-16 code units."""
1006
1064
 
1007
1065
  url: Option[str] = Nothing
1008
- """Optional. For `text_link` only, URL that will be opened after user taps
1066
+ """Optional. For `text_link` only, URL that will be opened after user taps
1009
1067
  on the text."""
1010
1068
 
1011
1069
  user: Option["User"] = Nothing
@@ -1015,7 +1073,7 @@ class MessageEntity(Model):
1015
1073
  """Optional. For `pre` only, the programming language of the entity text."""
1016
1074
 
1017
1075
  custom_emoji_id: Option[str] = Nothing
1018
- """Optional. For `custom_emoji` only, unique identifier of the custom emoji.
1076
+ """Optional. For `custom_emoji` only, unique identifier of the custom emoji.
1019
1077
  Use getCustomEmojiStickers to get full information about the sticker."""
1020
1078
 
1021
1079
 
@@ -1029,16 +1087,16 @@ class TextQuote(Model):
1029
1087
  """Text of the quoted part of a message that is replied to by the given message."""
1030
1088
 
1031
1089
  position: int
1032
- """Approximate quote position in the original message in UTF-16 code units
1090
+ """Approximate quote position in the original message in UTF-16 code units
1033
1091
  as specified by the sender."""
1034
1092
 
1035
1093
  entities: Option[list["MessageEntity"]] = Nothing
1036
- """Optional. Special entities that appear in the quote. Currently, only bold,
1037
- italic, underline, strikethrough, spoiler, and custom_emoji entities
1094
+ """Optional. Special entities that appear in the quote. Currently, only bold,
1095
+ italic, underline, strikethrough, spoiler, and custom_emoji entities
1038
1096
  are kept in quotes."""
1039
1097
 
1040
1098
  is_manual: Option[bool] = Nothing
1041
- """Optional. True, if the quote was chosen manually by the message sender.
1099
+ """Optional. True, if the quote was chosen manually by the message sender.
1042
1100
  Otherwise, the quote was added automatically by the server."""
1043
1101
 
1044
1102
 
@@ -1049,23 +1107,20 @@ class ExternalReplyInfo(Model):
1049
1107
  """
1050
1108
 
1051
1109
  origin: Variative[
1052
- "MessageOriginUser",
1053
- "MessageOriginHiddenUser",
1054
- "MessageOriginChat",
1055
- "MessageOriginChannel",
1110
+ "MessageOriginUser", "MessageOriginHiddenUser", "MessageOriginChat", "MessageOriginChannel"
1056
1111
  ]
1057
1112
  """Origin of the message replied to by the given message."""
1058
1113
 
1059
1114
  chat: Option["Chat"] = Nothing
1060
- """Optional. Chat the original message belongs to. Available only if the chat
1115
+ """Optional. Chat the original message belongs to. Available only if the chat
1061
1116
  is a supergroup or a channel."""
1062
1117
 
1063
1118
  message_id: Option[int] = Nothing
1064
- """Optional. Unique message identifier inside the original chat. Available
1119
+ """Optional. Unique message identifier inside the original chat. Available
1065
1120
  only if the original chat is a supergroup or a channel."""
1066
1121
 
1067
1122
  link_preview_options: Option["LinkPreviewOptions"] = Nothing
1068
- """Optional. Options used for link preview generation for the original message,
1123
+ """Optional. Options used for link preview generation for the original message,
1069
1124
  if it is a text message."""
1070
1125
 
1071
1126
  animation: Option["Animation"] = Nothing
@@ -1077,6 +1132,9 @@ class ExternalReplyInfo(Model):
1077
1132
  document: Option["Document"] = Nothing
1078
1133
  """Optional. Message is a general file, information about the file."""
1079
1134
 
1135
+ paid_media: Option["PaidMediaInfo"] = Nothing
1136
+ """Optional. Message contains paid media; information about the paid media."""
1137
+
1080
1138
  photo: Option[list["PhotoSize"]] = Nothing
1081
1139
  """Optional. Message is a photo, available sizes of the photo."""
1082
1140
 
@@ -1105,7 +1163,7 @@ class ExternalReplyInfo(Model):
1105
1163
  """Optional. Message is a dice with random value."""
1106
1164
 
1107
1165
  game: Option["Game"] = Nothing
1108
- """Optional. Message is a game, information about the game. More about games:
1166
+ """Optional. Message is a game, information about the game. More about games:
1109
1167
  https://core.telegram.org/bots/api#games."""
1110
1168
 
1111
1169
  giveaway: Option["Giveaway"] = Nothing
@@ -1115,7 +1173,7 @@ class ExternalReplyInfo(Model):
1115
1173
  """Optional. A giveaway with public winners was completed."""
1116
1174
 
1117
1175
  invoice: Option["Invoice"] = Nothing
1118
- """Optional. Message is an invoice for a payment, information about the invoice.
1176
+ """Optional. Message is an invoice for a payment, information about the invoice.
1119
1177
  More about payments: https://core.telegram.org/bots/api#payments."""
1120
1178
 
1121
1179
  location: Option["Location"] = Nothing
@@ -1135,32 +1193,32 @@ class ReplyParameters(Model):
1135
1193
  """
1136
1194
 
1137
1195
  message_id: int
1138
- """Identifier of the message that will be replied to in the current chat, or
1196
+ """Identifier of the message that will be replied to in the current chat, or
1139
1197
  in the chat chat_id if it is specified."""
1140
1198
 
1141
1199
  chat_id: Option[Variative[int, str]] = Nothing
1142
- """Optional. If the message to be replied to is from a different chat, unique
1143
- identifier for the chat or username of the channel (in the format @channelusername).
1200
+ """Optional. If the message to be replied to is from a different chat, unique
1201
+ identifier for the chat or username of the channel (in the format @channelusername).
1144
1202
  Not supported for messages sent on behalf of a business account."""
1145
1203
 
1146
1204
  allow_sending_without_reply: Option[bool] = Nothing
1147
- """Optional. Pass True if the message should be sent even if the specified message
1148
- to be replied to is not found. Always False for replies in another chat or
1205
+ """Optional. Pass True if the message should be sent even if the specified message
1206
+ to be replied to is not found. Always False for replies in another chat or
1149
1207
  forum topic. Always True for messages sent on behalf of a business account."""
1150
1208
 
1151
1209
  quote: Option[str] = Nothing
1152
- """Optional. Quoted part of the message to be replied to; 0-1024 characters
1153
- after entities parsing. The quote must be an exact substring of the message
1154
- to be replied to, including bold, italic, underline, strikethrough, spoiler,
1155
- and custom_emoji entities. The message will fail to send if the quote isn't
1210
+ """Optional. Quoted part of the message to be replied to; 0-1024 characters
1211
+ after entities parsing. The quote must be an exact substring of the message
1212
+ to be replied to, including bold, italic, underline, strikethrough, spoiler,
1213
+ and custom_emoji entities. The message will fail to send if the quote isn't
1156
1214
  found in the original message."""
1157
1215
 
1158
1216
  quote_parse_mode: Option[str] = Nothing
1159
- """Optional. Mode for parsing entities in the quote. See formatting options
1217
+ """Optional. Mode for parsing entities in the quote. See formatting options
1160
1218
  for more details."""
1161
1219
 
1162
1220
  quote_entities: Option[list["MessageEntity"]] = Nothing
1163
- """Optional. A JSON-serialized list of special entities that appear in the
1221
+ """Optional. A JSON-serialized list of special entities that appear in the
1164
1222
  quote. It can be specified instead of quote_parse_mode."""
1165
1223
 
1166
1224
  quote_position: Option[int] = Nothing
@@ -1215,7 +1273,7 @@ class MessageOriginChat(MessageOrigin):
1215
1273
  """Chat that sent the message originally."""
1216
1274
 
1217
1275
  author_signature: Option[str] = Nothing
1218
- """Optional. For messages originally sent by an anonymous chat administrator,
1276
+ """Optional. For messages originally sent by an anonymous chat administrator,
1219
1277
  original message author signature."""
1220
1278
 
1221
1279
 
@@ -1251,7 +1309,7 @@ class PhotoSize(Model):
1251
1309
  """Identifier for this file, which can be used to download or reuse the file."""
1252
1310
 
1253
1311
  file_unique_id: str
1254
- """Unique identifier for this file, which is supposed to be the same over time
1312
+ """Unique identifier for this file, which is supposed to be the same over time
1255
1313
  and for different bots. Can't be used to download or reuse the file."""
1256
1314
 
1257
1315
  width: int
@@ -1274,31 +1332,31 @@ class Animation(Model):
1274
1332
  """Identifier for this file, which can be used to download or reuse the file."""
1275
1333
 
1276
1334
  file_unique_id: str
1277
- """Unique identifier for this file, which is supposed to be the same over time
1335
+ """Unique identifier for this file, which is supposed to be the same over time
1278
1336
  and for different bots. Can't be used to download or reuse the file."""
1279
1337
 
1280
1338
  width: int
1281
- """Video width as defined by sender."""
1339
+ """Video width as defined by the sender."""
1282
1340
 
1283
1341
  height: int
1284
- """Video height as defined by sender."""
1342
+ """Video height as defined by the sender."""
1285
1343
 
1286
1344
  duration: int
1287
- """Duration of the video in seconds as defined by sender."""
1345
+ """Duration of the video in seconds as defined by the sender."""
1288
1346
 
1289
1347
  thumbnail: Option["PhotoSize"] = Nothing
1290
- """Optional. Animation thumbnail as defined by sender."""
1348
+ """Optional. Animation thumbnail as defined by the sender."""
1291
1349
 
1292
1350
  file_name: Option[str] = Nothing
1293
- """Optional. Original animation filename as defined by sender."""
1351
+ """Optional. Original animation filename as defined by the sender."""
1294
1352
 
1295
1353
  mime_type: Option[str] = Nothing
1296
- """Optional. MIME type of the file as defined by sender."""
1354
+ """Optional. MIME type of the file as defined by the sender."""
1297
1355
 
1298
1356
  file_size: Option[int] = Nothing
1299
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1300
- languages may have difficulty/silent defects in interpreting it. But
1301
- it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1357
+ """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1358
+ languages may have difficulty/silent defects in interpreting it. But
1359
+ it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1302
1360
  float type are safe for storing this value."""
1303
1361
 
1304
1362
 
@@ -1312,28 +1370,28 @@ class Audio(Model):
1312
1370
  """Identifier for this file, which can be used to download or reuse the file."""
1313
1371
 
1314
1372
  file_unique_id: str
1315
- """Unique identifier for this file, which is supposed to be the same over time
1373
+ """Unique identifier for this file, which is supposed to be the same over time
1316
1374
  and for different bots. Can't be used to download or reuse the file."""
1317
1375
 
1318
1376
  duration: int
1319
- """Duration of the audio in seconds as defined by sender."""
1377
+ """Duration of the audio in seconds as defined by the sender."""
1320
1378
 
1321
1379
  performer: Option[str] = Nothing
1322
- """Optional. Performer of the audio as defined by sender or by audio tags."""
1380
+ """Optional. Performer of the audio as defined by the sender or by audio tags."""
1323
1381
 
1324
1382
  title: Option[str] = Nothing
1325
- """Optional. Title of the audio as defined by sender or by audio tags."""
1383
+ """Optional. Title of the audio as defined by the sender or by audio tags."""
1326
1384
 
1327
1385
  file_name: Option[str] = Nothing
1328
- """Optional. Original filename as defined by sender."""
1386
+ """Optional. Original filename as defined by the sender."""
1329
1387
 
1330
1388
  mime_type: Option[str] = Nothing
1331
- """Optional. MIME type of the file as defined by sender."""
1389
+ """Optional. MIME type of the file as defined by the sender."""
1332
1390
 
1333
1391
  file_size: Option[int] = Nothing
1334
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1335
- languages may have difficulty/silent defects in interpreting it. But
1336
- it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1392
+ """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1393
+ languages may have difficulty/silent defects in interpreting it. But
1394
+ it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1337
1395
  float type are safe for storing this value."""
1338
1396
 
1339
1397
  thumbnail: Option["PhotoSize"] = Nothing
@@ -1350,22 +1408,22 @@ class Document(Model):
1350
1408
  """Identifier for this file, which can be used to download or reuse the file."""
1351
1409
 
1352
1410
  file_unique_id: str
1353
- """Unique identifier for this file, which is supposed to be the same over time
1411
+ """Unique identifier for this file, which is supposed to be the same over time
1354
1412
  and for different bots. Can't be used to download or reuse the file."""
1355
1413
 
1356
1414
  thumbnail: Option["PhotoSize"] = Nothing
1357
- """Optional. Document thumbnail as defined by sender."""
1415
+ """Optional. Document thumbnail as defined by the sender."""
1358
1416
 
1359
1417
  file_name: Option[str] = Nothing
1360
- """Optional. Original filename as defined by sender."""
1418
+ """Optional. Original filename as defined by the sender."""
1361
1419
 
1362
1420
  mime_type: Option[str] = Nothing
1363
- """Optional. MIME type of the file as defined by sender."""
1421
+ """Optional. MIME type of the file as defined by the sender."""
1364
1422
 
1365
1423
  file_size: Option[int] = Nothing
1366
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1367
- languages may have difficulty/silent defects in interpreting it. But
1368
- it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1424
+ """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1425
+ languages may have difficulty/silent defects in interpreting it. But
1426
+ it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1369
1427
  float type are safe for storing this value."""
1370
1428
 
1371
1429
 
@@ -1392,31 +1450,31 @@ class Video(Model):
1392
1450
  """Identifier for this file, which can be used to download or reuse the file."""
1393
1451
 
1394
1452
  file_unique_id: str
1395
- """Unique identifier for this file, which is supposed to be the same over time
1453
+ """Unique identifier for this file, which is supposed to be the same over time
1396
1454
  and for different bots. Can't be used to download or reuse the file."""
1397
1455
 
1398
1456
  width: int
1399
- """Video width as defined by sender."""
1457
+ """Video width as defined by the sender."""
1400
1458
 
1401
1459
  height: int
1402
- """Video height as defined by sender."""
1460
+ """Video height as defined by the sender."""
1403
1461
 
1404
1462
  duration: int
1405
- """Duration of the video in seconds as defined by sender."""
1463
+ """Duration of the video in seconds as defined by the sender."""
1406
1464
 
1407
1465
  thumbnail: Option["PhotoSize"] = Nothing
1408
1466
  """Optional. Video thumbnail."""
1409
1467
 
1410
1468
  file_name: Option[str] = Nothing
1411
- """Optional. Original filename as defined by sender."""
1469
+ """Optional. Original filename as defined by the sender."""
1412
1470
 
1413
1471
  mime_type: Option[str] = Nothing
1414
- """Optional. MIME type of the file as defined by sender."""
1472
+ """Optional. MIME type of the file as defined by the sender."""
1415
1473
 
1416
1474
  file_size: Option[int] = Nothing
1417
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1418
- languages may have difficulty/silent defects in interpreting it. But
1419
- it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1475
+ """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1476
+ languages may have difficulty/silent defects in interpreting it. But
1477
+ it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1420
1478
  float type are safe for storing this value."""
1421
1479
 
1422
1480
 
@@ -1430,14 +1488,15 @@ class VideoNote(Model):
1430
1488
  """Identifier for this file, which can be used to download or reuse the file."""
1431
1489
 
1432
1490
  file_unique_id: str
1433
- """Unique identifier for this file, which is supposed to be the same over time
1491
+ """Unique identifier for this file, which is supposed to be the same over time
1434
1492
  and for different bots. Can't be used to download or reuse the file."""
1435
1493
 
1436
1494
  length: int
1437
- """Video width and height (diameter of the video message) as defined by sender."""
1495
+ """Video width and height (diameter of the video message) as defined by the
1496
+ sender."""
1438
1497
 
1439
1498
  duration: int
1440
- """Duration of the video in seconds as defined by sender."""
1499
+ """Duration of the video in seconds as defined by the sender."""
1441
1500
 
1442
1501
  thumbnail: Option["PhotoSize"] = Nothing
1443
1502
  """Optional. Video thumbnail."""
@@ -1456,22 +1515,80 @@ class Voice(Model):
1456
1515
  """Identifier for this file, which can be used to download or reuse the file."""
1457
1516
 
1458
1517
  file_unique_id: str
1459
- """Unique identifier for this file, which is supposed to be the same over time
1518
+ """Unique identifier for this file, which is supposed to be the same over time
1460
1519
  and for different bots. Can't be used to download or reuse the file."""
1461
1520
 
1462
1521
  duration: int
1463
- """Duration of the audio in seconds as defined by sender."""
1522
+ """Duration of the audio in seconds as defined by the sender."""
1464
1523
 
1465
1524
  mime_type: Option[str] = Nothing
1466
- """Optional. MIME type of the file as defined by sender."""
1525
+ """Optional. MIME type of the file as defined by the sender."""
1467
1526
 
1468
1527
  file_size: Option[int] = Nothing
1469
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1470
- languages may have difficulty/silent defects in interpreting it. But
1471
- it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1528
+ """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1529
+ languages may have difficulty/silent defects in interpreting it. But
1530
+ it has at most 52 significant bits, so a signed 64-bit integer or double-precision
1472
1531
  float type are safe for storing this value."""
1473
1532
 
1474
1533
 
1534
+ class PaidMediaInfo(Model):
1535
+ """Object `PaidMediaInfo`, see the [documentation](https://core.telegram.org/bots/api#paidmediainfo).
1536
+
1537
+ Describes the paid media added to a message.
1538
+ """
1539
+
1540
+ star_count: int
1541
+ """The number of Telegram Stars that must be paid to buy access to the media."""
1542
+
1543
+ paid_media: list[Variative["PaidMediaPreview", "PaidMediaPhoto", "PaidMediaVideo"]]
1544
+ """Information about the paid media."""
1545
+
1546
+
1547
+ class PaidMediaPreview(PaidMedia):
1548
+ """Object `PaidMediaPreview`, see the [documentation](https://core.telegram.org/bots/api#paidmediapreview).
1549
+
1550
+ The paid media isn't available before the payment.
1551
+ """
1552
+
1553
+ type: typing.Literal["preview"]
1554
+ """Type of the paid media, always `preview`."""
1555
+
1556
+ width: Option[int] = Nothing
1557
+ """Optional. Media width as defined by the sender."""
1558
+
1559
+ height: Option[int] = Nothing
1560
+ """Optional. Media height as defined by the sender."""
1561
+
1562
+ duration: Option[int] = Nothing
1563
+ """Optional. Duration of the media in seconds as defined by the sender."""
1564
+
1565
+
1566
+ class PaidMediaPhoto(PaidMedia):
1567
+ """Object `PaidMediaPhoto`, see the [documentation](https://core.telegram.org/bots/api#paidmediaphoto).
1568
+
1569
+ The paid media is a photo.
1570
+ """
1571
+
1572
+ type: typing.Literal["photo"]
1573
+ """Type of the paid media, always `photo`."""
1574
+
1575
+ photo: list["PhotoSize"]
1576
+ """The photo."""
1577
+
1578
+
1579
+ class PaidMediaVideo(PaidMedia):
1580
+ """Object `PaidMediaVideo`, see the [documentation](https://core.telegram.org/bots/api#paidmediavideo).
1581
+
1582
+ The paid media is a video.
1583
+ """
1584
+
1585
+ type: typing.Literal["video"]
1586
+ """Type of the paid media, always `video`."""
1587
+
1588
+ video: "Video"
1589
+ """The video."""
1590
+
1591
+
1475
1592
  class Contact(Model):
1476
1593
  """Object `Contact`, see the [documentation](https://core.telegram.org/bots/api#contact).
1477
1594
 
@@ -1488,9 +1605,9 @@ class Contact(Model):
1488
1605
  """Optional. Contact's last name."""
1489
1606
 
1490
1607
  user_id: Option[int] = Nothing
1491
- """Optional. Contact's user identifier in Telegram. This number may have
1492
- more than 32 significant bits and some programming languages may have difficulty/silent
1493
- defects in interpreting it. But it has at most 52 significant bits, so a 64-bit
1608
+ """Optional. Contact's user identifier in Telegram. This number may have
1609
+ more than 32 significant bits and some programming languages may have difficulty/silent
1610
+ defects in interpreting it. But it has at most 52 significant bits, so a 64-bit
1494
1611
  integer or double-precision float type are safe for storing this identifier."""
1495
1612
 
1496
1613
  vcard: Option[str] = Nothing
@@ -1507,7 +1624,7 @@ class Dice(Model):
1507
1624
  """Emoji on which the dice throw animation is based."""
1508
1625
 
1509
1626
  value: int
1510
- """Value of the dice, 1-6 for `🎲`, `🎯` and `🎳` base emoji, 1-5 for `🏀` and `⚽` base
1627
+ """Value of the dice, 1-6 for `🎲`, `🎯` and `🎳` base emoji, 1-5 for `🏀` and `⚽` base
1511
1628
  emoji, 1-64 for `🎰` base emoji."""
1512
1629
 
1513
1630
 
@@ -1524,25 +1641,25 @@ class PollOption(Model):
1524
1641
  """Number of users that voted for this option."""
1525
1642
 
1526
1643
  text_entities: Option[list["MessageEntity"]] = Nothing
1527
- """Optional. Special entities that appear in the option text. Currently,
1644
+ """Optional. Special entities that appear in the option text. Currently,
1528
1645
  only custom emoji entities are allowed in poll option texts."""
1529
1646
 
1530
1647
 
1531
1648
  class InputPollOption(Model):
1532
1649
  """Object `InputPollOption`, see the [documentation](https://core.telegram.org/bots/api#inputpolloption).
1533
1650
 
1534
- This object contains information about one answer option in a poll to send.
1651
+ This object contains information about one answer option in a poll to be sent.
1535
1652
  """
1536
1653
 
1537
1654
  text: str
1538
1655
  """Option text, 1-100 characters."""
1539
1656
 
1540
1657
  text_parse_mode: Option[str] = Nothing
1541
- """Optional. Mode for parsing entities in the text. See formatting options
1658
+ """Optional. Mode for parsing entities in the text. See formatting options
1542
1659
  for more details. Currently, only custom emoji entities are allowed."""
1543
1660
 
1544
1661
  text_entities: Option[list["MessageEntity"]] = Nothing
1545
- """Optional. A JSON-serialized list of special entities that appear in the
1662
+ """Optional. A JSON-serialized list of special entities that appear in the
1546
1663
  poll option text. It can be specified instead of text_parse_mode."""
1547
1664
 
1548
1665
 
@@ -1556,14 +1673,14 @@ class PollAnswer(Model):
1556
1673
  """Unique poll identifier."""
1557
1674
 
1558
1675
  option_ids: list[int]
1559
- """0-based identifiers of chosen answer options. May be empty if the vote was
1676
+ """0-based identifiers of chosen answer options. May be empty if the vote was
1560
1677
  retracted."""
1561
1678
 
1562
1679
  voter_chat: Option["Chat"] = Nothing
1563
1680
  """Optional. The chat that changed the answer to the poll, if the voter is anonymous."""
1564
1681
 
1565
1682
  user: Option["User"] = Nothing
1566
- """Optional. The user that changed the answer to the poll, if the voter isn't
1683
+ """Optional. The user that changed the answer to the poll, if the voter isn't
1567
1684
  anonymous."""
1568
1685
 
1569
1686
 
@@ -1598,27 +1715,27 @@ class Poll(Model):
1598
1715
  """True, if the poll allows multiple answers."""
1599
1716
 
1600
1717
  question_entities: Option[list["MessageEntity"]] = Nothing
1601
- """Optional. Special entities that appear in the question. Currently, only
1718
+ """Optional. Special entities that appear in the question. Currently, only
1602
1719
  custom emoji entities are allowed in poll questions."""
1603
1720
 
1604
1721
  correct_option_id: Option[int] = Nothing
1605
- """Optional. 0-based identifier of the correct answer option. Available
1606
- only for polls in the quiz mode, which are closed, or was sent (not forwarded)
1722
+ """Optional. 0-based identifier of the correct answer option. Available
1723
+ only for polls in the quiz mode, which are closed, or was sent (not forwarded)
1607
1724
  by the bot or to the private chat with the bot."""
1608
1725
 
1609
1726
  explanation: Option[str] = Nothing
1610
- """Optional. Text that is shown when a user chooses an incorrect answer or taps
1727
+ """Optional. Text that is shown when a user chooses an incorrect answer or taps
1611
1728
  on the lamp icon in a quiz-style poll, 0-200 characters."""
1612
1729
 
1613
1730
  explanation_entities: Option[list["MessageEntity"]] = Nothing
1614
- """Optional. Special entities like usernames, URLs, bot commands, etc. that
1731
+ """Optional. Special entities like usernames, URLs, bot commands, etc. that
1615
1732
  appear in the explanation."""
1616
1733
 
1617
1734
  open_period: Option[int] = Nothing
1618
1735
  """Optional. Amount of time in seconds the poll will be active after creation."""
1619
1736
 
1620
1737
  close_date: Option[datetime] = Nothing
1621
- """Optional. Point in time (Unix timestamp) when the poll will be automatically
1738
+ """Optional. Point in time (Unix timestamp) when the poll will be automatically
1622
1739
  closed."""
1623
1740
 
1624
1741
 
@@ -1629,25 +1746,25 @@ class Location(Model):
1629
1746
  """
1630
1747
 
1631
1748
  latitude: float
1632
- """Latitude as defined by sender."""
1749
+ """Latitude as defined by the sender."""
1633
1750
 
1634
1751
  longitude: float
1635
- """Longitude as defined by sender."""
1752
+ """Longitude as defined by the sender."""
1636
1753
 
1637
1754
  horizontal_accuracy: Option[float] = Nothing
1638
- """Optional. The radius of uncertainty for the location, measured in meters;
1755
+ """Optional. The radius of uncertainty for the location, measured in meters;
1639
1756
  0-1500."""
1640
1757
 
1641
1758
  live_period: Option[int] = Nothing
1642
- """Optional. Time relative to the message sending date, during which the location
1759
+ """Optional. Time relative to the message sending date, during which the location
1643
1760
  can be updated; in seconds. For active live locations only."""
1644
1761
 
1645
1762
  heading: Option[int] = Nothing
1646
- """Optional. The direction in which user is moving, in degrees; 1-360. For
1763
+ """Optional. The direction in which user is moving, in degrees; 1-360. For
1647
1764
  active live locations only."""
1648
1765
 
1649
1766
  proximity_alert_radius: Option[int] = Nothing
1650
- """Optional. The maximum distance for proximity alerts about approaching
1767
+ """Optional. The maximum distance for proximity alerts about approaching
1651
1768
  another chat member, in meters. For sent live locations only."""
1652
1769
 
1653
1770
 
@@ -1670,7 +1787,7 @@ class Venue(Model):
1670
1787
  """Optional. Foursquare identifier of the venue."""
1671
1788
 
1672
1789
  foursquare_type: Option[str] = Nothing
1673
- """Optional. Foursquare type of the venue. (For example, `arts_entertainment/default`,
1790
+ """Optional. Foursquare type of the venue. (For example, `arts_entertainment/default`,
1674
1791
  `arts_entertainment/aquarium` or `food/icecream`.)."""
1675
1792
 
1676
1793
  google_place_id: Option[str] = Nothing
@@ -1690,7 +1807,7 @@ class WebAppData(Model):
1690
1807
  """The data. Be aware that a bad client can send arbitrary data in this field."""
1691
1808
 
1692
1809
  button_text: str
1693
- """Text of the web_app keyboard button from which the Web App was opened. Be
1810
+ """Text of the web_app keyboard button from which the Web App was opened. Be
1694
1811
  aware that a bad client can send arbitrary data in this field."""
1695
1812
 
1696
1813
 
@@ -1772,7 +1889,7 @@ class BackgroundFillFreeformGradient(BackgroundFill):
1772
1889
  """Type of the background fill, always `freeform_gradient`."""
1773
1890
 
1774
1891
  colors: list[int]
1775
- """A list of the 3 or 4 base colors that are used to generate the freeform gradient
1892
+ """A list of the 3 or 4 base colors that are used to generate the freeform gradient
1776
1893
  in the RGB24 format."""
1777
1894
 
1778
1895
 
@@ -1785,9 +1902,7 @@ class BackgroundTypeFill(BackgroundType):
1785
1902
  type: typing.Literal["fill"]
1786
1903
  """Type of the background, always `fill`."""
1787
1904
 
1788
- fill: Variative[
1789
- "BackgroundFillSolid", "BackgroundFillGradient", "BackgroundFillFreeformGradient"
1790
- ]
1905
+ fill: Variative["BackgroundFillSolid", "BackgroundFillGradient", "BackgroundFillFreeformGradient"]
1791
1906
  """The background fill."""
1792
1907
 
1793
1908
  dark_theme_dimming: int
@@ -1810,7 +1925,7 @@ class BackgroundTypeWallpaper(BackgroundType):
1810
1925
  """Dimming of the background in dark themes, as a percentage; 0-100."""
1811
1926
 
1812
1927
  is_blurred: Option[bool] = Nothing
1813
- """Optional. True, if the wallpaper is downscaled to fit in a 450x450 square
1928
+ """Optional. True, if the wallpaper is downscaled to fit in a 450x450 square
1814
1929
  and then box-blurred with radius 12."""
1815
1930
 
1816
1931
  is_moving: Option[bool] = Nothing
@@ -1829,16 +1944,14 @@ class BackgroundTypePattern(BackgroundType):
1829
1944
  document: "Document"
1830
1945
  """Document with the pattern."""
1831
1946
 
1832
- fill: Variative[
1833
- "BackgroundFillSolid", "BackgroundFillGradient", "BackgroundFillFreeformGradient"
1834
- ]
1947
+ fill: Variative["BackgroundFillSolid", "BackgroundFillGradient", "BackgroundFillFreeformGradient"]
1835
1948
  """The background fill that is combined with the pattern."""
1836
1949
 
1837
1950
  intensity: int
1838
1951
  """Intensity of the pattern when it is shown above the filled background; 0-100."""
1839
1952
 
1840
1953
  is_inverted: Option[bool] = Nothing
1841
- """Optional. True, if the background fill must be applied only to the pattern
1954
+ """Optional. True, if the background fill must be applied only to the pattern
1842
1955
  itself. All other pixels are black in this case. For dark themes only."""
1843
1956
 
1844
1957
  is_moving: Option[bool] = Nothing
@@ -1865,10 +1978,7 @@ class ChatBackground(Model):
1865
1978
  """
1866
1979
 
1867
1980
  type: Variative[
1868
- "BackgroundTypeFill",
1869
- "BackgroundTypeWallpaper",
1870
- "BackgroundTypePattern",
1871
- "BackgroundTypeChatTheme",
1981
+ "BackgroundTypeFill", "BackgroundTypeWallpaper", "BackgroundTypePattern", "BackgroundTypeChatTheme"
1872
1982
  ]
1873
1983
  """Type of the background."""
1874
1984
 
@@ -1906,7 +2016,7 @@ class ForumTopicEdited(Model):
1906
2016
  """Optional. New name of the topic, if it was edited."""
1907
2017
 
1908
2018
  icon_custom_emoji_id: Option[str] = Nothing
1909
- """Optional. New identifier of the custom emoji shown as the topic icon, if
2019
+ """Optional. New identifier of the custom emoji shown as the topic icon, if
1910
2020
  it was edited; an empty string if the icon was removed."""
1911
2021
 
1912
2022
 
@@ -1938,11 +2048,11 @@ class SharedUser(Model):
1938
2048
  """
1939
2049
 
1940
2050
  user_id: int
1941
- """Identifier of the shared user. This number may have more than 32 significant
1942
- bits and some programming languages may have difficulty/silent defects
1943
- in interpreting it. But it has at most 52 significant bits, so 64-bit integers
1944
- or double-precision float types are safe for storing these identifiers.
1945
- The bot may not have access to the user and could be unable to use this identifier,
2051
+ """Identifier of the shared user. This number may have more than 32 significant
2052
+ bits and some programming languages may have difficulty/silent defects
2053
+ in interpreting it. But it has at most 52 significant bits, so 64-bit integers
2054
+ or double-precision float types are safe for storing these identifiers.
2055
+ The bot may not have access to the user and could be unable to use this identifier,
1946
2056
  unless the user is already known to the bot by some other means."""
1947
2057
 
1948
2058
  first_name: Option[str] = Nothing
@@ -1955,7 +2065,7 @@ class SharedUser(Model):
1955
2065
  """Optional. Username of the user, if the username was requested by the bot."""
1956
2066
 
1957
2067
  photo: Option[list["PhotoSize"]] = Nothing
1958
- """Optional. Available sizes of the chat photo, if the photo was requested
2068
+ """Optional. Available sizes of the chat photo, if the photo was requested
1959
2069
  by the bot."""
1960
2070
 
1961
2071
 
@@ -1982,22 +2092,22 @@ class ChatShared(Model):
1982
2092
  """Identifier of the request."""
1983
2093
 
1984
2094
  chat_id: int
1985
- """Identifier of the shared chat. This number may have more than 32 significant
1986
- bits and some programming languages may have difficulty/silent defects
1987
- in interpreting it. But it has at most 52 significant bits, so a 64-bit integer
1988
- or double-precision float type are safe for storing this identifier. The
1989
- bot may not have access to the chat and could be unable to use this identifier,
2095
+ """Identifier of the shared chat. This number may have more than 32 significant
2096
+ bits and some programming languages may have difficulty/silent defects
2097
+ in interpreting it. But it has at most 52 significant bits, so a 64-bit integer
2098
+ or double-precision float type are safe for storing this identifier. The
2099
+ bot may not have access to the chat and could be unable to use this identifier,
1990
2100
  unless the chat is already known to the bot by some other means."""
1991
2101
 
1992
2102
  title: Option[str] = Nothing
1993
2103
  """Optional. Title of the chat, if the title was requested by the bot."""
1994
2104
 
1995
2105
  username: Option[str] = Nothing
1996
- """Optional. Username of the chat, if the username was requested by the bot
2106
+ """Optional. Username of the chat, if the username was requested by the bot
1997
2107
  and available."""
1998
2108
 
1999
2109
  photo: Option[list["PhotoSize"]] = Nothing
2000
- """Optional. Available sizes of the chat photo, if the photo was requested
2110
+ """Optional. Available sizes of the chat photo, if the photo was requested
2001
2111
  by the bot."""
2002
2112
 
2003
2113
 
@@ -2008,15 +2118,15 @@ class WriteAccessAllowed(Model):
2008
2118
  """
2009
2119
 
2010
2120
  from_request: Option[bool] = Nothing
2011
- """Optional. True, if the access was granted after the user accepted an explicit
2121
+ """Optional. True, if the access was granted after the user accepted an explicit
2012
2122
  request from a Web App sent by the method requestWriteAccess."""
2013
2123
 
2014
2124
  web_app_name: Option[str] = Nothing
2015
- """Optional. Name of the Web App, if the access was granted when the Web App was
2125
+ """Optional. Name of the Web App, if the access was granted when the Web App was
2016
2126
  launched from a link."""
2017
2127
 
2018
2128
  from_attachment_menu: Option[bool] = Nothing
2019
- """Optional. True, if the access was granted when the bot was added to the attachment
2129
+ """Optional. True, if the access was granted when the bot was added to the attachment
2020
2130
  or side menu."""
2021
2131
 
2022
2132
 
@@ -2027,7 +2137,7 @@ class VideoChatScheduled(Model):
2027
2137
  """
2028
2138
 
2029
2139
  start_date: datetime
2030
- """Point in time (Unix timestamp) when the video chat is supposed to be started
2140
+ """Point in time (Unix timestamp) when the video chat is supposed to be started
2031
2141
  by a chat administrator."""
2032
2142
 
2033
2143
 
@@ -2081,7 +2191,7 @@ class Giveaway(Model):
2081
2191
  """The number of users which are supposed to be selected as winners of the giveaway."""
2082
2192
 
2083
2193
  only_new_members: Option[bool] = Nothing
2084
- """Optional. True, if only users who join the chats after the giveaway started
2194
+ """Optional. True, if only users who join the chats after the giveaway started
2085
2195
  should be eligible to win."""
2086
2196
 
2087
2197
  has_public_winners: Option[bool] = Nothing
@@ -2091,13 +2201,13 @@ class Giveaway(Model):
2091
2201
  """Optional. Description of additional giveaway prize."""
2092
2202
 
2093
2203
  country_codes: Option[list[str]] = Nothing
2094
- """Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating
2095
- the countries from which eligible users for the giveaway must come. If empty,
2096
- then all users can participate in the giveaway. Users with a phone number
2204
+ """Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating
2205
+ the countries from which eligible users for the giveaway must come. If empty,
2206
+ then all users can participate in the giveaway. Users with a phone number
2097
2207
  that was bought on Fragment can always participate in giveaways."""
2098
2208
 
2099
2209
  premium_subscription_month_count: Option[int] = Nothing
2100
- """Optional. The number of months the Telegram Premium subscription won from
2210
+ """Optional. The number of months the Telegram Premium subscription won from
2101
2211
  the giveaway will be active for."""
2102
2212
 
2103
2213
 
@@ -2123,22 +2233,22 @@ class GiveawayWinners(Model):
2123
2233
  """List of up to 100 winners of the giveaway."""
2124
2234
 
2125
2235
  additional_chat_count: Option[int] = Nothing
2126
- """Optional. The number of other chats the user had to join in order to be eligible
2236
+ """Optional. The number of other chats the user had to join in order to be eligible
2127
2237
  for the giveaway."""
2128
2238
 
2129
2239
  premium_subscription_month_count: Option[int] = Nothing
2130
- """Optional. The number of months the Telegram Premium subscription won from
2240
+ """Optional. The number of months the Telegram Premium subscription won from
2131
2241
  the giveaway will be active for."""
2132
2242
 
2133
2243
  unclaimed_prize_count: Option[int] = Nothing
2134
2244
  """Optional. Number of undistributed prizes."""
2135
2245
 
2136
2246
  only_new_members: Option[bool] = Nothing
2137
- """Optional. True, if only users who had joined the chats after the giveaway
2247
+ """Optional. True, if only users who had joined the chats after the giveaway
2138
2248
  started were eligible to win."""
2139
2249
 
2140
2250
  was_refunded: Option[bool] = Nothing
2141
- """Optional. True, if the giveaway was canceled because the payment for it
2251
+ """Optional. True, if the giveaway was canceled because the payment for it
2142
2252
  was refunded."""
2143
2253
 
2144
2254
  prize_description: Option[str] = Nothing
@@ -2171,21 +2281,21 @@ class LinkPreviewOptions(Model):
2171
2281
  """Optional. True, if the link preview is disabled."""
2172
2282
 
2173
2283
  url: Option[str] = Nothing
2174
- """Optional. URL to use for the link preview. If empty, then the first URL found
2284
+ """Optional. URL to use for the link preview. If empty, then the first URL found
2175
2285
  in the message text will be used."""
2176
2286
 
2177
2287
  prefer_small_media: Option[bool] = Nothing
2178
- """Optional. True, if the media in the link preview is supposed to be shrunk;
2179
- ignored if the URL isn't explicitly specified or media size change isn't
2288
+ """Optional. True, if the media in the link preview is supposed to be shrunk;
2289
+ ignored if the URL isn't explicitly specified or media size change isn't
2180
2290
  supported for the preview."""
2181
2291
 
2182
2292
  prefer_large_media: Option[bool] = Nothing
2183
- """Optional. True, if the media in the link preview is supposed to be enlarged;
2184
- ignored if the URL isn't explicitly specified or media size change isn't
2293
+ """Optional. True, if the media in the link preview is supposed to be enlarged;
2294
+ ignored if the URL isn't explicitly specified or media size change isn't
2185
2295
  supported for the preview."""
2186
2296
 
2187
2297
  show_above_text: Option[bool] = Nothing
2188
- """Optional. True, if the link preview must be shown above the message text;
2298
+ """Optional. True, if the link preview must be shown above the message text;
2189
2299
  otherwise, the link preview will be shown below the message text."""
2190
2300
 
2191
2301
 
@@ -2212,17 +2322,17 @@ class File(Model):
2212
2322
  """Identifier for this file, which can be used to download or reuse the file."""
2213
2323
 
2214
2324
  file_unique_id: str
2215
- """Unique identifier for this file, which is supposed to be the same over time
2325
+ """Unique identifier for this file, which is supposed to be the same over time
2216
2326
  and for different bots. Can't be used to download or reuse the file."""
2217
2327
 
2218
2328
  file_size: Option[int] = Nothing
2219
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
2220
- languages may have difficulty/silent defects in interpreting it. But
2221
- it has at most 52 significant bits, so a signed 64-bit integer or double-precision
2329
+ """Optional. File size in bytes. It can be bigger than 2^31 and some programming
2330
+ languages may have difficulty/silent defects in interpreting it. But
2331
+ it has at most 52 significant bits, so a signed 64-bit integer or double-precision
2222
2332
  float type are safe for storing this value."""
2223
2333
 
2224
2334
  file_path: Option[str] = Nothing
2225
- """Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path>
2335
+ """Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path>
2226
2336
  to get the file."""
2227
2337
 
2228
2338
 
@@ -2233,7 +2343,7 @@ class WebAppInfo(Model):
2233
2343
  """
2234
2344
 
2235
2345
  url: str
2236
- """An HTTPS URL of a Web App to be opened with additional data as specified in
2346
+ """An HTTPS URL of a Web App to be opened with additional data as specified in
2237
2347
  Initializing Web Apps."""
2238
2348
 
2239
2349
 
@@ -2247,32 +2357,32 @@ class ReplyKeyboardMarkup(Model):
2247
2357
  """Array of button rows, each represented by an Array of KeyboardButton objects."""
2248
2358
 
2249
2359
  is_persistent: Option[bool] = Nothing
2250
- """Optional. Requests clients to always show the keyboard when the regular
2251
- keyboard is hidden. Defaults to false, in which case the custom keyboard
2360
+ """Optional. Requests clients to always show the keyboard when the regular
2361
+ keyboard is hidden. Defaults to false, in which case the custom keyboard
2252
2362
  can be hidden and opened with a keyboard icon."""
2253
2363
 
2254
2364
  resize_keyboard: Option[bool] = Nothing
2255
- """Optional. Requests clients to resize the keyboard vertically for optimal
2256
- fit (e.g., make the keyboard smaller if there are just two rows of buttons).
2257
- Defaults to false, in which case the custom keyboard is always of the same
2365
+ """Optional. Requests clients to resize the keyboard vertically for optimal
2366
+ fit (e.g., make the keyboard smaller if there are just two rows of buttons).
2367
+ Defaults to false, in which case the custom keyboard is always of the same
2258
2368
  height as the app's standard keyboard."""
2259
2369
 
2260
2370
  one_time_keyboard: Option[bool] = Nothing
2261
- """Optional. Requests clients to hide the keyboard as soon as it's been used.
2262
- The keyboard will still be available, but clients will automatically display
2263
- the usual letter-keyboard in the chat - the user can press a special button
2371
+ """Optional. Requests clients to hide the keyboard as soon as it's been used.
2372
+ The keyboard will still be available, but clients will automatically display
2373
+ the usual letter-keyboard in the chat - the user can press a special button
2264
2374
  in the input field to see the custom keyboard again. Defaults to false."""
2265
2375
 
2266
2376
  input_field_placeholder: Option[str] = Nothing
2267
- """Optional. The placeholder to be shown in the input field when the keyboard
2377
+ """Optional. The placeholder to be shown in the input field when the keyboard
2268
2378
  is active; 1-64 characters."""
2269
2379
 
2270
2380
  selective: Option[bool] = Nothing
2271
- """Optional. Use this parameter if you want to show the keyboard to specific
2272
- users only. Targets: 1) users that are @mentioned in the text of the Message
2273
- object; 2) if the bot's message is a reply to a message in the same chat and
2274
- forum topic, sender of the original message. Example: A user requests to
2275
- change the bot's language, bot replies to the request with a keyboard to
2381
+ """Optional. Use this parameter if you want to show the keyboard to specific
2382
+ users only. Targets: 1) users that are @mentioned in the text of the Message
2383
+ object; 2) if the bot's message is a reply to a message in the same chat and
2384
+ forum topic, sender of the original message. Example: A user requests to
2385
+ change the bot's language, bot replies to the request with a keyboard to
2276
2386
  select the new language. Other users in the group don't see the keyboard."""
2277
2387
 
2278
2388
  @property
@@ -2285,39 +2395,39 @@ class ReplyKeyboardMarkup(Model):
2285
2395
  class KeyboardButton(Model):
2286
2396
  """Object `KeyboardButton`, see the [documentation](https://core.telegram.org/bots/api#keyboardbutton).
2287
2397
 
2288
- This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_users, request_chat, request_contact, request_location, and request_poll are mutually exclusive.
2398
+ This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.
2289
2399
  Note: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.
2290
2400
  """
2291
2401
 
2292
2402
  text: str
2293
- """Text of the button. If none of the optional fields are used, it will be sent
2403
+ """Text of the button. If none of the optional fields are used, it will be sent
2294
2404
  as a message when the button is pressed."""
2295
2405
 
2296
2406
  request_users: Option["KeyboardButtonRequestUsers"] = Nothing
2297
- """Optional. If specified, pressing the button will open a list of suitable
2298
- users. Identifiers of selected users will be sent to the bot in a `users_shared`
2407
+ """Optional. If specified, pressing the button will open a list of suitable
2408
+ users. Identifiers of selected users will be sent to the bot in a `users_shared`
2299
2409
  service message. Available in private chats only."""
2300
2410
 
2301
2411
  request_chat: Option["KeyboardButtonRequestChat"] = Nothing
2302
- """Optional. If specified, pressing the button will open a list of suitable
2303
- chats. Tapping on a chat will send its identifier to the bot in a `chat_shared`
2412
+ """Optional. If specified, pressing the button will open a list of suitable
2413
+ chats. Tapping on a chat will send its identifier to the bot in a `chat_shared`
2304
2414
  service message. Available in private chats only."""
2305
2415
 
2306
2416
  request_contact: Option[bool] = Nothing
2307
- """Optional. If True, the user's phone number will be sent as a contact when
2417
+ """Optional. If True, the user's phone number will be sent as a contact when
2308
2418
  the button is pressed. Available in private chats only."""
2309
2419
 
2310
2420
  request_location: Option[bool] = Nothing
2311
- """Optional. If True, the user's current location will be sent when the button
2421
+ """Optional. If True, the user's current location will be sent when the button
2312
2422
  is pressed. Available in private chats only."""
2313
2423
 
2314
2424
  request_poll: Option["KeyboardButtonPollType"] = Nothing
2315
- """Optional. If specified, the user will be asked to create a poll and send it
2425
+ """Optional. If specified, the user will be asked to create a poll and send it
2316
2426
  to the bot when the button is pressed. Available in private chats only."""
2317
2427
 
2318
2428
  web_app: Option["WebAppInfo"] = Nothing
2319
- """Optional. If specified, the described Web App will be launched when the
2320
- button is pressed. The Web App will be able to send a `web_app_data` service
2429
+ """Optional. If specified, the described Web App will be launched when the
2430
+ button is pressed. The Web App will be able to send a `web_app_data` service
2321
2431
  message. Available in private chats only."""
2322
2432
 
2323
2433
 
@@ -2328,19 +2438,19 @@ class KeyboardButtonRequestUsers(Model):
2328
2438
  """
2329
2439
 
2330
2440
  request_id: int
2331
- """Signed 32-bit identifier of the request that will be received back in the
2441
+ """Signed 32-bit identifier of the request that will be received back in the
2332
2442
  UsersShared object. Must be unique within the message."""
2333
2443
 
2334
2444
  user_is_bot: Option[bool] = Nothing
2335
- """Optional. Pass True to request bots, pass False to request regular users.
2445
+ """Optional. Pass True to request bots, pass False to request regular users.
2336
2446
  If not specified, no additional restrictions are applied."""
2337
2447
 
2338
2448
  user_is_premium: Option[bool] = Nothing
2339
- """Optional. Pass True to request premium users, pass False to request non-premium
2449
+ """Optional. Pass True to request premium users, pass False to request non-premium
2340
2450
  users. If not specified, no additional restrictions are applied."""
2341
2451
 
2342
2452
  max_quantity: Option[int] = Nothing
2343
- """Optional. The maximum number of users to be selected; 1-10. Defaults to
2453
+ """Optional. The maximum number of users to be selected; 1-10. Defaults to
2344
2454
  1."""
2345
2455
 
2346
2456
  request_name: Option[bool] = Nothing
@@ -2360,38 +2470,38 @@ class KeyboardButtonRequestChat(Model):
2360
2470
  """
2361
2471
 
2362
2472
  request_id: int
2363
- """Signed 32-bit identifier of the request, which will be received back in
2473
+ """Signed 32-bit identifier of the request, which will be received back in
2364
2474
  the ChatShared object. Must be unique within the message."""
2365
2475
 
2366
2476
  chat_is_channel: bool
2367
- """Pass True to request a channel chat, pass False to request a group or a supergroup
2477
+ """Pass True to request a channel chat, pass False to request a group or a supergroup
2368
2478
  chat."""
2369
2479
 
2370
2480
  chat_is_forum: Option[bool] = Nothing
2371
- """Optional. Pass True to request a forum supergroup, pass False to request
2481
+ """Optional. Pass True to request a forum supergroup, pass False to request
2372
2482
  a non-forum chat. If not specified, no additional restrictions are applied."""
2373
2483
 
2374
2484
  chat_has_username: Option[bool] = Nothing
2375
- """Optional. Pass True to request a supergroup or a channel with a username,
2376
- pass False to request a chat without a username. If not specified, no additional
2485
+ """Optional. Pass True to request a supergroup or a channel with a username,
2486
+ pass False to request a chat without a username. If not specified, no additional
2377
2487
  restrictions are applied."""
2378
2488
 
2379
2489
  chat_is_created: Option[bool] = Nothing
2380
- """Optional. Pass True to request a chat owned by the user. Otherwise, no additional
2490
+ """Optional. Pass True to request a chat owned by the user. Otherwise, no additional
2381
2491
  restrictions are applied."""
2382
2492
 
2383
2493
  user_administrator_rights: Option["ChatAdministratorRights"] = Nothing
2384
- """Optional. A JSON-serialized object listing the required administrator
2385
- rights of the user in the chat. The rights must be a superset of bot_administrator_rights.
2494
+ """Optional. A JSON-serialized object listing the required administrator
2495
+ rights of the user in the chat. The rights must be a superset of bot_administrator_rights.
2386
2496
  If not specified, no additional restrictions are applied."""
2387
2497
 
2388
2498
  bot_administrator_rights: Option["ChatAdministratorRights"] = Nothing
2389
- """Optional. A JSON-serialized object listing the required administrator
2390
- rights of the bot in the chat. The rights must be a subset of user_administrator_rights.
2499
+ """Optional. A JSON-serialized object listing the required administrator
2500
+ rights of the bot in the chat. The rights must be a subset of user_administrator_rights.
2391
2501
  If not specified, no additional restrictions are applied."""
2392
2502
 
2393
2503
  bot_is_member: Option[bool] = Nothing
2394
- """Optional. Pass True to request a chat with the bot as a member. Otherwise,
2504
+ """Optional. Pass True to request a chat with the bot as a member. Otherwise,
2395
2505
  no additional restrictions are applied."""
2396
2506
 
2397
2507
  request_title: Option[bool] = Nothing
@@ -2411,8 +2521,8 @@ class KeyboardButtonPollType(Model):
2411
2521
  """
2412
2522
 
2413
2523
  type: Option[typing.Literal["quiz", "regular"]] = Nothing
2414
- """Optional. If quiz is passed, the user will be allowed to create only polls
2415
- in the quiz mode. If regular is passed, only regular polls will be allowed.
2524
+ """Optional. If quiz is passed, the user will be allowed to create only polls
2525
+ in the quiz mode. If regular is passed, only regular polls will be allowed.
2416
2526
  Otherwise, the user will be allowed to create a poll of any type."""
2417
2527
 
2418
2528
 
@@ -2423,17 +2533,17 @@ class ReplyKeyboardRemove(Model):
2423
2533
  """
2424
2534
 
2425
2535
  remove_keyboard: bool
2426
- """Requests clients to remove the custom keyboard (user will not be able to
2427
- summon this keyboard; if you want to hide the keyboard from sight but keep
2536
+ """Requests clients to remove the custom keyboard (user will not be able to
2537
+ summon this keyboard; if you want to hide the keyboard from sight but keep
2428
2538
  it accessible, use one_time_keyboard in ReplyKeyboardMarkup)."""
2429
2539
 
2430
2540
  selective: Option[bool] = Nothing
2431
- """Optional. Use this parameter if you want to remove the keyboard for specific
2432
- users only. Targets: 1) users that are @mentioned in the text of the Message
2433
- object; 2) if the bot's message is a reply to a message in the same chat and
2434
- forum topic, sender of the original message. Example: A user votes in a poll,
2435
- bot returns confirmation message in reply to the vote and removes the keyboard
2436
- for that user, while still showing the keyboard with poll options to users
2541
+ """Optional. Use this parameter if you want to remove the keyboard for specific
2542
+ users only. Targets: 1) users that are @mentioned in the text of the Message
2543
+ object; 2) if the bot's message is a reply to a message in the same chat and
2544
+ forum topic, sender of the original message. Example: A user votes in a poll,
2545
+ bot returns confirmation message in reply to the vote and removes the keyboard
2546
+ for that user, while still showing the keyboard with poll options to users
2437
2547
  who haven't voted yet."""
2438
2548
 
2439
2549
 
@@ -2444,70 +2554,70 @@ class InlineKeyboardMarkup(Model):
2444
2554
  """
2445
2555
 
2446
2556
  inline_keyboard: list[list["InlineKeyboardButton"]]
2447
- """Array of button rows, each represented by an Array of InlineKeyboardButton
2557
+ """Array of button rows, each represented by an Array of InlineKeyboardButton
2448
2558
  objects."""
2449
2559
 
2450
2560
 
2451
2561
  class InlineKeyboardButton(Model):
2452
2562
  """Object `InlineKeyboardButton`, see the [documentation](https://core.telegram.org/bots/api#inlinekeyboardbutton).
2453
2563
 
2454
- This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
2564
+ This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.
2455
2565
  """
2456
2566
 
2457
2567
  text: str
2458
2568
  """Label text on the button."""
2459
2569
 
2460
2570
  url: Option[str] = Nothing
2461
- """Optional. HTTP or tg:// URL to be opened when the button is pressed. Links
2462
- tg://user?id=<user_id> can be used to mention a user by their identifier
2571
+ """Optional. HTTP or tg:// URL to be opened when the button is pressed. Links
2572
+ tg://user?id=<user_id> can be used to mention a user by their identifier
2463
2573
  without using a username, if this is allowed by their privacy settings."""
2464
2574
 
2465
2575
  callback_data: Option[str] = Nothing
2466
- """Optional. Data to be sent in a callback query to the bot when button is pressed,
2467
- 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business
2468
- account."""
2576
+ """Optional. Data to be sent in a callback query to the bot when the button is
2577
+ pressed, 1-64 bytes."""
2469
2578
 
2470
2579
  web_app: Option["WebAppInfo"] = Nothing
2471
- """Optional. Description of the Web App that will be launched when the user
2472
- presses the button. The Web App will be able to send an arbitrary message
2473
- on behalf of the user using the method answerWebAppQuery. Available only
2474
- in private chats between a user and the bot. Not supported for messages sent
2580
+ """Optional. Description of the Web App that will be launched when the user
2581
+ presses the button. The Web App will be able to send an arbitrary message
2582
+ on behalf of the user using the method answerWebAppQuery. Available only
2583
+ in private chats between a user and the bot. Not supported for messages sent
2475
2584
  on behalf of a Telegram Business account."""
2476
2585
 
2477
2586
  login_url: Option["LoginUrl"] = Nothing
2478
- """Optional. An HTTPS URL used to automatically authorize the user. Can be
2587
+ """Optional. An HTTPS URL used to automatically authorize the user. Can be
2479
2588
  used as a replacement for the Telegram Login Widget."""
2480
2589
 
2481
2590
  switch_inline_query: Option[str] = Nothing
2482
- """Optional. If set, pressing the button will prompt the user to select one
2483
- of their chats, open that chat and insert the bot's username and the specified
2484
- inline query in the input field. May be empty, in which case just the bot's
2485
- username will be inserted. Not supported for messages sent on behalf of
2591
+ """Optional. If set, pressing the button will prompt the user to select one
2592
+ of their chats, open that chat and insert the bot's username and the specified
2593
+ inline query in the input field. May be empty, in which case just the bot's
2594
+ username will be inserted. Not supported for messages sent on behalf of
2486
2595
  a Telegram Business account."""
2487
2596
 
2488
2597
  switch_inline_query_current_chat: Option[str] = Nothing
2489
- """Optional. If set, pressing the button will insert the bot's username and
2490
- the specified inline query in the current chat's input field. May be empty,
2491
- in which case only the bot's username will be inserted. This offers a quick
2492
- way for the user to open your bot in inline mode in the same chat - good for selecting
2493
- something from multiple options. Not supported in channels and for messages
2598
+ """Optional. If set, pressing the button will insert the bot's username and
2599
+ the specified inline query in the current chat's input field. May be empty,
2600
+ in which case only the bot's username will be inserted. This offers a quick
2601
+ way for the user to open your bot in inline mode in the same chat - good for selecting
2602
+ something from multiple options. Not supported in channels and for messages
2494
2603
  sent on behalf of a Telegram Business account."""
2495
2604
 
2496
2605
  switch_inline_query_chosen_chat: Option["SwitchInlineQueryChosenChat"] = Nothing
2497
- """Optional. If set, pressing the button will prompt the user to select one
2498
- of their chats of the specified type, open that chat and insert the bot's
2499
- username and the specified inline query in the input field. Not supported
2606
+ """Optional. If set, pressing the button will prompt the user to select one
2607
+ of their chats of the specified type, open that chat and insert the bot's
2608
+ username and the specified inline query in the input field. Not supported
2500
2609
  for messages sent on behalf of a Telegram Business account."""
2501
2610
 
2502
2611
  callback_game: Option["CallbackGame"] = Nothing
2503
- """Optional. Description of the game that will be launched when the user presses
2504
- the button. NOTE: This type of button must always be the first button in the
2612
+ """Optional. Description of the game that will be launched when the user presses
2613
+ the button. NOTE: This type of button must always be the first button in the
2505
2614
  first row."""
2506
2615
 
2507
2616
  pay: Option[bool] = Nothing
2508
- """Optional. Specify True, to send a Pay button. NOTE: This type of button must
2509
- always be the first button in the first row and can only be used in invoice
2510
- messages."""
2617
+ """Optional. Specify True, to send a Pay button. Substrings `⭐` and `XTR` in
2618
+ the buttons's text will be replaced with a Telegram Star icon. NOTE: This
2619
+ type of button must always be the first button in the first row and can only
2620
+ be used in invoice messages."""
2511
2621
 
2512
2622
 
2513
2623
  class LoginUrl(Model):
@@ -2518,24 +2628,24 @@ class LoginUrl(Model):
2518
2628
  """
2519
2629
 
2520
2630
  url: str
2521
- """An HTTPS URL to be opened with user authorization data added to the query
2522
- string when the button is pressed. If the user refuses to provide authorization
2523
- data, the original URL without information about the user will be opened.
2524
- The data added is the same as described in Receiving authorization data.
2525
- NOTE: You must always check the hash of the received data to verify the authentication
2631
+ """An HTTPS URL to be opened with user authorization data added to the query
2632
+ string when the button is pressed. If the user refuses to provide authorization
2633
+ data, the original URL without information about the user will be opened.
2634
+ The data added is the same as described in Receiving authorization data.
2635
+ NOTE: You must always check the hash of the received data to verify the authentication
2526
2636
  and the integrity of the data as described in Checking authorization."""
2527
2637
 
2528
2638
  forward_text: Option[str] = Nothing
2529
2639
  """Optional. New text of the button in forwarded messages."""
2530
2640
 
2531
2641
  bot_username: Option[str] = Nothing
2532
- """Optional. Username of a bot, which will be used for user authorization.
2533
- See Setting up a bot for more details. If not specified, the current bot's
2534
- username will be assumed. The url's domain must be the same as the domain
2642
+ """Optional. Username of a bot, which will be used for user authorization.
2643
+ See Setting up a bot for more details. If not specified, the current bot's
2644
+ username will be assumed. The url's domain must be the same as the domain
2535
2645
  linked with the bot. See Linking your domain to the bot for more details."""
2536
2646
 
2537
2647
  request_write_access: Option[bool] = Nothing
2538
- """Optional. Pass True to request the permission for your bot to send messages
2648
+ """Optional. Pass True to request the permission for your bot to send messages
2539
2649
  to the user."""
2540
2650
 
2541
2651
 
@@ -2546,7 +2656,7 @@ class SwitchInlineQueryChosenChat(Model):
2546
2656
  """
2547
2657
 
2548
2658
  query: Option[str] = Nothing
2549
- """Optional. The default inline query to be inserted in the input field. If
2659
+ """Optional. The default inline query to be inserted in the input field. If
2550
2660
  left empty, only the bot's username will be inserted."""
2551
2661
 
2552
2662
  allow_user_chats: Option[bool] = Nothing
@@ -2575,23 +2685,23 @@ class CallbackQuery(Model):
2575
2685
  """Sender."""
2576
2686
 
2577
2687
  chat_instance: str
2578
- """Global identifier, uniquely corresponding to the chat to which the message
2688
+ """Global identifier, uniquely corresponding to the chat to which the message
2579
2689
  with the callback button was sent. Useful for high scores in games."""
2580
2690
 
2581
2691
  message: Option[Variative["Message", "InaccessibleMessage"]] = Nothing
2582
- """Optional. Message sent by the bot with the callback button that originated
2692
+ """Optional. Message sent by the bot with the callback button that originated
2583
2693
  the query."""
2584
2694
 
2585
2695
  inline_message_id: Option[str] = Nothing
2586
- """Optional. Identifier of the message sent via the bot in inline mode, that
2696
+ """Optional. Identifier of the message sent via the bot in inline mode, that
2587
2697
  originated the query."""
2588
2698
 
2589
2699
  data: Option[str] = Nothing
2590
- """Optional. Data associated with the callback button. Be aware that the message
2700
+ """Optional. Data associated with the callback button. Be aware that the message
2591
2701
  originated the query can contain no callback buttons with this data."""
2592
2702
 
2593
2703
  game_short_name: Option[str] = Nothing
2594
- """Optional. Short name of a Game to be returned, serves as the unique identifier
2704
+ """Optional. Short name of a Game to be returned, serves as the unique identifier
2595
2705
  for the game."""
2596
2706
 
2597
2707
 
@@ -2602,17 +2712,17 @@ class ForceReply(Model):
2602
2712
  """
2603
2713
 
2604
2714
  force_reply: bool
2605
- """Shows reply interface to the user, as if they manually selected the bot's
2715
+ """Shows reply interface to the user, as if they manually selected the bot's
2606
2716
  message and tapped 'Reply'."""
2607
2717
 
2608
2718
  input_field_placeholder: Option[str] = Nothing
2609
- """Optional. The placeholder to be shown in the input field when the reply is
2719
+ """Optional. The placeholder to be shown in the input field when the reply is
2610
2720
  active; 1-64 characters."""
2611
2721
 
2612
2722
  selective: Option[bool] = Nothing
2613
- """Optional. Use this parameter if you want to force reply from specific users
2614
- only. Targets: 1) users that are @mentioned in the text of the Message object;
2615
- 2) if the bot's message is a reply to a message in the same chat and forum topic,
2723
+ """Optional. Use this parameter if you want to force reply from specific users
2724
+ only. Targets: 1) users that are @mentioned in the text of the Message object;
2725
+ 2) if the bot's message is a reply to a message in the same chat and forum topic,
2616
2726
  sender of the original message."""
2617
2727
 
2618
2728
 
@@ -2623,21 +2733,21 @@ class ChatPhoto(Model):
2623
2733
  """
2624
2734
 
2625
2735
  small_file_id: str
2626
- """File identifier of small (160x160) chat photo. This file_id can be used
2736
+ """File identifier of small (160x160) chat photo. This file_id can be used
2627
2737
  only for photo download and only for as long as the photo is not changed."""
2628
2738
 
2629
2739
  small_file_unique_id: str
2630
- """Unique file identifier of small (160x160) chat photo, which is supposed
2631
- to be the same over time and for different bots. Can't be used to download
2740
+ """Unique file identifier of small (160x160) chat photo, which is supposed
2741
+ to be the same over time and for different bots. Can't be used to download
2632
2742
  or reuse the file."""
2633
2743
 
2634
2744
  big_file_id: str
2635
- """File identifier of big (640x640) chat photo. This file_id can be used only
2745
+ """File identifier of big (640x640) chat photo. This file_id can be used only
2636
2746
  for photo download and only for as long as the photo is not changed."""
2637
2747
 
2638
2748
  big_file_unique_id: str
2639
- """Unique file identifier of big (640x640) chat photo, which is supposed to
2640
- be the same over time and for different bots. Can't be used to download or
2749
+ """Unique file identifier of big (640x640) chat photo, which is supposed to
2750
+ be the same over time and for different bots. Can't be used to download or
2641
2751
  reuse the file."""
2642
2752
 
2643
2753
 
@@ -2648,7 +2758,7 @@ class ChatInviteLink(Model):
2648
2758
  """
2649
2759
 
2650
2760
  invite_link: str
2651
- """The invite link. If the link was created by another chat administrator,
2761
+ """The invite link. If the link was created by another chat administrator,
2652
2762
  then the second part of the link will be replaced with `...`."""
2653
2763
 
2654
2764
  creator: "User"
@@ -2667,11 +2777,11 @@ class ChatInviteLink(Model):
2667
2777
  """Optional. Invite link name."""
2668
2778
 
2669
2779
  expire_date: Option[datetime] = Nothing
2670
- """Optional. Point in time (Unix timestamp) when the link will expire or has
2780
+ """Optional. Point in time (Unix timestamp) when the link will expire or has
2671
2781
  been expired."""
2672
2782
 
2673
2783
  member_limit: Option[int] = Nothing
2674
- """Optional. The maximum number of users that can be members of the chat simultaneously
2784
+ """Optional. The maximum number of users that can be members of the chat simultaneously
2675
2785
  after joining the chat via this invite link; 1-99999."""
2676
2786
 
2677
2787
  pending_join_request_count: Option[int] = Nothing
@@ -2688,8 +2798,8 @@ class ChatAdministratorRights(Model):
2688
2798
  """True, if the user's presence in the chat is hidden."""
2689
2799
 
2690
2800
  can_manage_chat: bool
2691
- """True, if the administrator can access the chat event log, get boost list,
2692
- see hidden supergroup and channel members, report spam messages and ignore
2801
+ """True, if the administrator can access the chat event log, get boost list,
2802
+ see hidden supergroup and channel members, report spam messages and ignore
2693
2803
  slow mode. Implied by any other administrator privilege."""
2694
2804
 
2695
2805
  can_delete_messages: bool
@@ -2699,12 +2809,12 @@ class ChatAdministratorRights(Model):
2699
2809
  """True, if the administrator can manage video chats."""
2700
2810
 
2701
2811
  can_restrict_members: bool
2702
- """True, if the administrator can restrict, ban or unban chat members, or access
2812
+ """True, if the administrator can restrict, ban or unban chat members, or access
2703
2813
  supergroup statistics."""
2704
2814
 
2705
2815
  can_promote_members: bool
2706
- """True, if the administrator can add new administrators with a subset of their
2707
- own privileges or demote administrators that they have promoted, directly
2816
+ """True, if the administrator can add new administrators with a subset of their
2817
+ own privileges or demote administrators that they have promoted, directly
2708
2818
  or indirectly (promoted by administrators that were appointed by the user)."""
2709
2819
 
2710
2820
  can_change_info: bool
@@ -2717,26 +2827,26 @@ class ChatAdministratorRights(Model):
2717
2827
  """True, if the administrator can post stories to the chat."""
2718
2828
 
2719
2829
  can_edit_stories: bool
2720
- """True, if the administrator can edit stories posted by other users, post
2830
+ """True, if the administrator can edit stories posted by other users, post
2721
2831
  stories to the chat page, pin chat stories, and access the chat's story archive."""
2722
2832
 
2723
2833
  can_delete_stories: bool
2724
2834
  """True, if the administrator can delete stories posted by other users."""
2725
2835
 
2726
2836
  can_post_messages: Option[bool] = Nothing
2727
- """Optional. True, if the administrator can post messages in the channel,
2837
+ """Optional. True, if the administrator can post messages in the channel,
2728
2838
  or access channel statistics; for channels only."""
2729
2839
 
2730
2840
  can_edit_messages: Option[bool] = Nothing
2731
- """Optional. True, if the administrator can edit messages of other users and
2841
+ """Optional. True, if the administrator can edit messages of other users and
2732
2842
  can pin messages; for channels only."""
2733
2843
 
2734
2844
  can_pin_messages: Option[bool] = Nothing
2735
- """Optional. True, if the user is allowed to pin messages; for groups and supergroups
2845
+ """Optional. True, if the user is allowed to pin messages; for groups and supergroups
2736
2846
  only."""
2737
2847
 
2738
2848
  can_manage_topics: Option[bool] = Nothing
2739
- """Optional. True, if the user is allowed to create, rename, close, and reopen
2849
+ """Optional. True, if the user is allowed to create, rename, close, and reopen
2740
2850
  forum topics; for supergroups only."""
2741
2851
 
2742
2852
 
@@ -2776,11 +2886,11 @@ class ChatMemberUpdated(Model):
2776
2886
  """New information about the chat member."""
2777
2887
 
2778
2888
  invite_link: Option["ChatInviteLink"] = Nothing
2779
- """Optional. Chat invite link, which was used by the user to join the chat; for
2889
+ """Optional. Chat invite link, which was used by the user to join the chat; for
2780
2890
  joining by invite link events only."""
2781
2891
 
2782
2892
  via_join_request: Option[bool] = Nothing
2783
- """Optional. True, if the user joined the chat after sending a direct join request
2893
+ """Optional. True, if the user joined the chat after sending a direct join request
2784
2894
  without using an invite link and being approved by an administrator."""
2785
2895
 
2786
2896
  via_chat_folder_invite_link: Option[bool] = Nothing
@@ -2831,8 +2941,8 @@ class ChatMemberAdministrator(ChatMember):
2831
2941
  """True, if the user's presence in the chat is hidden."""
2832
2942
 
2833
2943
  can_manage_chat: bool
2834
- """True, if the administrator can access the chat event log, get boost list,
2835
- see hidden supergroup and channel members, report spam messages and ignore
2944
+ """True, if the administrator can access the chat event log, get boost list,
2945
+ see hidden supergroup and channel members, report spam messages and ignore
2836
2946
  slow mode. Implied by any other administrator privilege."""
2837
2947
 
2838
2948
  can_delete_messages: bool
@@ -2842,12 +2952,12 @@ class ChatMemberAdministrator(ChatMember):
2842
2952
  """True, if the administrator can manage video chats."""
2843
2953
 
2844
2954
  can_restrict_members: bool
2845
- """True, if the administrator can restrict, ban or unban chat members, or access
2955
+ """True, if the administrator can restrict, ban or unban chat members, or access
2846
2956
  supergroup statistics."""
2847
2957
 
2848
2958
  can_promote_members: bool
2849
- """True, if the administrator can add new administrators with a subset of their
2850
- own privileges or demote administrators that they have promoted, directly
2959
+ """True, if the administrator can add new administrators with a subset of their
2960
+ own privileges or demote administrators that they have promoted, directly
2851
2961
  or indirectly (promoted by administrators that were appointed by the user)."""
2852
2962
 
2853
2963
  can_change_info: bool
@@ -2860,26 +2970,26 @@ class ChatMemberAdministrator(ChatMember):
2860
2970
  """True, if the administrator can post stories to the chat."""
2861
2971
 
2862
2972
  can_edit_stories: bool
2863
- """True, if the administrator can edit stories posted by other users, post
2973
+ """True, if the administrator can edit stories posted by other users, post
2864
2974
  stories to the chat page, pin chat stories, and access the chat's story archive."""
2865
2975
 
2866
2976
  can_delete_stories: bool
2867
2977
  """True, if the administrator can delete stories posted by other users."""
2868
2978
 
2869
2979
  can_post_messages: Option[bool] = Nothing
2870
- """Optional. True, if the administrator can post messages in the channel,
2980
+ """Optional. True, if the administrator can post messages in the channel,
2871
2981
  or access channel statistics; for channels only."""
2872
2982
 
2873
2983
  can_edit_messages: Option[bool] = Nothing
2874
- """Optional. True, if the administrator can edit messages of other users and
2984
+ """Optional. True, if the administrator can edit messages of other users and
2875
2985
  can pin messages; for channels only."""
2876
2986
 
2877
2987
  can_pin_messages: Option[bool] = Nothing
2878
- """Optional. True, if the user is allowed to pin messages; for groups and supergroups
2988
+ """Optional. True, if the user is allowed to pin messages; for groups and supergroups
2879
2989
  only."""
2880
2990
 
2881
2991
  can_manage_topics: Option[bool] = Nothing
2882
- """Optional. True, if the user is allowed to create, rename, close, and reopen
2992
+ """Optional. True, if the user is allowed to create, rename, close, and reopen
2883
2993
  forum topics; for supergroups only."""
2884
2994
 
2885
2995
  custom_title: Option[str] = Nothing
@@ -2915,7 +3025,7 @@ class ChatMemberRestricted(ChatMember):
2915
3025
  """True, if the user is a member of the chat at the moment of the request."""
2916
3026
 
2917
3027
  can_send_messages: bool
2918
- """True, if the user is allowed to send text messages, contacts, giveaways,
3028
+ """True, if the user is allowed to send text messages, contacts, giveaways,
2919
3029
  giveaway winners, invoices, locations and venues."""
2920
3030
 
2921
3031
  can_send_audios: bool
@@ -2940,7 +3050,7 @@ class ChatMemberRestricted(ChatMember):
2940
3050
  """True, if the user is allowed to send polls."""
2941
3051
 
2942
3052
  can_send_other_messages: bool
2943
- """True, if the user is allowed to send animations, games, stickers and use
3053
+ """True, if the user is allowed to send animations, games, stickers and use
2944
3054
  inline bots."""
2945
3055
 
2946
3056
  can_add_web_page_previews: bool
@@ -2959,7 +3069,7 @@ class ChatMemberRestricted(ChatMember):
2959
3069
  """True, if the user is allowed to create forum topics."""
2960
3070
 
2961
3071
  until_date: datetime
2962
- """Date when restrictions will be lifted for this user; Unix time. If 0, then
3072
+ """Date when restrictions will be lifted for this user; Unix time. If 0, then
2963
3073
  the user is restricted forever."""
2964
3074
 
2965
3075
 
@@ -2989,7 +3099,7 @@ class ChatMemberBanned(ChatMember):
2989
3099
  """Information about the user."""
2990
3100
 
2991
3101
  until_date: datetime
2992
- """Date when restrictions will be lifted for this user; Unix time. If 0, then
3102
+ """Date when restrictions will be lifted for this user; Unix time. If 0, then
2993
3103
  the user is banned forever."""
2994
3104
 
2995
3105
 
@@ -3006,12 +3116,12 @@ class ChatJoinRequest(Model):
3006
3116
  """User that sent the join request."""
3007
3117
 
3008
3118
  user_chat_id: int
3009
- """Identifier of a private chat with the user who sent the join request. This
3010
- number may have more than 32 significant bits and some programming languages
3011
- may have difficulty/silent defects in interpreting it. But it has at most
3012
- 52 significant bits, so a 64-bit integer or double-precision float type
3013
- are safe for storing this identifier. The bot can use this identifier for
3014
- 5 minutes to send messages until the join request is processed, assuming
3119
+ """Identifier of a private chat with the user who sent the join request. This
3120
+ number may have more than 32 significant bits and some programming languages
3121
+ may have difficulty/silent defects in interpreting it. But it has at most
3122
+ 52 significant bits, so a 64-bit integer or double-precision float type
3123
+ are safe for storing this identifier. The bot can use this identifier for
3124
+ 5 minutes to send messages until the join request is processed, assuming
3015
3125
  no other administrator contacted the user."""
3016
3126
 
3017
3127
  date: datetime
@@ -3037,7 +3147,7 @@ class ChatPermissions(Model):
3037
3147
  """
3038
3148
 
3039
3149
  can_send_messages: Option[bool] = Nothing
3040
- """Optional. True, if the user is allowed to send text messages, contacts,
3150
+ """Optional. True, if the user is allowed to send text messages, contacts,
3041
3151
  giveaways, giveaway winners, invoices, locations and venues."""
3042
3152
 
3043
3153
  can_send_audios: Option[bool] = Nothing
@@ -3062,25 +3172,25 @@ class ChatPermissions(Model):
3062
3172
  """Optional. True, if the user is allowed to send polls."""
3063
3173
 
3064
3174
  can_send_other_messages: Option[bool] = Nothing
3065
- """Optional. True, if the user is allowed to send animations, games, stickers
3175
+ """Optional. True, if the user is allowed to send animations, games, stickers
3066
3176
  and use inline bots."""
3067
3177
 
3068
3178
  can_add_web_page_previews: Option[bool] = Nothing
3069
3179
  """Optional. True, if the user is allowed to add web page previews to their messages."""
3070
3180
 
3071
3181
  can_change_info: Option[bool] = Nothing
3072
- """Optional. True, if the user is allowed to change the chat title, photo and
3182
+ """Optional. True, if the user is allowed to change the chat title, photo and
3073
3183
  other settings. Ignored in public supergroups."""
3074
3184
 
3075
3185
  can_invite_users: Option[bool] = Nothing
3076
3186
  """Optional. True, if the user is allowed to invite new users to the chat."""
3077
3187
 
3078
3188
  can_pin_messages: Option[bool] = Nothing
3079
- """Optional. True, if the user is allowed to pin messages. Ignored in public
3189
+ """Optional. True, if the user is allowed to pin messages. Ignored in public
3080
3190
  supergroups."""
3081
3191
 
3082
3192
  can_manage_topics: Option[bool] = Nothing
3083
- """Optional. True, if the user is allowed to create forum topics. If omitted
3193
+ """Optional. True, if the user is allowed to create forum topics. If omitted
3084
3194
  defaults to the value of can_pin_messages."""
3085
3195
 
3086
3196
 
@@ -3111,9 +3221,7 @@ class Birthdate(Model):
3111
3221
  """Optional. Contains the user's age, if the user has a birth year specified."""
3112
3222
 
3113
3223
  return self.year.map(
3114
- lambda year: (
3115
- (datetime.now() - datetime(year, self.month, self.day)) // 365
3116
- ).days
3224
+ lambda year: ((datetime.now() - datetime(year, self.month, self.day)) // 365).days
3117
3225
  )
3118
3226
 
3119
3227
 
@@ -3153,11 +3261,11 @@ class BusinessOpeningHoursInterval(Model):
3153
3261
  """
3154
3262
 
3155
3263
  opening_minute: int
3156
- """The minute's sequence number in a week, starting on Monday, marking the
3264
+ """The minute's sequence number in a week, starting on Monday, marking the
3157
3265
  start of the time interval during which the business is open; 0 - 7 * 24 * 60."""
3158
3266
 
3159
3267
  closing_minute: int
3160
- """The minute's sequence number in a week, starting on Monday, marking the
3268
+ """The minute's sequence number in a week, starting on Monday, marking the
3161
3269
  end of the time interval during which the business is open; 0 - 8 * 24 * 60."""
3162
3270
 
3163
3271
 
@@ -3197,11 +3305,11 @@ class ReactionTypeEmoji(ReactionType):
3197
3305
  """Type of the reaction, always `emoji`."""
3198
3306
 
3199
3307
  emoji: ReactionEmoji
3200
- """Reaction emoji. Currently, it can be one of `👍`, `👎`, `❤`, `🔥`, `🥰`, `👏`,
3201
- `😁`, `🤔`, `🤯`, `😱`, `🤬`, `😢`, `🎉`, `🤩`, `🤮`, `💩`, `🙏`, `👌`, `🕊`, `🤡`, `🥱`,
3202
- `🥴`, `😍`, `🐳`, `❤‍🔥`, `🌚`, `🌭`, `💯`, `🤣`, `⚡`, `🍌`, `🏆`, `💔`, `🤨`, `😐`, `🍓`,
3203
- `🍾`, `💋`, `🖕`, `😈`, `😴`, `😭`, `🤓`, `👻`, `👨‍💻`, `👀`, `🎃`, `🙈`, `😇`, `😨`, `🤝`,
3204
- `✍`, `🤗`, `🫡`, `🎅`, `🎄`, `☃`, `💅`, `🤪`, `🗿`, `🆒`, `💘`, `🙉`, `🦄`, `😘`, `💊`,
3308
+ """Reaction emoji. Currently, it can be one of `👍`, `👎`, `❤`, `🔥`, `🥰`, `👏`,
3309
+ `😁`, `🤔`, `🤯`, `😱`, `🤬`, `😢`, `🎉`, `🤩`, `🤮`, `💩`, `🙏`, `👌`, `🕊`, `🤡`, `🥱`,
3310
+ `🥴`, `😍`, `🐳`, `❤‍🔥`, `🌚`, `🌭`, `💯`, `🤣`, `⚡`, `🍌`, `🏆`, `💔`, `🤨`, `😐`, `🍓`,
3311
+ `🍾`, `💋`, `🖕`, `😈`, `😴`, `😭`, `🤓`, `👻`, `👨‍💻`, `👀`, `🎃`, `🙈`, `😇`, `😨`, `🤝`,
3312
+ `✍`, `🤗`, `🫡`, `🎅`, `🎄`, `☃`, `💅`, `🤪`, `🗿`, `🆒`, `💘`, `🙉`, `🦄`, `😘`, `💊`,
3205
3313
  `🙊`, `😎`, `👾`, `🤷‍♂`, `🤷`, `🤷‍♀`, `😡`."""
3206
3314
 
3207
3315
 
@@ -3256,7 +3364,7 @@ class MessageReactionUpdated(Model):
3256
3364
  """Optional. The user that changed the reaction, if the user isn't anonymous."""
3257
3365
 
3258
3366
  actor_chat: Option["Chat"] = Nothing
3259
- """Optional. The chat on behalf of which the reaction was changed, if the user
3367
+ """Optional. The chat on behalf of which the reaction was changed, if the user
3260
3368
  is anonymous."""
3261
3369
 
3262
3370
 
@@ -3305,7 +3413,7 @@ class BotCommand(Model):
3305
3413
  """
3306
3414
 
3307
3415
  command: str
3308
- """Text of the command; 1-32 characters. Can contain only lowercase English
3416
+ """Text of the command; 1-32 characters. Can contain only lowercase English
3309
3417
  letters, digits and underscores."""
3310
3418
 
3311
3419
  description: str
@@ -3362,7 +3470,7 @@ class BotCommandScopeChat(BotCommandScope):
3362
3470
  """Scope type, must be chat."""
3363
3471
 
3364
3472
  chat_id: Variative[int, str]
3365
- """Unique identifier for the target chat or username of the target supergroup
3473
+ """Unique identifier for the target chat or username of the target supergroup
3366
3474
  (in the format @supergroupusername)."""
3367
3475
 
3368
3476
 
@@ -3376,7 +3484,7 @@ class BotCommandScopeChatAdministrators(BotCommandScope):
3376
3484
  """Scope type, must be chat_administrators."""
3377
3485
 
3378
3486
  chat_id: Variative[int, str]
3379
- """Unique identifier for the target chat or username of the target supergroup
3487
+ """Unique identifier for the target chat or username of the target supergroup
3380
3488
  (in the format @supergroupusername)."""
3381
3489
 
3382
3490
 
@@ -3390,7 +3498,7 @@ class BotCommandScopeChatMember(BotCommandScope):
3390
3498
  """Scope type, must be chat_member."""
3391
3499
 
3392
3500
  chat_id: Variative[int, str]
3393
- """Unique identifier for the target chat or username of the target supergroup
3501
+ """Unique identifier for the target chat or username of the target supergroup
3394
3502
  (in the format @supergroupusername)."""
3395
3503
 
3396
3504
  user_id: int
@@ -3450,9 +3558,11 @@ class MenuButtonWebApp(MenuButton):
3450
3558
  """Text on the button."""
3451
3559
 
3452
3560
  web_app: "WebAppInfo"
3453
- """Description of the Web App that will be launched when the user presses the
3454
- button. The Web App will be able to send an arbitrary message on behalf of
3455
- the user using the method answerWebAppQuery."""
3561
+ """Description of the Web App that will be launched when the user presses the
3562
+ button. The Web App will be able to send an arbitrary message on behalf of
3563
+ the user using the method answerWebAppQuery. Alternatively, a t.me link
3564
+ to a Web App of the bot can be specified in the object instead of the Web App's
3565
+ URL, in which case the Web App will be opened as if the user pressed the link."""
3456
3566
 
3457
3567
 
3458
3568
  class MenuButtonDefault(MenuButton):
@@ -3501,14 +3611,14 @@ class ChatBoostSourceGiveaway(ChatBoostSource):
3501
3611
  """Source of the boost, always `giveaway`."""
3502
3612
 
3503
3613
  giveaway_message_id: int
3504
- """Identifier of a message in the chat with the giveaway; the message could
3614
+ """Identifier of a message in the chat with the giveaway; the message could
3505
3615
  have been deleted already. May be 0 if the message isn't sent yet."""
3506
3616
 
3507
3617
  user: Option["User"] = Nothing
3508
3618
  """Optional. User that won the prize in the giveaway if any."""
3509
3619
 
3510
3620
  is_unclaimed: Option[bool] = Nothing
3511
- """Optional. True, if the giveaway was completed, but there was no user to win
3621
+ """Optional. True, if the giveaway was completed, but there was no user to win
3512
3622
  the prize."""
3513
3623
 
3514
3624
 
@@ -3525,12 +3635,10 @@ class ChatBoost(Model):
3525
3635
  """Point in time (Unix timestamp) when the chat was boosted."""
3526
3636
 
3527
3637
  expiration_date: datetime
3528
- """Point in time (Unix timestamp) when the boost will automatically expire,
3638
+ """Point in time (Unix timestamp) when the boost will automatically expire,
3529
3639
  unless the booster's Telegram Premium subscription is prolonged."""
3530
3640
 
3531
- source: Variative[
3532
- "ChatBoostSourcePremium", "ChatBoostSourceGiftCode", "ChatBoostSourceGiveaway"
3533
- ]
3641
+ source: Variative["ChatBoostSourcePremium", "ChatBoostSourceGiftCode", "ChatBoostSourceGiveaway"]
3534
3642
  """Source of the added boost."""
3535
3643
 
3536
3644
 
@@ -3562,9 +3670,7 @@ class ChatBoostRemoved(Model):
3562
3670
  remove_date: datetime
3563
3671
  """Point in time (Unix timestamp) when the boost was removed."""
3564
3672
 
3565
- source: Variative[
3566
- "ChatBoostSourcePremium", "ChatBoostSourceGiftCode", "ChatBoostSourceGiveaway"
3567
- ]
3673
+ source: Variative["ChatBoostSourcePremium", "ChatBoostSourceGiftCode", "ChatBoostSourceGiveaway"]
3568
3674
  """Source of the removed boost."""
3569
3675
 
3570
3676
 
@@ -3591,17 +3697,17 @@ class BusinessConnection(Model):
3591
3697
  """Business account user that created the business connection."""
3592
3698
 
3593
3699
  user_chat_id: int
3594
- """Identifier of a private chat with the user who created the business connection.
3595
- This number may have more than 32 significant bits and some programming
3596
- languages may have difficulty/silent defects in interpreting it. But
3597
- it has at most 52 significant bits, so a 64-bit integer or double-precision
3700
+ """Identifier of a private chat with the user who created the business connection.
3701
+ This number may have more than 32 significant bits and some programming
3702
+ languages may have difficulty/silent defects in interpreting it. But
3703
+ it has at most 52 significant bits, so a 64-bit integer or double-precision
3598
3704
  float type are safe for storing this identifier."""
3599
3705
 
3600
3706
  date: datetime
3601
3707
  """Date the connection was established in Unix time."""
3602
3708
 
3603
3709
  can_reply: bool
3604
- """True, if the bot can act on behalf of the business account in chats that were
3710
+ """True, if the bot can act on behalf of the business account in chats that were
3605
3711
  active in the last 24 hours."""
3606
3712
 
3607
3713
  is_enabled: bool
@@ -3618,7 +3724,7 @@ class BusinessMessagesDeleted(Model):
3618
3724
  """Unique identifier of the business connection."""
3619
3725
 
3620
3726
  chat: "Chat"
3621
- """Information about a chat in the business account. The bot may not have access
3727
+ """Information about a chat in the business account. The bot may not have access
3622
3728
  to the chat or the corresponding user."""
3623
3729
 
3624
3730
  message_ids: list[int]
@@ -3632,14 +3738,14 @@ class ResponseParameters(Model):
3632
3738
  """
3633
3739
 
3634
3740
  migrate_to_chat_id: Option[int] = Nothing
3635
- """Optional. The group has been migrated to a supergroup with the specified
3636
- identifier. This number may have more than 32 significant bits and some
3637
- programming languages may have difficulty/silent defects in interpreting
3638
- it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
3741
+ """Optional. The group has been migrated to a supergroup with the specified
3742
+ identifier. This number may have more than 32 significant bits and some
3743
+ programming languages may have difficulty/silent defects in interpreting
3744
+ it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
3639
3745
  float type are safe for storing this identifier."""
3640
3746
 
3641
3747
  retry_after: Option[int] = Nothing
3642
- """Optional. In case of exceeding flood control, the number of seconds left
3748
+ """Optional. In case of exceeding flood control, the number of seconds left
3643
3749
  to wait before the request can be repeated."""
3644
3750
 
3645
3751
 
@@ -3653,23 +3759,26 @@ class InputMediaPhoto(InputMedia):
3653
3759
  """Type of the result, must be photo."""
3654
3760
 
3655
3761
  media: Variative["InputFile", str]
3656
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3657
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3658
- or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3762
+ """File to send. Pass a file_id to send a file that exists on the Telegram servers
3763
+ (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3764
+ or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3659
3765
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3660
3766
 
3661
3767
  caption: Option[str] = Nothing
3662
- """Optional. Caption of the photo to be sent, 0-1024 characters after entities
3768
+ """Optional. Caption of the photo to be sent, 0-1024 characters after entities
3663
3769
  parsing."""
3664
3770
 
3665
3771
  parse_mode: Option[str] = Nothing
3666
- """Optional. Mode for parsing entities in the photo caption. See formatting
3772
+ """Optional. Mode for parsing entities in the photo caption. See formatting
3667
3773
  options for more details."""
3668
3774
 
3669
3775
  caption_entities: Option[list["MessageEntity"]] = Nothing
3670
- """Optional. List of special entities that appear in the caption, which can
3776
+ """Optional. List of special entities that appear in the caption, which can
3671
3777
  be specified instead of parse_mode."""
3672
3778
 
3779
+ show_caption_above_media: Option[bool] = Nothing
3780
+ """Optional. Pass True, if the caption must be shown above the message media."""
3781
+
3673
3782
  has_spoiler: Option[bool] = Nothing
3674
3783
  """Optional. Pass True if the photo needs to be covered with a spoiler animation."""
3675
3784
 
@@ -3684,32 +3793,35 @@ class InputMediaVideo(InputMedia):
3684
3793
  """Type of the result, must be video."""
3685
3794
 
3686
3795
  media: Variative["InputFile", str]
3687
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3688
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3689
- or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3796
+ """File to send. Pass a file_id to send a file that exists on the Telegram servers
3797
+ (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3798
+ or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3690
3799
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3691
3800
 
3692
3801
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3693
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3694
- for the file is supported server-side. The thumbnail should be in JPEG format
3695
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3696
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3697
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3698
- if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3802
+ """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3803
+ for the file is supported server-side. The thumbnail should be in JPEG format
3804
+ and less than 200 kB in size. A thumbnail's width and height should not exceed
3805
+ 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3806
+ can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3807
+ if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3699
3808
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3700
3809
 
3701
3810
  caption: Option[str] = Nothing
3702
- """Optional. Caption of the video to be sent, 0-1024 characters after entities
3811
+ """Optional. Caption of the video to be sent, 0-1024 characters after entities
3703
3812
  parsing."""
3704
3813
 
3705
3814
  parse_mode: Option[str] = Nothing
3706
- """Optional. Mode for parsing entities in the video caption. See formatting
3815
+ """Optional. Mode for parsing entities in the video caption. See formatting
3707
3816
  options for more details."""
3708
3817
 
3709
3818
  caption_entities: Option[list["MessageEntity"]] = Nothing
3710
- """Optional. List of special entities that appear in the caption, which can
3819
+ """Optional. List of special entities that appear in the caption, which can
3711
3820
  be specified instead of parse_mode."""
3712
3821
 
3822
+ show_caption_above_media: Option[bool] = Nothing
3823
+ """Optional. Pass True, if the caption must be shown above the message media."""
3824
+
3713
3825
  width: Option[int] = Nothing
3714
3826
  """Optional. Video width."""
3715
3827
 
@@ -3736,32 +3848,35 @@ class InputMediaAnimation(InputMedia):
3736
3848
  """Type of the result, must be animation."""
3737
3849
 
3738
3850
  media: Variative["InputFile", str]
3739
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3740
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3741
- or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3851
+ """File to send. Pass a file_id to send a file that exists on the Telegram servers
3852
+ (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3853
+ or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3742
3854
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3743
3855
 
3744
3856
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3745
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3746
- for the file is supported server-side. The thumbnail should be in JPEG format
3747
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3748
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3749
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3750
- if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3857
+ """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3858
+ for the file is supported server-side. The thumbnail should be in JPEG format
3859
+ and less than 200 kB in size. A thumbnail's width and height should not exceed
3860
+ 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3861
+ can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3862
+ if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3751
3863
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3752
3864
 
3753
3865
  caption: Option[str] = Nothing
3754
- """Optional. Caption of the animation to be sent, 0-1024 characters after
3866
+ """Optional. Caption of the animation to be sent, 0-1024 characters after
3755
3867
  entities parsing."""
3756
3868
 
3757
3869
  parse_mode: Option[str] = Nothing
3758
- """Optional. Mode for parsing entities in the animation caption. See formatting
3870
+ """Optional. Mode for parsing entities in the animation caption. See formatting
3759
3871
  options for more details."""
3760
3872
 
3761
3873
  caption_entities: Option[list["MessageEntity"]] = Nothing
3762
- """Optional. List of special entities that appear in the caption, which can
3874
+ """Optional. List of special entities that appear in the caption, which can
3763
3875
  be specified instead of parse_mode."""
3764
3876
 
3877
+ show_caption_above_media: Option[bool] = Nothing
3878
+ """Optional. Pass True, if the caption must be shown above the message media."""
3879
+
3765
3880
  width: Option[int] = Nothing
3766
3881
  """Optional. Animation width."""
3767
3882
 
@@ -3785,30 +3900,30 @@ class InputMediaAudio(InputMedia):
3785
3900
  """Type of the result, must be audio."""
3786
3901
 
3787
3902
  media: Variative["InputFile", str]
3788
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3789
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3790
- or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3903
+ """File to send. Pass a file_id to send a file that exists on the Telegram servers
3904
+ (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3905
+ or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3791
3906
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3792
3907
 
3793
3908
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3794
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3795
- for the file is supported server-side. The thumbnail should be in JPEG format
3796
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3797
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3798
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3799
- if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3909
+ """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3910
+ for the file is supported server-side. The thumbnail should be in JPEG format
3911
+ and less than 200 kB in size. A thumbnail's width and height should not exceed
3912
+ 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3913
+ can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3914
+ if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3800
3915
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3801
3916
 
3802
3917
  caption: Option[str] = Nothing
3803
- """Optional. Caption of the audio to be sent, 0-1024 characters after entities
3918
+ """Optional. Caption of the audio to be sent, 0-1024 characters after entities
3804
3919
  parsing."""
3805
3920
 
3806
3921
  parse_mode: Option[str] = Nothing
3807
- """Optional. Mode for parsing entities in the audio caption. See formatting
3922
+ """Optional. Mode for parsing entities in the audio caption. See formatting
3808
3923
  options for more details."""
3809
3924
 
3810
3925
  caption_entities: Option[list["MessageEntity"]] = Nothing
3811
- """Optional. List of special entities that appear in the caption, which can
3926
+ """Optional. List of special entities that appear in the caption, which can
3812
3927
  be specified instead of parse_mode."""
3813
3928
 
3814
3929
  duration: Option[int] = Nothing
@@ -3831,35 +3946,35 @@ class InputMediaDocument(InputMedia):
3831
3946
  """Type of the result, must be document."""
3832
3947
 
3833
3948
  media: Variative["InputFile", str]
3834
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3835
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3836
- or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3949
+ """File to send. Pass a file_id to send a file that exists on the Telegram servers
3950
+ (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3951
+ or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3837
3952
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3838
3953
 
3839
3954
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3840
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3841
- for the file is supported server-side. The thumbnail should be in JPEG format
3842
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3843
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3844
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3845
- if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3955
+ """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3956
+ for the file is supported server-side. The thumbnail should be in JPEG format
3957
+ and less than 200 kB in size. A thumbnail's width and height should not exceed
3958
+ 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3959
+ can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3960
+ if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
3846
3961
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3847
3962
 
3848
3963
  caption: Option[str] = Nothing
3849
- """Optional. Caption of the document to be sent, 0-1024 characters after entities
3964
+ """Optional. Caption of the document to be sent, 0-1024 characters after entities
3850
3965
  parsing."""
3851
3966
 
3852
3967
  parse_mode: Option[str] = Nothing
3853
- """Optional. Mode for parsing entities in the document caption. See formatting
3968
+ """Optional. Mode for parsing entities in the document caption. See formatting
3854
3969
  options for more details."""
3855
3970
 
3856
3971
  caption_entities: Option[list["MessageEntity"]] = Nothing
3857
- """Optional. List of special entities that appear in the caption, which can
3972
+ """Optional. List of special entities that appear in the caption, which can
3858
3973
  be specified instead of parse_mode."""
3859
3974
 
3860
3975
  disable_content_type_detection: Option[bool] = Nothing
3861
- """Optional. Disables automatic server-side content type detection for
3862
- files uploaded using multipart/form-data. Always True, if the document
3976
+ """Optional. Disables automatic server-side content type detection for
3977
+ files uploaded using multipart/form-data. Always True, if the document
3863
3978
  is sent as part of an album."""
3864
3979
 
3865
3980
 
@@ -3875,6 +3990,67 @@ class InputFile(typing.NamedTuple):
3875
3990
  data: bytes
3876
3991
  """Bytes of file."""
3877
3992
 
3993
+ @classmethod
3994
+ def from_file(cls, path: str | pathlib.Path) -> typing.Self:
3995
+ path = pathlib.Path(path)
3996
+ return cls(
3997
+ filename=path.name,
3998
+ data=path.read_bytes(),
3999
+ )
4000
+
4001
+
4002
+ class InputPaidMediaPhoto(InputPaidMedia):
4003
+ """Object `InputPaidMediaPhoto`, see the [documentation](https://core.telegram.org/bots/api#inputpaidmediaphoto).
4004
+
4005
+ The paid media to send is a photo.
4006
+ """
4007
+
4008
+ type: typing.Literal["photo"]
4009
+ """Type of the media, must be photo."""
4010
+
4011
+ media: Variative["InputFile", str]
4012
+ """File to send. Pass a file_id to send a file that exists on the Telegram servers
4013
+ (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
4014
+ or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
4015
+ under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
4016
+
4017
+
4018
+ class InputPaidMediaVideo(InputPaidMedia):
4019
+ """Object `InputPaidMediaVideo`, see the [documentation](https://core.telegram.org/bots/api#inputpaidmediavideo).
4020
+
4021
+ The paid media to send is a video.
4022
+ """
4023
+
4024
+ type: typing.Literal["video"]
4025
+ """Type of the media, must be video."""
4026
+
4027
+ media: Variative["InputFile", str]
4028
+ """File to send. Pass a file_id to send a file that exists on the Telegram servers
4029
+ (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
4030
+ or pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
4031
+ under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
4032
+
4033
+ thumbnail: Option[Variative["InputFile", str]] = Nothing
4034
+ """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
4035
+ for the file is supported server-side. The thumbnail should be in JPEG format
4036
+ and less than 200 kB in size. A thumbnail's width and height should not exceed
4037
+ 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
4038
+ can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
4039
+ if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
4040
+ More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
4041
+
4042
+ width: Option[int] = Nothing
4043
+ """Optional. Video width."""
4044
+
4045
+ height: Option[int] = Nothing
4046
+ """Optional. Video height."""
4047
+
4048
+ duration: Option[int] = Nothing
4049
+ """Optional. Video duration in seconds."""
4050
+
4051
+ supports_streaming: Option[bool] = Nothing
4052
+ """Optional. Pass True if the uploaded video is suitable for streaming."""
4053
+
3878
4054
 
3879
4055
  class Sticker(Model):
3880
4056
  """Object `Sticker`, see the [documentation](https://core.telegram.org/bots/api#sticker).
@@ -3886,12 +4062,12 @@ class Sticker(Model):
3886
4062
  """Identifier for this file, which can be used to download or reuse the file."""
3887
4063
 
3888
4064
  file_unique_id: str
3889
- """Unique identifier for this file, which is supposed to be the same over time
4065
+ """Unique identifier for this file, which is supposed to be the same over time
3890
4066
  and for different bots. Can't be used to download or reuse the file."""
3891
4067
 
3892
4068
  type: typing.Literal["regular", "mask", "custom_emoji"]
3893
- """Type of the sticker, currently one of `regular`, `mask`, `custom_emoji`.
3894
- The type of the sticker is independent from its format, which is determined
4069
+ """Type of the sticker, currently one of `regular`, `mask`, `custom_emoji`.
4070
+ The type of the sticker is independent from its format, which is determined
3895
4071
  by the fields is_animated and is_video."""
3896
4072
 
3897
4073
  width: int
@@ -3925,8 +4101,8 @@ class Sticker(Model):
3925
4101
  """Optional. For custom emoji stickers, unique identifier of the custom emoji."""
3926
4102
 
3927
4103
  needs_repainting: Option[bool] = Nothing
3928
- """Optional. True, if the sticker must be repainted to a text color in messages,
3929
- the color of the Telegram Premium badge in emoji status, white color on chat
4104
+ """Optional. True, if the sticker must be repainted to a text color in messages,
4105
+ the color of the Telegram Premium badge in emoji status, white color on chat
3930
4106
  photos, or another appropriate color in other places."""
3931
4107
 
3932
4108
  file_size: Option[int] = Nothing
@@ -3962,17 +4138,17 @@ class MaskPosition(Model):
3962
4138
  """
3963
4139
 
3964
4140
  point: str
3965
- """The part of the face relative to which the mask should be placed. One of `forehead`,
4141
+ """The part of the face relative to which the mask should be placed. One of `forehead`,
3966
4142
  `eyes`, `mouth`, or `chin`."""
3967
4143
 
3968
4144
  x_shift: float
3969
- """Shift by X-axis measured in widths of the mask scaled to the face size, from
3970
- left to right. For example, choosing -1.0 will place mask just to the left
4145
+ """Shift by X-axis measured in widths of the mask scaled to the face size, from
4146
+ left to right. For example, choosing -1.0 will place mask just to the left
3971
4147
  of the default mask position."""
3972
4148
 
3973
4149
  y_shift: float
3974
- """Shift by Y-axis measured in heights of the mask scaled to the face size, from
3975
- top to bottom. For example, 1.0 will place the mask just below the default
4150
+ """Shift by Y-axis measured in heights of the mask scaled to the face size, from
4151
+ top to bottom. For example, 1.0 will place the mask just below the default
3976
4152
  mask position."""
3977
4153
 
3978
4154
  scale: float
@@ -3986,26 +4162,26 @@ class InputSticker(Model):
3986
4162
  """
3987
4163
 
3988
4164
  sticker: Variative["InputFile", str]
3989
- """The added sticker. Pass a file_id as a String to send a file that already exists
3990
- on the Telegram servers, pass an HTTP URL as a String for Telegram to get a
3991
- file from the Internet, upload a new one using multipart/form-data, or
3992
- pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3993
- under <file_attach_name> name. Animated and video stickers can't be uploaded
4165
+ """The added sticker. Pass a file_id as a String to send a file that already exists
4166
+ on the Telegram servers, pass an HTTP URL as a String for Telegram to get a
4167
+ file from the Internet, upload a new one using multipart/form-data, or
4168
+ pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
4169
+ under <file_attach_name> name. Animated and video stickers can't be uploaded
3994
4170
  via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3995
4171
 
3996
4172
  format: str
3997
- """Format of the added sticker, must be one of `static` for a .WEBP or .PNG image,
4173
+ """Format of the added sticker, must be one of `static` for a .WEBP or .PNG image,
3998
4174
  `animated` for a .TGS animation, `video` for a WEBM video."""
3999
4175
 
4000
4176
  emoji_list: list[str]
4001
4177
  """List of 1-20 emoji associated with the sticker."""
4002
4178
 
4003
4179
  mask_position: Option["MaskPosition"] = Nothing
4004
- """Optional. Position where the mask should be placed on faces. For `mask`
4180
+ """Optional. Position where the mask should be placed on faces. For `mask`
4005
4181
  stickers only."""
4006
4182
 
4007
4183
  keywords: Option[list[str]] = Nothing
4008
- """Optional. List of 0-20 search keywords for the sticker with total length
4184
+ """Optional. List of 0-20 search keywords for the sticker with total length
4009
4185
  of up to 64 characters. For `regular` and `custom_emoji` stickers only."""
4010
4186
 
4011
4187
 
@@ -4028,10 +4204,10 @@ class InlineQuery(Model):
4028
4204
  """Offset of the results to be returned, can be controlled by the bot."""
4029
4205
 
4030
4206
  chat_type: Option[ChatType] = Nothing
4031
- """Optional. Type of the chat from which the inline query was sent. Can be either
4032
- `sender` for a private chat with the inline query sender, `private`, `group`,
4033
- `supergroup`, or `channel`. The chat type should be always known for requests
4034
- sent from official clients and most third-party clients, unless the request
4207
+ """Optional. Type of the chat from which the inline query was sent. Can be either
4208
+ `sender` for a private chat with the inline query sender, `private`, `group`,
4209
+ `supergroup`, or `channel`. The chat type should be always known for requests
4210
+ sent from official clients and most third-party clients, unless the request
4035
4211
  was sent from a secret chat."""
4036
4212
 
4037
4213
  location: Option["Location"] = Nothing
@@ -4048,20 +4224,20 @@ class InlineQueryResultsButton(Model):
4048
4224
  """Label text on the button."""
4049
4225
 
4050
4226
  web_app: Option["WebAppInfo"] = Nothing
4051
- """Optional. Description of the Web App that will be launched when the user
4052
- presses the button. The Web App will be able to switch back to the inline mode
4227
+ """Optional. Description of the Web App that will be launched when the user
4228
+ presses the button. The Web App will be able to switch back to the inline mode
4053
4229
  using the method switchInlineQuery inside the Web App."""
4054
4230
 
4055
4231
  start_parameter: Option[str] = Nothing
4056
- """Optional. Deep-linking parameter for the /start message sent to the bot
4057
- when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and
4058
- - are allowed. Example: An inline bot that sends YouTube videos can ask the
4059
- user to connect the bot to their YouTube account to adapt search results
4060
- accordingly. To do this, it displays a 'Connect your YouTube account' button
4061
- above the results, or even before showing any. The user presses the button,
4062
- switches to a private chat with the bot and, in doing so, passes a start parameter
4063
- that instructs the bot to return an OAuth link. Once done, the bot can offer
4064
- a switch_inline button so that the user can easily return to the chat where
4232
+ """Optional. Deep-linking parameter for the /start message sent to the bot
4233
+ when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and
4234
+ - are allowed. Example: An inline bot that sends YouTube videos can ask the
4235
+ user to connect the bot to their YouTube account to adapt search results
4236
+ accordingly. To do this, it displays a 'Connect your YouTube account' button
4237
+ above the results, or even before showing any. The user presses the button,
4238
+ switches to a private chat with the bot and, in doing so, passes a start parameter
4239
+ that instructs the bot to return an OAuth link. Once done, the bot can offer
4240
+ a switch_inline button so that the user can easily return to the chat where
4065
4241
  they wanted to use the bot's inline capabilities."""
4066
4242
 
4067
4243
 
@@ -4124,7 +4300,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
4124
4300
  """Unique identifier for this result, 1-64 bytes."""
4125
4301
 
4126
4302
  photo_url: str
4127
- """A valid URL of the photo. Photo must be in JPEG format. Photo size must not
4303
+ """A valid URL of the photo. Photo must be in JPEG format. Photo size must not
4128
4304
  exceed 5MB."""
4129
4305
 
4130
4306
  thumbnail_url: str
@@ -4143,17 +4319,20 @@ class InlineQueryResultPhoto(InlineQueryResult):
4143
4319
  """Optional. Short description of the result."""
4144
4320
 
4145
4321
  caption: Option[str] = Nothing
4146
- """Optional. Caption of the photo to be sent, 0-1024 characters after entities
4322
+ """Optional. Caption of the photo to be sent, 0-1024 characters after entities
4147
4323
  parsing."""
4148
4324
 
4149
4325
  parse_mode: Option[str] = Nothing
4150
- """Optional. Mode for parsing entities in the photo caption. See formatting
4326
+ """Optional. Mode for parsing entities in the photo caption. See formatting
4151
4327
  options for more details."""
4152
4328
 
4153
4329
  caption_entities: Option[list["MessageEntity"]] = Nothing
4154
- """Optional. List of special entities that appear in the caption, which can
4330
+ """Optional. List of special entities that appear in the caption, which can
4155
4331
  be specified instead of parse_mode."""
4156
4332
 
4333
+ show_caption_above_media: Option[bool] = Nothing
4334
+ """Optional. Pass True, if the caption must be shown above the message media."""
4335
+
4157
4336
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4158
4337
  """Optional. Inline keyboard attached to the message."""
4159
4338
 
@@ -4196,27 +4375,28 @@ class InlineQueryResultGif(InlineQueryResult):
4196
4375
  gif_duration: Option[int] = Nothing
4197
4376
  """Optional. Duration of the GIF in seconds."""
4198
4377
 
4199
- thumbnail_mime_type: Option[
4200
- typing.Literal["image/jpeg", "image/gif", "video/mp4"]
4201
- ] = Nothing
4202
- """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4378
+ thumbnail_mime_type: Option[typing.Literal["image/jpeg", "image/gif", "video/mp4"]] = Nothing
4379
+ """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4203
4380
  or `video/mp4`. Defaults to `image/jpeg`."""
4204
4381
 
4205
4382
  title: Option[str] = Nothing
4206
4383
  """Optional. Title for the result."""
4207
4384
 
4208
4385
  caption: Option[str] = Nothing
4209
- """Optional. Caption of the GIF file to be sent, 0-1024 characters after entities
4386
+ """Optional. Caption of the GIF file to be sent, 0-1024 characters after entities
4210
4387
  parsing."""
4211
4388
 
4212
4389
  parse_mode: Option[str] = Nothing
4213
- """Optional. Mode for parsing entities in the caption. See formatting options
4390
+ """Optional. Mode for parsing entities in the caption. See formatting options
4214
4391
  for more details."""
4215
4392
 
4216
4393
  caption_entities: Option[list["MessageEntity"]] = Nothing
4217
- """Optional. List of special entities that appear in the caption, which can
4394
+ """Optional. List of special entities that appear in the caption, which can
4218
4395
  be specified instead of parse_mode."""
4219
4396
 
4397
+ show_caption_above_media: Option[bool] = Nothing
4398
+ """Optional. Pass True, if the caption must be shown above the message media."""
4399
+
4220
4400
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4221
4401
  """Optional. Inline keyboard attached to the message."""
4222
4402
 
@@ -4259,27 +4439,28 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
4259
4439
  mpeg4_duration: Option[int] = Nothing
4260
4440
  """Optional. Video duration in seconds."""
4261
4441
 
4262
- thumbnail_mime_type: Option[
4263
- typing.Literal["image/jpeg", "image/gif", "video/mp4"]
4264
- ] = Nothing
4265
- """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4442
+ thumbnail_mime_type: Option[typing.Literal["image/jpeg", "image/gif", "video/mp4"]] = Nothing
4443
+ """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4266
4444
  or `video/mp4`. Defaults to `image/jpeg`."""
4267
4445
 
4268
4446
  title: Option[str] = Nothing
4269
4447
  """Optional. Title for the result."""
4270
4448
 
4271
4449
  caption: Option[str] = Nothing
4272
- """Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after
4450
+ """Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after
4273
4451
  entities parsing."""
4274
4452
 
4275
4453
  parse_mode: Option[str] = Nothing
4276
- """Optional. Mode for parsing entities in the caption. See formatting options
4454
+ """Optional. Mode for parsing entities in the caption. See formatting options
4277
4455
  for more details."""
4278
4456
 
4279
4457
  caption_entities: Option[list["MessageEntity"]] = Nothing
4280
- """Optional. List of special entities that appear in the caption, which can
4458
+ """Optional. List of special entities that appear in the caption, which can
4281
4459
  be specified instead of parse_mode."""
4282
4460
 
4461
+ show_caption_above_media: Option[bool] = Nothing
4462
+ """Optional. Pass True, if the caption must be shown above the message media."""
4463
+
4283
4464
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4284
4465
  """Optional. Inline keyboard attached to the message."""
4285
4466
 
@@ -4320,17 +4501,20 @@ class InlineQueryResultVideo(InlineQueryResult):
4320
4501
  """Title for the result."""
4321
4502
 
4322
4503
  caption: Option[str] = Nothing
4323
- """Optional. Caption of the video to be sent, 0-1024 characters after entities
4504
+ """Optional. Caption of the video to be sent, 0-1024 characters after entities
4324
4505
  parsing."""
4325
4506
 
4326
4507
  parse_mode: Option[str] = Nothing
4327
- """Optional. Mode for parsing entities in the video caption. See formatting
4508
+ """Optional. Mode for parsing entities in the video caption. See formatting
4328
4509
  options for more details."""
4329
4510
 
4330
4511
  caption_entities: Option[list["MessageEntity"]] = Nothing
4331
- """Optional. List of special entities that appear in the caption, which can
4512
+ """Optional. List of special entities that appear in the caption, which can
4332
4513
  be specified instead of parse_mode."""
4333
4514
 
4515
+ show_caption_above_media: Option[bool] = Nothing
4516
+ """Optional. Pass True, if the caption must be shown above the message media."""
4517
+
4334
4518
  video_width: Option[int] = Nothing
4335
4519
  """Optional. Video width."""
4336
4520
 
@@ -4355,8 +4539,8 @@ class InlineQueryResultVideo(InlineQueryResult):
4355
4539
  "InputInvoiceMessageContent",
4356
4540
  ]
4357
4541
  ] = Nothing
4358
- """Optional. Content of the message to be sent instead of the video. This field
4359
- is required if InlineQueryResultVideo is used to send an HTML-page as a
4542
+ """Optional. Content of the message to be sent instead of the video. This field
4543
+ is required if InlineQueryResultVideo is used to send an HTML-page as a
4360
4544
  result (e.g., a YouTube video)."""
4361
4545
 
4362
4546
 
@@ -4382,11 +4566,11 @@ class InlineQueryResultAudio(InlineQueryResult):
4382
4566
  """Optional. Caption, 0-1024 characters after entities parsing."""
4383
4567
 
4384
4568
  parse_mode: Option[str] = Nothing
4385
- """Optional. Mode for parsing entities in the audio caption. See formatting
4569
+ """Optional. Mode for parsing entities in the audio caption. See formatting
4386
4570
  options for more details."""
4387
4571
 
4388
4572
  caption_entities: Option[list["MessageEntity"]] = Nothing
4389
- """Optional. List of special entities that appear in the caption, which can
4573
+ """Optional. List of special entities that appear in the caption, which can
4390
4574
  be specified instead of parse_mode."""
4391
4575
 
4392
4576
  performer: Option[str] = Nothing
@@ -4432,11 +4616,11 @@ class InlineQueryResultVoice(InlineQueryResult):
4432
4616
  """Optional. Caption, 0-1024 characters after entities parsing."""
4433
4617
 
4434
4618
  parse_mode: Option[str] = Nothing
4435
- """Optional. Mode for parsing entities in the voice message caption. See formatting
4619
+ """Optional. Mode for parsing entities in the voice message caption. See formatting
4436
4620
  options for more details."""
4437
4621
 
4438
4622
  caption_entities: Option[list["MessageEntity"]] = Nothing
4439
- """Optional. List of special entities that appear in the caption, which can
4623
+ """Optional. List of special entities that appear in the caption, which can
4440
4624
  be specified instead of parse_mode."""
4441
4625
 
4442
4626
  voice_duration: Option[int] = Nothing
@@ -4479,15 +4663,15 @@ class InlineQueryResultDocument(InlineQueryResult):
4479
4663
  """MIME type of the content of the file, either `application/pdf` or `application/zip`."""
4480
4664
 
4481
4665
  caption: Option[str] = Nothing
4482
- """Optional. Caption of the document to be sent, 0-1024 characters after entities
4666
+ """Optional. Caption of the document to be sent, 0-1024 characters after entities
4483
4667
  parsing."""
4484
4668
 
4485
4669
  parse_mode: Option[str] = Nothing
4486
- """Optional. Mode for parsing entities in the document caption. See formatting
4670
+ """Optional. Mode for parsing entities in the document caption. See formatting
4487
4671
  options for more details."""
4488
4672
 
4489
4673
  caption_entities: Option[list["MessageEntity"]] = Nothing
4490
- """Optional. List of special entities that appear in the caption, which can
4674
+ """Optional. List of special entities that appear in the caption, which can
4491
4675
  be specified instead of parse_mode."""
4492
4676
 
4493
4677
  description: Option[str] = Nothing
@@ -4539,21 +4723,21 @@ class InlineQueryResultLocation(InlineQueryResult):
4539
4723
  """Location title."""
4540
4724
 
4541
4725
  horizontal_accuracy: Option[float] = Nothing
4542
- """Optional. The radius of uncertainty for the location, measured in meters;
4726
+ """Optional. The radius of uncertainty for the location, measured in meters;
4543
4727
  0-1500."""
4544
4728
 
4545
4729
  live_period: Option[int] = Nothing
4546
- """Optional. Period in seconds during which the location can be updated, should
4547
- be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited
4730
+ """Optional. Period in seconds during which the location can be updated, should
4731
+ be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited
4548
4732
  indefinitely."""
4549
4733
 
4550
4734
  heading: Option[int] = Nothing
4551
- """Optional. For live locations, a direction in which the user is moving, in
4735
+ """Optional. For live locations, a direction in which the user is moving, in
4552
4736
  degrees. Must be between 1 and 360 if specified."""
4553
4737
 
4554
4738
  proximity_alert_radius: Option[int] = Nothing
4555
- """Optional. For live locations, a maximum distance for proximity alerts
4556
- about approaching another chat member, in meters. Must be between 1 and
4739
+ """Optional. For live locations, a maximum distance for proximity alerts
4740
+ about approaching another chat member, in meters. Must be between 1 and
4557
4741
  100000 if specified."""
4558
4742
 
4559
4743
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -4608,7 +4792,7 @@ class InlineQueryResultVenue(InlineQueryResult):
4608
4792
  """Optional. Foursquare identifier of the venue if known."""
4609
4793
 
4610
4794
  foursquare_type: Option[str] = Nothing
4611
- """Optional. Foursquare type of the venue, if known. (For example, `arts_entertainment/default`,
4795
+ """Optional. Foursquare type of the venue, if known. (For example, `arts_entertainment/default`,
4612
4796
  `arts_entertainment/aquarium` or `food/icecream`.)."""
4613
4797
 
4614
4798
  google_place_id: Option[str] = Nothing
@@ -4663,7 +4847,7 @@ class InlineQueryResultContact(InlineQueryResult):
4663
4847
  """Optional. Contact's last name."""
4664
4848
 
4665
4849
  vcard: Option[str] = Nothing
4666
- """Optional. Additional data about the contact in the form of a vCard, 0-2048
4850
+ """Optional. Additional data about the contact in the form of a vCard, 0-2048
4667
4851
  bytes."""
4668
4852
 
4669
4853
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -4731,17 +4915,20 @@ class InlineQueryResultCachedPhoto(InlineQueryResult):
4731
4915
  """Optional. Short description of the result."""
4732
4916
 
4733
4917
  caption: Option[str] = Nothing
4734
- """Optional. Caption of the photo to be sent, 0-1024 characters after entities
4918
+ """Optional. Caption of the photo to be sent, 0-1024 characters after entities
4735
4919
  parsing."""
4736
4920
 
4737
4921
  parse_mode: Option[str] = Nothing
4738
- """Optional. Mode for parsing entities in the photo caption. See formatting
4922
+ """Optional. Mode for parsing entities in the photo caption. See formatting
4739
4923
  options for more details."""
4740
4924
 
4741
4925
  caption_entities: Option[list["MessageEntity"]] = Nothing
4742
- """Optional. List of special entities that appear in the caption, which can
4926
+ """Optional. List of special entities that appear in the caption, which can
4743
4927
  be specified instead of parse_mode."""
4744
4928
 
4929
+ show_caption_above_media: Option[bool] = Nothing
4930
+ """Optional. Pass True, if the caption must be shown above the message media."""
4931
+
4745
4932
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4746
4933
  """Optional. Inline keyboard attached to the message."""
4747
4934
 
@@ -4776,17 +4963,20 @@ class InlineQueryResultCachedGif(InlineQueryResult):
4776
4963
  """Optional. Title for the result."""
4777
4964
 
4778
4965
  caption: Option[str] = Nothing
4779
- """Optional. Caption of the GIF file to be sent, 0-1024 characters after entities
4966
+ """Optional. Caption of the GIF file to be sent, 0-1024 characters after entities
4780
4967
  parsing."""
4781
4968
 
4782
4969
  parse_mode: Option[str] = Nothing
4783
- """Optional. Mode for parsing entities in the caption. See formatting options
4970
+ """Optional. Mode for parsing entities in the caption. See formatting options
4784
4971
  for more details."""
4785
4972
 
4786
4973
  caption_entities: Option[list["MessageEntity"]] = Nothing
4787
- """Optional. List of special entities that appear in the caption, which can
4974
+ """Optional. List of special entities that appear in the caption, which can
4788
4975
  be specified instead of parse_mode."""
4789
4976
 
4977
+ show_caption_above_media: Option[bool] = Nothing
4978
+ """Optional. Pass True, if the caption must be shown above the message media."""
4979
+
4790
4980
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4791
4981
  """Optional. Inline keyboard attached to the message."""
4792
4982
 
@@ -4821,17 +5011,20 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
4821
5011
  """Optional. Title for the result."""
4822
5012
 
4823
5013
  caption: Option[str] = Nothing
4824
- """Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after
5014
+ """Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after
4825
5015
  entities parsing."""
4826
5016
 
4827
5017
  parse_mode: Option[str] = Nothing
4828
- """Optional. Mode for parsing entities in the caption. See formatting options
5018
+ """Optional. Mode for parsing entities in the caption. See formatting options
4829
5019
  for more details."""
4830
5020
 
4831
5021
  caption_entities: Option[list["MessageEntity"]] = Nothing
4832
- """Optional. List of special entities that appear in the caption, which can
5022
+ """Optional. List of special entities that appear in the caption, which can
4833
5023
  be specified instead of parse_mode."""
4834
5024
 
5025
+ show_caption_above_media: Option[bool] = Nothing
5026
+ """Optional. Pass True, if the caption must be shown above the message media."""
5027
+
4835
5028
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4836
5029
  """Optional. Inline keyboard attached to the message."""
4837
5030
 
@@ -4899,15 +5092,15 @@ class InlineQueryResultCachedDocument(InlineQueryResult):
4899
5092
  """Optional. Short description of the result."""
4900
5093
 
4901
5094
  caption: Option[str] = Nothing
4902
- """Optional. Caption of the document to be sent, 0-1024 characters after entities
5095
+ """Optional. Caption of the document to be sent, 0-1024 characters after entities
4903
5096
  parsing."""
4904
5097
 
4905
5098
  parse_mode: Option[str] = Nothing
4906
- """Optional. Mode for parsing entities in the document caption. See formatting
5099
+ """Optional. Mode for parsing entities in the document caption. See formatting
4907
5100
  options for more details."""
4908
5101
 
4909
5102
  caption_entities: Option[list["MessageEntity"]] = Nothing
4910
- """Optional. List of special entities that appear in the caption, which can
5103
+ """Optional. List of special entities that appear in the caption, which can
4911
5104
  be specified instead of parse_mode."""
4912
5105
 
4913
5106
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -4947,17 +5140,20 @@ class InlineQueryResultCachedVideo(InlineQueryResult):
4947
5140
  """Optional. Short description of the result."""
4948
5141
 
4949
5142
  caption: Option[str] = Nothing
4950
- """Optional. Caption of the video to be sent, 0-1024 characters after entities
5143
+ """Optional. Caption of the video to be sent, 0-1024 characters after entities
4951
5144
  parsing."""
4952
5145
 
4953
5146
  parse_mode: Option[str] = Nothing
4954
- """Optional. Mode for parsing entities in the video caption. See formatting
5147
+ """Optional. Mode for parsing entities in the video caption. See formatting
4955
5148
  options for more details."""
4956
5149
 
4957
5150
  caption_entities: Option[list["MessageEntity"]] = Nothing
4958
- """Optional. List of special entities that appear in the caption, which can
5151
+ """Optional. List of special entities that appear in the caption, which can
4959
5152
  be specified instead of parse_mode."""
4960
5153
 
5154
+ show_caption_above_media: Option[bool] = Nothing
5155
+ """Optional. Pass True, if the caption must be shown above the message media."""
5156
+
4961
5157
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4962
5158
  """Optional. Inline keyboard attached to the message."""
4963
5159
 
@@ -4995,11 +5191,11 @@ class InlineQueryResultCachedVoice(InlineQueryResult):
4995
5191
  """Optional. Caption, 0-1024 characters after entities parsing."""
4996
5192
 
4997
5193
  parse_mode: Option[str] = Nothing
4998
- """Optional. Mode for parsing entities in the voice message caption. See formatting
5194
+ """Optional. Mode for parsing entities in the voice message caption. See formatting
4999
5195
  options for more details."""
5000
5196
 
5001
5197
  caption_entities: Option[list["MessageEntity"]] = Nothing
5002
- """Optional. List of special entities that appear in the caption, which can
5198
+ """Optional. List of special entities that appear in the caption, which can
5003
5199
  be specified instead of parse_mode."""
5004
5200
 
5005
5201
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -5036,11 +5232,11 @@ class InlineQueryResultCachedAudio(InlineQueryResult):
5036
5232
  """Optional. Caption, 0-1024 characters after entities parsing."""
5037
5233
 
5038
5234
  parse_mode: Option[str] = Nothing
5039
- """Optional. Mode for parsing entities in the audio caption. See formatting
5235
+ """Optional. Mode for parsing entities in the audio caption. See formatting
5040
5236
  options for more details."""
5041
5237
 
5042
5238
  caption_entities: Option[list["MessageEntity"]] = Nothing
5043
- """Optional. List of special entities that appear in the caption, which can
5239
+ """Optional. List of special entities that appear in the caption, which can
5044
5240
  be specified instead of parse_mode."""
5045
5241
 
5046
5242
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -5068,11 +5264,11 @@ class InputTextMessageContent(InputMessageContent):
5068
5264
  """Text of the message to be sent, 1-4096 characters."""
5069
5265
 
5070
5266
  parse_mode: Option[str] = Nothing
5071
- """Optional. Mode for parsing entities in the message text. See formatting
5267
+ """Optional. Mode for parsing entities in the message text. See formatting
5072
5268
  options for more details."""
5073
5269
 
5074
5270
  entities: Option[list["MessageEntity"]] = Nothing
5075
- """Optional. List of special entities that appear in message text, which can
5271
+ """Optional. List of special entities that appear in message text, which can
5076
5272
  be specified instead of parse_mode."""
5077
5273
 
5078
5274
  link_preview_options: Option["LinkPreviewOptions"] = Nothing
@@ -5092,21 +5288,21 @@ class InputLocationMessageContent(InputMessageContent):
5092
5288
  """Longitude of the location in degrees."""
5093
5289
 
5094
5290
  horizontal_accuracy: Option[float] = Nothing
5095
- """Optional. The radius of uncertainty for the location, measured in meters;
5291
+ """Optional. The radius of uncertainty for the location, measured in meters;
5096
5292
  0-1500."""
5097
5293
 
5098
5294
  live_period: Option[int] = Nothing
5099
- """Optional. Period in seconds during which the location can be updated, should
5100
- be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited
5295
+ """Optional. Period in seconds during which the location can be updated, should
5296
+ be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited
5101
5297
  indefinitely."""
5102
5298
 
5103
5299
  heading: Option[int] = Nothing
5104
- """Optional. For live locations, a direction in which the user is moving, in
5300
+ """Optional. For live locations, a direction in which the user is moving, in
5105
5301
  degrees. Must be between 1 and 360 if specified."""
5106
5302
 
5107
5303
  proximity_alert_radius: Option[int] = Nothing
5108
- """Optional. For live locations, a maximum distance for proximity alerts
5109
- about approaching another chat member, in meters. Must be between 1 and
5304
+ """Optional. For live locations, a maximum distance for proximity alerts
5305
+ about approaching another chat member, in meters. Must be between 1 and
5110
5306
  100000 if specified."""
5111
5307
 
5112
5308
 
@@ -5132,7 +5328,7 @@ class InputVenueMessageContent(InputMessageContent):
5132
5328
  """Optional. Foursquare identifier of the venue, if known."""
5133
5329
 
5134
5330
  foursquare_type: Option[str] = Nothing
5135
- """Optional. Foursquare type of the venue, if known. (For example, `arts_entertainment/default`,
5331
+ """Optional. Foursquare type of the venue, if known. (For example, `arts_entertainment/default`,
5136
5332
  `arts_entertainment/aquarium` or `food/icecream`.)."""
5137
5333
 
5138
5334
  google_place_id: Option[str] = Nothing
@@ -5158,7 +5354,7 @@ class InputContactMessageContent(InputMessageContent):
5158
5354
  """Optional. Contact's last name."""
5159
5355
 
5160
5356
  vcard: Option[str] = Nothing
5161
- """Optional. Additional data about the contact in the form of a vCard, 0-2048
5357
+ """Optional. Additional data about the contact in the form of a vCard, 0-2048
5162
5358
  bytes."""
5163
5359
 
5164
5360
 
@@ -5175,39 +5371,43 @@ class InputInvoiceMessageContent(InputMessageContent):
5175
5371
  """Product description, 1-255 characters."""
5176
5372
 
5177
5373
  payload: str
5178
- """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to
5374
+ """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to
5179
5375
  the user, use for your internal processes."""
5180
5376
 
5181
- provider_token: str
5182
- """Payment provider token, obtained via @BotFather."""
5183
-
5184
- currency: str
5185
- """Three-letter ISO 4217 currency code, see more on currencies."""
5377
+ currency: Currency
5378
+ """Three-letter ISO 4217 currency code, see more on currencies. Pass `XTR`
5379
+ for payments in Telegram Stars."""
5186
5380
 
5187
5381
  prices: list["LabeledPrice"]
5188
- """Price breakdown, a JSON-serialized list of components (e.g. product price,
5189
- tax, discount, delivery cost, delivery tax, bonus, etc.)."""
5382
+ """Price breakdown, a JSON-serialized list of components (e.g. product price,
5383
+ tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain
5384
+ exactly one item for payments in Telegram Stars."""
5385
+
5386
+ provider_token: Option[str] = Nothing
5387
+ """Optional. Payment provider token, obtained via @BotFather. Pass an empty
5388
+ string for payments in Telegram Stars."""
5190
5389
 
5191
5390
  max_tip_amount: Option[int] = Nothing
5192
- """Optional. The maximum accepted amount for tips in the smallest units of
5193
- the currency (integer, not float/double). For example, for a maximum tip
5194
- of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json,
5195
- it shows the number of digits past the decimal point for each currency (2
5196
- for the majority of currencies). Defaults to 0."""
5391
+ """Optional. The maximum accepted amount for tips in the smallest units of
5392
+ the currency (integer, not float/double). For example, for a maximum tip
5393
+ of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json,
5394
+ it shows the number of digits past the decimal point for each currency (2
5395
+ for the majority of currencies). Defaults to 0. Not supported for payments
5396
+ in Telegram Stars."""
5197
5397
 
5198
5398
  suggested_tip_amounts: Option[list[int]] = Nothing
5199
- """Optional. A JSON-serialized array of suggested amounts of tip in the smallest
5200
- units of the currency (integer, not float/double). At most 4 suggested
5201
- tip amounts can be specified. The suggested tip amounts must be positive,
5399
+ """Optional. A JSON-serialized array of suggested amounts of tip in the smallest
5400
+ units of the currency (integer, not float/double). At most 4 suggested
5401
+ tip amounts can be specified. The suggested tip amounts must be positive,
5202
5402
  passed in a strictly increased order and must not exceed max_tip_amount."""
5203
5403
 
5204
5404
  provider_data: Option[str] = Nothing
5205
- """Optional. A JSON-serialized object for data about the invoice, which will
5206
- be shared with the payment provider. A detailed description of the required
5405
+ """Optional. A JSON-serialized object for data about the invoice, which will
5406
+ be shared with the payment provider. A detailed description of the required
5207
5407
  fields should be provided by the payment provider."""
5208
5408
 
5209
5409
  photo_url: Option[str] = Nothing
5210
- """Optional. URL of the product photo for the invoice. Can be a photo of the goods
5410
+ """Optional. URL of the product photo for the invoice. Can be a photo of the goods
5211
5411
  or a marketing image for a service."""
5212
5412
 
5213
5413
  photo_size: Option[int] = Nothing
@@ -5220,28 +5420,32 @@ class InputInvoiceMessageContent(InputMessageContent):
5220
5420
  """Optional. Photo height."""
5221
5421
 
5222
5422
  need_name: Option[bool] = Nothing
5223
- """Optional. Pass True if you require the user's full name to complete the order."""
5423
+ """Optional. Pass True if you require the user's full name to complete the order.
5424
+ Ignored for payments in Telegram Stars."""
5224
5425
 
5225
5426
  need_phone_number: Option[bool] = Nothing
5226
- """Optional. Pass True if you require the user's phone number to complete the
5227
- order."""
5427
+ """Optional. Pass True if you require the user's phone number to complete the
5428
+ order. Ignored for payments in Telegram Stars."""
5228
5429
 
5229
5430
  need_email: Option[bool] = Nothing
5230
- """Optional. Pass True if you require the user's email address to complete
5231
- the order."""
5431
+ """Optional. Pass True if you require the user's email address to complete
5432
+ the order. Ignored for payments in Telegram Stars."""
5232
5433
 
5233
5434
  need_shipping_address: Option[bool] = Nothing
5234
- """Optional. Pass True if you require the user's shipping address to complete
5235
- the order."""
5435
+ """Optional. Pass True if you require the user's shipping address to complete
5436
+ the order. Ignored for payments in Telegram Stars."""
5236
5437
 
5237
5438
  send_phone_number_to_provider: Option[bool] = Nothing
5238
- """Optional. Pass True if the user's phone number should be sent to provider."""
5439
+ """Optional. Pass True if the user's phone number should be sent to the provider.
5440
+ Ignored for payments in Telegram Stars."""
5239
5441
 
5240
5442
  send_email_to_provider: Option[bool] = Nothing
5241
- """Optional. Pass True if the user's email address should be sent to provider."""
5443
+ """Optional. Pass True if the user's email address should be sent to the provider.
5444
+ Ignored for payments in Telegram Stars."""
5242
5445
 
5243
5446
  is_flexible: Option[bool] = Nothing
5244
- """Optional. Pass True if the final price depends on the shipping method."""
5447
+ """Optional. Pass True if the final price depends on the shipping method. Ignored
5448
+ for payments in Telegram Stars."""
5245
5449
 
5246
5450
 
5247
5451
  class ChosenInlineResult(Model):
@@ -5264,8 +5468,8 @@ class ChosenInlineResult(Model):
5264
5468
  """Optional. Sender location, only for bots that require user location."""
5265
5469
 
5266
5470
  inline_message_id: Option[str] = Nothing
5267
- """Optional. Identifier of the sent inline message. Available only if there
5268
- is an inline keyboard attached to the message. Will be also received in callback
5471
+ """Optional. Identifier of the sent inline message. Available only if there
5472
+ is an inline keyboard attached to the message. Will be also received in callback
5269
5473
  queries and can be used to edit the message."""
5270
5474
 
5271
5475
 
@@ -5276,7 +5480,7 @@ class SentWebAppMessage(Model):
5276
5480
  """
5277
5481
 
5278
5482
  inline_message_id: Option[str] = Nothing
5279
- """Optional. Identifier of the sent inline message. Available only if there
5483
+ """Optional. Identifier of the sent inline message. Available only if there
5280
5484
  is an inline keyboard attached to the message."""
5281
5485
 
5282
5486
 
@@ -5290,9 +5494,9 @@ class LabeledPrice(Model):
5290
5494
  """Portion label."""
5291
5495
 
5292
5496
  amount: int
5293
- """Price of the product in the smallest units of the currency (integer, not
5294
- float/double). For example, for a price of US$ 1.45 pass amount = 145. See
5295
- the exp parameter in currencies.json, it shows the number of digits past
5497
+ """Price of the product in the smallest units of the currency (integer, not
5498
+ float/double). For example, for a price of US$ 1.45 pass amount = 145. See
5499
+ the exp parameter in currencies.json, it shows the number of digits past
5296
5500
  the decimal point for each currency (2 for the majority of currencies)."""
5297
5501
 
5298
5502
 
@@ -5311,13 +5515,14 @@ class Invoice(Model):
5311
5515
  start_parameter: str
5312
5516
  """Unique bot deep-linking parameter that can be used to generate this invoice."""
5313
5517
 
5314
- currency: str
5315
- """Three-letter ISO 4217 currency code."""
5518
+ currency: Currency
5519
+ """Three-letter ISO 4217 currency code, or `XTR` for payments in Telegram
5520
+ Stars."""
5316
5521
 
5317
5522
  total_amount: int
5318
- """Total price in the smallest units of the currency (integer, not float/double).
5319
- For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5320
- in currencies.json, it shows the number of digits past the decimal point
5523
+ """Total price in the smallest units of the currency (integer, not float/double).
5524
+ For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5525
+ in currencies.json, it shows the number of digits past the decimal point
5321
5526
  for each currency (2 for the majority of currencies)."""
5322
5527
 
5323
5528
 
@@ -5387,17 +5592,18 @@ class SuccessfulPayment(Model):
5387
5592
  This object contains basic information about a successful payment.
5388
5593
  """
5389
5594
 
5390
- currency: str
5391
- """Three-letter ISO 4217 currency code."""
5595
+ currency: Currency
5596
+ """Three-letter ISO 4217 currency code, or `XTR` for payments in Telegram
5597
+ Stars."""
5392
5598
 
5393
5599
  total_amount: int
5394
- """Total price in the smallest units of the currency (integer, not float/double).
5395
- For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5396
- in currencies.json, it shows the number of digits past the decimal point
5600
+ """Total price in the smallest units of the currency (integer, not float/double).
5601
+ For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5602
+ in currencies.json, it shows the number of digits past the decimal point
5397
5603
  for each currency (2 for the majority of currencies)."""
5398
5604
 
5399
5605
  invoice_payload: str
5400
- """Bot specified invoice payload."""
5606
+ """Bot-specified invoice payload."""
5401
5607
 
5402
5608
  telegram_payment_charge_id: str
5403
5609
  """Telegram payment identifier."""
@@ -5412,6 +5618,32 @@ class SuccessfulPayment(Model):
5412
5618
  """Optional. Order information provided by the user."""
5413
5619
 
5414
5620
 
5621
+ class RefundedPayment(Model):
5622
+ """Object `RefundedPayment`, see the [documentation](https://core.telegram.org/bots/api#refundedpayment).
5623
+
5624
+ This object contains basic information about a refunded payment.
5625
+ """
5626
+
5627
+ currency: typing.Literal["XTR"]
5628
+ """Three-letter ISO 4217 currency code, or `XTR` for payments in Telegram
5629
+ Stars. Currently, always `XTR`."""
5630
+
5631
+ total_amount: int
5632
+ """Total refunded price in the smallest units of the currency (integer, not
5633
+ float/double). For example, for a price of US$ 1.45, total_amount = 145.
5634
+ See the exp parameter in currencies.json, it shows the number of digits
5635
+ past the decimal point for each currency (2 for the majority of currencies)."""
5636
+
5637
+ invoice_payload: str
5638
+ """Bot-specified invoice payload."""
5639
+
5640
+ telegram_payment_charge_id: str
5641
+ """Telegram payment identifier."""
5642
+
5643
+ provider_payment_charge_id: Option[str] = Nothing
5644
+ """Optional. Provider payment identifier."""
5645
+
5646
+
5415
5647
  class ShippingQuery(Model):
5416
5648
  """Object `ShippingQuery`, see the [documentation](https://core.telegram.org/bots/api#shippingquery).
5417
5649
 
@@ -5425,7 +5657,7 @@ class ShippingQuery(Model):
5425
5657
  """User who sent the query."""
5426
5658
 
5427
5659
  invoice_payload: str
5428
- """Bot specified invoice payload."""
5660
+ """Bot-specified invoice payload."""
5429
5661
 
5430
5662
  shipping_address: "ShippingAddress"
5431
5663
  """User specified shipping address."""
@@ -5443,17 +5675,18 @@ class PreCheckoutQuery(Model):
5443
5675
  from_: "User"
5444
5676
  """User who sent the query."""
5445
5677
 
5446
- currency: str
5447
- """Three-letter ISO 4217 currency code."""
5678
+ currency: Currency
5679
+ """Three-letter ISO 4217 currency code, or `XTR` for payments in Telegram
5680
+ Stars."""
5448
5681
 
5449
5682
  total_amount: int
5450
- """Total price in the smallest units of the currency (integer, not float/double).
5451
- For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5452
- in currencies.json, it shows the number of digits past the decimal point
5683
+ """Total price in the smallest units of the currency (integer, not float/double).
5684
+ For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5685
+ in currencies.json, it shows the number of digits past the decimal point
5453
5686
  for each currency (2 for the majority of currencies)."""
5454
5687
 
5455
5688
  invoice_payload: str
5456
- """Bot specified invoice payload."""
5689
+ """Bot-specified invoice payload."""
5457
5690
 
5458
5691
  shipping_option_id: Option[str] = Nothing
5459
5692
  """Optional. Identifier of the shipping option chosen by the user."""
@@ -5462,6 +5695,146 @@ class PreCheckoutQuery(Model):
5462
5695
  """Optional. Order information provided by the user."""
5463
5696
 
5464
5697
 
5698
+ class RevenueWithdrawalStatePending(RevenueWithdrawalState):
5699
+ """Object `RevenueWithdrawalStatePending`, see the [documentation](https://core.telegram.org/bots/api#revenuewithdrawalstatepending).
5700
+
5701
+ The withdrawal is in progress.
5702
+ """
5703
+
5704
+ type: typing.Literal["pending"]
5705
+ """Type of the state, always `pending`."""
5706
+
5707
+
5708
+ class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState):
5709
+ """Object `RevenueWithdrawalStateSucceeded`, see the [documentation](https://core.telegram.org/bots/api#revenuewithdrawalstatesucceeded).
5710
+
5711
+ The withdrawal succeeded.
5712
+ """
5713
+
5714
+ type: typing.Literal["succeeded"]
5715
+ """Type of the state, always `succeeded`."""
5716
+
5717
+ date: datetime
5718
+ """Date the withdrawal was completed in Unix time."""
5719
+
5720
+ url: str
5721
+ """An HTTPS URL that can be used to see transaction details."""
5722
+
5723
+
5724
+ class RevenueWithdrawalStateFailed(RevenueWithdrawalState):
5725
+ """Object `RevenueWithdrawalStateFailed`, see the [documentation](https://core.telegram.org/bots/api#revenuewithdrawalstatefailed).
5726
+
5727
+ The withdrawal failed and the transaction was refunded.
5728
+ """
5729
+
5730
+ type: typing.Literal["failed"]
5731
+ """Type of the state, always `failed`."""
5732
+
5733
+
5734
+ class TransactionPartnerUser(TransactionPartner):
5735
+ """Object `TransactionPartnerUser`, see the [documentation](https://core.telegram.org/bots/api#transactionpartneruser).
5736
+
5737
+ Describes a transaction with a user.
5738
+ """
5739
+
5740
+ type: typing.Literal["user"]
5741
+ """Type of the transaction partner, always `user`."""
5742
+
5743
+ user: "User"
5744
+ """Information about the user."""
5745
+
5746
+ invoice_payload: Option[str] = Nothing
5747
+ """Optional. Bot-specified invoice payload."""
5748
+
5749
+
5750
+ class TransactionPartnerFragment(TransactionPartner):
5751
+ """Object `TransactionPartnerFragment`, see the [documentation](https://core.telegram.org/bots/api#transactionpartnerfragment).
5752
+
5753
+ Describes a withdrawal transaction with Fragment.
5754
+ """
5755
+
5756
+ type: typing.Literal["fragment"]
5757
+ """Type of the transaction partner, always `fragment`."""
5758
+
5759
+ withdrawal_state: Option[
5760
+ Variative[
5761
+ "RevenueWithdrawalStatePending", "RevenueWithdrawalStateSucceeded", "RevenueWithdrawalStateFailed"
5762
+ ]
5763
+ ] = Nothing
5764
+ """Optional. State of the transaction if the transaction is outgoing."""
5765
+
5766
+
5767
+ class TransactionPartnerTelegramAds(TransactionPartner):
5768
+ """Object `TransactionPartnerTelegramAds`, see the [documentation](https://core.telegram.org/bots/api#transactionpartnertelegramads).
5769
+
5770
+ Describes a withdrawal transaction to the Telegram Ads platform.
5771
+ """
5772
+
5773
+ type: typing.Literal["telegram_ads"]
5774
+ """Type of the transaction partner, always `telegram_ads`."""
5775
+
5776
+
5777
+ class TransactionPartnerOther(TransactionPartner):
5778
+ """Object `TransactionPartnerOther`, see the [documentation](https://core.telegram.org/bots/api#transactionpartnerother).
5779
+
5780
+ Describes a transaction with an unknown source or recipient.
5781
+ """
5782
+
5783
+ type: typing.Literal["other"]
5784
+ """Type of the transaction partner, always `other`."""
5785
+
5786
+
5787
+ class StarTransaction(Model):
5788
+ """Object `StarTransaction`, see the [documentation](https://core.telegram.org/bots/api#startransaction).
5789
+
5790
+ Describes a Telegram Star transaction.
5791
+ """
5792
+
5793
+ id: str
5794
+ """Unique identifier of the transaction. Coincides with the identifer of
5795
+ the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id
5796
+ for successful incoming payments from users."""
5797
+
5798
+ amount: int
5799
+ """Number of Telegram Stars transferred by the transaction."""
5800
+
5801
+ date: datetime
5802
+ """Date the transaction was created in Unix time."""
5803
+
5804
+ source: Option[
5805
+ Variative[
5806
+ "TransactionPartnerUser",
5807
+ "TransactionPartnerFragment",
5808
+ "TransactionPartnerTelegramAds",
5809
+ "TransactionPartnerOther",
5810
+ ]
5811
+ ] = Nothing
5812
+ """Optional. Source of an incoming transaction (e.g., a user purchasing goods
5813
+ or services, Fragment refunding a failed withdrawal). Only for incoming
5814
+ transactions."""
5815
+
5816
+ receiver: Option[
5817
+ Variative[
5818
+ "TransactionPartnerUser",
5819
+ "TransactionPartnerFragment",
5820
+ "TransactionPartnerTelegramAds",
5821
+ "TransactionPartnerOther",
5822
+ ]
5823
+ ] = Nothing
5824
+ """Optional. Receiver of an outgoing transaction (e.g., a user for a purchase
5825
+ refund, Fragment for a withdrawal). Only for outgoing transactions."""
5826
+
5827
+
5828
+ class StarTransactions(Model):
5829
+ """Object `StarTransactions`, see the [documentation](https://core.telegram.org/bots/api#startransactions).
5830
+
5831
+ Contains a list of Telegram Star transactions.
5832
+ """
5833
+
5834
+ transactions: list["StarTransaction"]
5835
+ """The list of transactions."""
5836
+
5837
+
5465
5838
  class PassportData(Model):
5466
5839
  """Object `PassportData`, see the [documentation](https://core.telegram.org/bots/api#passportdata).
5467
5840
 
@@ -5469,7 +5842,7 @@ class PassportData(Model):
5469
5842
  """
5470
5843
 
5471
5844
  data: list["EncryptedPassportElement"]
5472
- """Array with information about documents and other Telegram Passport elements
5845
+ """Array with information about documents and other Telegram Passport elements
5473
5846
  that was shared with the bot."""
5474
5847
 
5475
5848
  credentials: "EncryptedCredentials"
@@ -5486,7 +5859,7 @@ class PassportFile(Model):
5486
5859
  """Identifier for this file, which can be used to download or reuse the file."""
5487
5860
 
5488
5861
  file_unique_id: str
5489
- """Unique identifier for this file, which is supposed to be the same over time
5862
+ """Unique identifier for this file, which is supposed to be the same over time
5490
5863
  and for different bots. Can't be used to download or reuse the file."""
5491
5864
 
5492
5865
  file_size: int
@@ -5503,55 +5876,55 @@ class EncryptedPassportElement(Model):
5503
5876
  """
5504
5877
 
5505
5878
  type: EncryptedPassportElementType
5506
- """Element type. One of `personal_details`, `passport`, `driver_license`,
5507
- `identity_card`, `internal_passport`, `address`, `utility_bill`,
5508
- `bank_statement`, `rental_agreement`, `passport_registration`,
5879
+ """Element type. One of `personal_details`, `passport`, `driver_license`,
5880
+ `identity_card`, `internal_passport`, `address`, `utility_bill`,
5881
+ `bank_statement`, `rental_agreement`, `passport_registration`,
5509
5882
  `temporary_registration`, `phone_number`, `email`."""
5510
5883
 
5511
5884
  hash: str
5512
5885
  """Base64-encoded element hash for using in PassportElementErrorUnspecified."""
5513
5886
 
5514
5887
  data: Option[str] = Nothing
5515
- """Optional. Base64-encoded encrypted Telegram Passport element data provided
5516
- by the user; available only for `personal_details`, `passport`, `driver_license`,
5517
- `identity_card`, `internal_passport` and `address` types. Can be decrypted
5888
+ """Optional. Base64-encoded encrypted Telegram Passport element data provided
5889
+ by the user; available only for `personal_details`, `passport`, `driver_license`,
5890
+ `identity_card`, `internal_passport` and `address` types. Can be decrypted
5518
5891
  and verified using the accompanying EncryptedCredentials."""
5519
5892
 
5520
5893
  phone_number: Option[str] = Nothing
5521
- """Optional. User's verified phone number; available only for `phone_number`
5894
+ """Optional. User's verified phone number; available only for `phone_number`
5522
5895
  type."""
5523
5896
 
5524
5897
  email: Option[str] = Nothing
5525
5898
  """Optional. User's verified email address; available only for `email` type."""
5526
5899
 
5527
5900
  files: Option[list["PassportFile"]] = Nothing
5528
- """Optional. Array of encrypted files with documents provided by the user;
5529
- available only for `utility_bill`, `bank_statement`, `rental_agreement`,
5530
- `passport_registration` and `temporary_registration` types. Files
5901
+ """Optional. Array of encrypted files with documents provided by the user;
5902
+ available only for `utility_bill`, `bank_statement`, `rental_agreement`,
5903
+ `passport_registration` and `temporary_registration` types. Files
5531
5904
  can be decrypted and verified using the accompanying EncryptedCredentials."""
5532
5905
 
5533
5906
  front_side: Option["PassportFile"] = Nothing
5534
- """Optional. Encrypted file with the front side of the document, provided
5535
- by the user; available only for `passport`, `driver_license`, `identity_card`
5536
- and `internal_passport`. The file can be decrypted and verified using
5907
+ """Optional. Encrypted file with the front side of the document, provided
5908
+ by the user; available only for `passport`, `driver_license`, `identity_card`
5909
+ and `internal_passport`. The file can be decrypted and verified using
5537
5910
  the accompanying EncryptedCredentials."""
5538
5911
 
5539
5912
  reverse_side: Option["PassportFile"] = Nothing
5540
- """Optional. Encrypted file with the reverse side of the document, provided
5541
- by the user; available only for `driver_license` and `identity_card`.
5913
+ """Optional. Encrypted file with the reverse side of the document, provided
5914
+ by the user; available only for `driver_license` and `identity_card`.
5542
5915
  The file can be decrypted and verified using the accompanying EncryptedCredentials."""
5543
5916
 
5544
5917
  selfie: Option["PassportFile"] = Nothing
5545
- """Optional. Encrypted file with the selfie of the user holding a document,
5546
- provided by the user; available if requested for `passport`, `driver_license`,
5547
- `identity_card` and `internal_passport`. The file can be decrypted and
5918
+ """Optional. Encrypted file with the selfie of the user holding a document,
5919
+ provided by the user; available if requested for `passport`, `driver_license`,
5920
+ `identity_card` and `internal_passport`. The file can be decrypted and
5548
5921
  verified using the accompanying EncryptedCredentials."""
5549
5922
 
5550
5923
  translation: Option[list["PassportFile"]] = Nothing
5551
- """Optional. Array of encrypted files with translated versions of documents
5552
- provided by the user; available if requested for `passport`, `driver_license`,
5553
- `identity_card`, `internal_passport`, `utility_bill`, `bank_statement`,
5554
- `rental_agreement`, `passport_registration` and `temporary_registration`
5924
+ """Optional. Array of encrypted files with translated versions of documents
5925
+ provided by the user; available if requested for `passport`, `driver_license`,
5926
+ `identity_card`, `internal_passport`, `utility_bill`, `bank_statement`,
5927
+ `rental_agreement`, `passport_registration` and `temporary_registration`
5555
5928
  types. Files can be decrypted and verified using the accompanying EncryptedCredentials."""
5556
5929
 
5557
5930
 
@@ -5562,15 +5935,15 @@ class EncryptedCredentials(Model):
5562
5935
  """
5563
5936
 
5564
5937
  data: str
5565
- """Base64-encoded encrypted JSON-serialized data with unique user's payload,
5566
- data hashes and secrets required for EncryptedPassportElement decryption
5938
+ """Base64-encoded encrypted JSON-serialized data with unique user's payload,
5939
+ data hashes and secrets required for EncryptedPassportElement decryption
5567
5940
  and authentication."""
5568
5941
 
5569
5942
  hash: str
5570
5943
  """Base64-encoded data hash for data authentication."""
5571
5944
 
5572
5945
  secret: str
5573
- """Base64-encoded secret, encrypted with the bot's public RSA key, required
5946
+ """Base64-encoded secret, encrypted with the bot's public RSA key, required
5574
5947
  for data decryption."""
5575
5948
 
5576
5949
 
@@ -5584,14 +5957,15 @@ class PassportElementErrorDataField(PassportElementError):
5584
5957
  """Error source, must be data."""
5585
5958
 
5586
5959
  type: typing.Literal[
5960
+ "personal_details",
5587
5961
  "passport",
5588
5962
  "driver_license",
5589
5963
  "identity_card",
5590
5964
  "internal_passport",
5591
5965
  "address",
5592
5966
  ]
5593
- """The section of the user's Telegram Passport which has the error, one of `personal_details`,
5594
- `passport`, `driver_license`, `identity_card`, `internal_passport`,
5967
+ """The section of the user's Telegram Passport which has the error, one of `personal_details`,
5968
+ `passport`, `driver_license`, `identity_card`, `internal_passport`,
5595
5969
  `address`."""
5596
5970
 
5597
5971
  field_name: str
@@ -5619,7 +5993,7 @@ class PassportElementErrorFrontSide(PassportElementError):
5619
5993
  "identity_card",
5620
5994
  "internal_passport",
5621
5995
  ]
5622
- """The section of the user's Telegram Passport which has the issue, one of `passport`,
5996
+ """The section of the user's Telegram Passport which has the issue, one of `passport`,
5623
5997
  `driver_license`, `identity_card`, `internal_passport`."""
5624
5998
 
5625
5999
  file_hash: str
@@ -5639,7 +6013,7 @@ class PassportElementErrorReverseSide(PassportElementError):
5639
6013
  """Error source, must be reverse_side."""
5640
6014
 
5641
6015
  type: typing.Literal["driver_license", "identity_card"]
5642
- """The section of the user's Telegram Passport which has the issue, one of `driver_license`,
6016
+ """The section of the user's Telegram Passport which has the issue, one of `driver_license`,
5643
6017
  `identity_card`."""
5644
6018
 
5645
6019
  file_hash: str
@@ -5664,7 +6038,7 @@ class PassportElementErrorSelfie(PassportElementError):
5664
6038
  "identity_card",
5665
6039
  "internal_passport",
5666
6040
  ]
5667
- """The section of the user's Telegram Passport which has the issue, one of `passport`,
6041
+ """The section of the user's Telegram Passport which has the issue, one of `passport`,
5668
6042
  `driver_license`, `identity_card`, `internal_passport`."""
5669
6043
 
5670
6044
  file_hash: str
@@ -5690,8 +6064,8 @@ class PassportElementErrorFile(PassportElementError):
5690
6064
  "passport_registration",
5691
6065
  "temporary_registration",
5692
6066
  ]
5693
- """The section of the user's Telegram Passport which has the issue, one of `utility_bill`,
5694
- `bank_statement`, `rental_agreement`, `passport_registration`,
6067
+ """The section of the user's Telegram Passport which has the issue, one of `utility_bill`,
6068
+ `bank_statement`, `rental_agreement`, `passport_registration`,
5695
6069
  `temporary_registration`."""
5696
6070
 
5697
6071
  file_hash: str
@@ -5717,8 +6091,8 @@ class PassportElementErrorFiles(PassportElementError):
5717
6091
  "passport_registration",
5718
6092
  "temporary_registration",
5719
6093
  ]
5720
- """The section of the user's Telegram Passport which has the issue, one of `utility_bill`,
5721
- `bank_statement`, `rental_agreement`, `passport_registration`,
6094
+ """The section of the user's Telegram Passport which has the issue, one of `utility_bill`,
6095
+ `bank_statement`, `rental_agreement`, `passport_registration`,
5722
6096
  `temporary_registration`."""
5723
6097
 
5724
6098
  file_hashes: list[str]
@@ -5748,9 +6122,9 @@ class PassportElementErrorTranslationFile(PassportElementError):
5748
6122
  "passport_registration",
5749
6123
  "temporary_registration",
5750
6124
  ]
5751
- """Type of element of the user's Telegram Passport which has the issue, one
5752
- of `passport`, `driver_license`, `identity_card`, `internal_passport`,
5753
- `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`,
6125
+ """Type of element of the user's Telegram Passport which has the issue, one
6126
+ of `passport`, `driver_license`, `identity_card`, `internal_passport`,
6127
+ `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`,
5754
6128
  `temporary_registration`."""
5755
6129
 
5756
6130
  file_hash: str
@@ -5780,9 +6154,9 @@ class PassportElementErrorTranslationFiles(PassportElementError):
5780
6154
  "passport_registration",
5781
6155
  "temporary_registration",
5782
6156
  ]
5783
- """Type of element of the user's Telegram Passport which has the issue, one
5784
- of `passport`, `driver_license`, `identity_card`, `internal_passport`,
5785
- `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`,
6157
+ """Type of element of the user's Telegram Passport which has the issue, one
6158
+ of `passport`, `driver_license`, `identity_card`, `internal_passport`,
6159
+ `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`,
5786
6160
  `temporary_registration`."""
5787
6161
 
5788
6162
  file_hashes: list[str]
@@ -5827,17 +6201,17 @@ class Game(Model):
5827
6201
  """Photo that will be displayed in the game message in chats."""
5828
6202
 
5829
6203
  text: Option[str] = Nothing
5830
- """Optional. Brief description of the game or high scores included in the game
5831
- message. Can be automatically edited to include current high scores for
5832
- the game when the bot calls setGameScore, or manually edited using editMessageText.
6204
+ """Optional. Brief description of the game or high scores included in the game
6205
+ message. Can be automatically edited to include current high scores for
6206
+ the game when the bot calls setGameScore, or manually edited using editMessageText.
5833
6207
  0-4096 characters."""
5834
6208
 
5835
6209
  text_entities: Option[list["MessageEntity"]] = Nothing
5836
- """Optional. Special entities that appear in text, such as usernames, URLs,
6210
+ """Optional. Special entities that appear in text, such as usernames, URLs,
5837
6211
  bot commands, etc."""
5838
6212
 
5839
6213
  animation: Option["Animation"] = Nothing
5840
- """Optional. Animation that will be displayed in the game message in chats.
6214
+ """Optional. Animation that will be displayed in the game message in chats.
5841
6215
  Upload via BotFather."""
5842
6216
 
5843
6217
 
@@ -5982,6 +6356,9 @@ __all__ = (
5982
6356
  "InputMediaPhoto",
5983
6357
  "InputMediaVideo",
5984
6358
  "InputMessageContent",
6359
+ "InputPaidMedia",
6360
+ "InputPaidMediaPhoto",
6361
+ "InputPaidMediaVideo",
5985
6362
  "InputPollOption",
5986
6363
  "InputSticker",
5987
6364
  "InputTextMessageContent",
@@ -6014,6 +6391,11 @@ __all__ = (
6014
6391
  "MessageReactionUpdated",
6015
6392
  "Model",
6016
6393
  "OrderInfo",
6394
+ "PaidMedia",
6395
+ "PaidMediaInfo",
6396
+ "PaidMediaPhoto",
6397
+ "PaidMediaPreview",
6398
+ "PaidMediaVideo",
6017
6399
  "PassportData",
6018
6400
  "PassportElementError",
6019
6401
  "PassportElementErrorDataField",
@@ -6036,21 +6418,33 @@ __all__ = (
6036
6418
  "ReactionType",
6037
6419
  "ReactionTypeCustomEmoji",
6038
6420
  "ReactionTypeEmoji",
6421
+ "RefundedPayment",
6039
6422
  "ReplyKeyboardMarkup",
6040
6423
  "ReplyKeyboardRemove",
6041
6424
  "ReplyParameters",
6042
6425
  "ResponseParameters",
6426
+ "RevenueWithdrawalState",
6427
+ "RevenueWithdrawalStateFailed",
6428
+ "RevenueWithdrawalStatePending",
6429
+ "RevenueWithdrawalStateSucceeded",
6043
6430
  "SentWebAppMessage",
6044
6431
  "SharedUser",
6045
6432
  "ShippingAddress",
6046
6433
  "ShippingOption",
6047
6434
  "ShippingQuery",
6435
+ "StarTransaction",
6436
+ "StarTransactions",
6048
6437
  "Sticker",
6049
6438
  "StickerSet",
6050
6439
  "Story",
6051
6440
  "SuccessfulPayment",
6052
6441
  "SwitchInlineQueryChosenChat",
6053
6442
  "TextQuote",
6443
+ "TransactionPartner",
6444
+ "TransactionPartnerFragment",
6445
+ "TransactionPartnerOther",
6446
+ "TransactionPartnerTelegramAds",
6447
+ "TransactionPartnerUser",
6054
6448
  "Update",
6055
6449
  "User",
6056
6450
  "UserChatBoosts",