telegrinder 0.1.dev168__py3-none-any.whl → 0.1.dev170__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 (100) 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 +54 -43
  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 +35 -33
  15. telegrinder/bot/dispatch/handler/func.py +34 -13
  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 +37 -45
  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 +77 -35
  28. telegrinder/bot/dispatch/waiter_machine/middleware.py +31 -7
  29. telegrinder/bot/dispatch/waiter_machine/short_state.py +17 -8
  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 +4 -4
  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/choice.py +2 -3
  58. telegrinder/model.py +51 -16
  59. telegrinder/modules.py +14 -6
  60. telegrinder/msgspec_utils.py +67 -23
  61. telegrinder/node/__init__.py +26 -8
  62. telegrinder/node/attachment.py +13 -9
  63. telegrinder/node/base.py +27 -14
  64. telegrinder/node/callback_query.py +18 -0
  65. telegrinder/node/command.py +29 -0
  66. telegrinder/node/composer.py +119 -30
  67. telegrinder/node/me.py +14 -0
  68. telegrinder/node/message.py +2 -4
  69. telegrinder/node/polymorphic.py +44 -0
  70. telegrinder/node/rule.py +26 -22
  71. telegrinder/node/scope.py +36 -0
  72. telegrinder/node/source.py +37 -10
  73. telegrinder/node/text.py +11 -5
  74. telegrinder/node/tools/__init__.py +2 -2
  75. telegrinder/node/tools/generator.py +6 -6
  76. telegrinder/tools/__init__.py +8 -13
  77. telegrinder/tools/buttons.py +23 -17
  78. telegrinder/tools/error_handler/error_handler.py +11 -14
  79. telegrinder/tools/formatting/__init__.py +0 -6
  80. telegrinder/tools/formatting/html.py +10 -12
  81. telegrinder/tools/formatting/links.py +0 -5
  82. telegrinder/tools/formatting/spec_html_formats.py +0 -11
  83. telegrinder/tools/global_context/abc.py +1 -3
  84. telegrinder/tools/global_context/global_context.py +6 -16
  85. telegrinder/tools/i18n/simple.py +1 -3
  86. telegrinder/tools/kb_set/yaml.py +1 -2
  87. telegrinder/tools/keyboard.py +7 -8
  88. telegrinder/tools/limited_dict.py +1 -1
  89. telegrinder/tools/loop_wrapper/loop_wrapper.py +6 -5
  90. telegrinder/tools/magic.py +27 -5
  91. telegrinder/types/__init__.py +20 -0
  92. telegrinder/types/enums.py +37 -31
  93. telegrinder/types/methods.py +608 -327
  94. telegrinder/types/objects.py +1139 -716
  95. {telegrinder-0.1.dev168.dist-info → telegrinder-0.1.dev170.dist-info}/LICENSE +1 -1
  96. {telegrinder-0.1.dev168.dist-info → telegrinder-0.1.dev170.dist-info}/METADATA +6 -5
  97. telegrinder-0.1.dev170.dist-info/RECORD +143 -0
  98. telegrinder/bot/dispatch/composition.py +0 -88
  99. telegrinder-0.1.dev168.dist-info/RECORD +0 -137
  100. {telegrinder-0.1.dev168.dist-info → telegrinder-0.1.dev170.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,57 +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
544
  available_reactions: Option[list[Variative["ReactionTypeEmoji", "ReactionTypeCustomEmoji"]]] = Nothing
496
- """Optional. List of available reactions allowed in the chat. If omitted,
545
+ """Optional. List of available reactions allowed in the chat. If omitted,
497
546
  then all emoji reactions are allowed."""
498
547
 
499
548
  background_custom_emoji_id: Option[str] = Nothing
500
- """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
501
550
  reply header and link preview background."""
502
551
 
503
552
  profile_accent_color_id: Option[int] = Nothing
504
- """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.
505
554
  See profile accent colors for more details."""
506
555
 
507
556
  profile_background_custom_emoji_id: Option[str] = Nothing
508
- """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
509
558
  profile background."""
510
559
 
511
560
  emoji_status_custom_emoji_id: Option[str] = Nothing
512
- """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
513
562
  other party in a private chat."""
514
563
 
515
564
  emoji_status_expiration_date: Option[datetime] = Nothing
516
- """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
517
566
  in a private chat, in Unix time, if any."""
518
567
 
519
568
  bio: Option[str] = Nothing
520
569
  """Optional. Bio of the other party in a private chat."""
521
570
 
522
571
  has_private_forwards: Option[bool] = Nothing
523
- """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
524
573
  allows to use tg://user?id=<user_id> links only in chats with the user."""
525
574
 
526
575
  has_restricted_voice_and_video_messages: Option[bool] = Nothing
527
- """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
528
577
  voice and video note messages in the private chat."""
529
578
 
530
579
  join_to_send_messages: Option[bool] = Nothing
531
- """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
532
581
  messages."""
533
582
 
534
583
  join_by_request: Option[bool] = Nothing
535
- """Optional. True, if all users directly joining the supergroup without using
584
+ """Optional. True, if all users directly joining the supergroup without using
536
585
  an invite link need to be approved by supergroup administrators."""
537
586
 
538
587
  description: Option[str] = Nothing
@@ -547,31 +596,35 @@ class ChatFullInfo(Model):
547
596
  permissions: Option["ChatPermissions"] = Nothing
548
597
  """Optional. Default chat member permissions, for groups and supergroups."""
549
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
+
550
603
  slow_mode_delay: Option[int] = Nothing
551
- """Optional. For supergroups, the minimum allowed delay between consecutive
604
+ """Optional. For supergroups, the minimum allowed delay between consecutive
552
605
  messages sent by each unprivileged user; in seconds."""
553
606
 
554
607
  unrestrict_boost_count: Option[int] = Nothing
555
- """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
556
609
  user needs to add in order to ignore slow mode and chat permissions."""
557
610
 
558
611
  message_auto_delete_time: Option[int] = Nothing
559
- """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
560
613
  deleted; in seconds."""
561
614
 
562
615
  has_aggressive_anti_spam_enabled: Option[bool] = Nothing
563
- """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.
564
617
  The field is only available to chat administrators."""
565
618
 
566
619
  has_hidden_members: Option[bool] = Nothing
567
- """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
568
621
  administrators in the chat."""
569
622
 
570
623
  has_protected_content: Option[bool] = Nothing
571
624
  """Optional. True, if messages from the chat can't be forwarded to other chats."""
572
625
 
573
626
  has_visible_history: Option[bool] = Nothing
574
- """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
575
628
  only to chat administrators."""
576
629
 
577
630
  sticker_set_name: Option[str] = Nothing
@@ -581,15 +634,15 @@ class ChatFullInfo(Model):
581
634
  """Optional. True, if the bot can change the group sticker set."""
582
635
 
583
636
  custom_emoji_sticker_set_name: Option[str] = Nothing
584
- """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
585
638
  set. Custom emoji from this set can be used by all users and bots in the group."""
586
639
 
587
640
  linked_chat_id: Option[int] = Nothing
588
- """Optional. Unique identifier for the linked chat, i.e. the discussion group
589
- identifier for a channel and vice versa; for supergroups and channel chats.
590
- This identifier may be greater than 32 bits and some programming languages
591
- may have difficulty/silent defects in interpreting it. But it is smaller
592
- 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
593
646
  safe for storing this identifier."""
594
647
 
595
648
  location: Option["ChatLocation"] = Nothing
@@ -606,42 +659,42 @@ class Message(MaybeInaccessibleMessage):
606
659
  """Unique message identifier inside this chat."""
607
660
 
608
661
  date: datetime
609
- """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
610
663
  a valid date."""
611
664
 
612
665
  chat: "Chat"
613
666
  """Chat the message belongs to."""
614
667
 
615
668
  message_thread_id: Option[int] = Nothing
616
- """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;
617
670
  for supergroups only."""
618
671
 
619
672
  from_: Option["User"] = Nothing
620
- """Optional. Sender of the message; empty for messages sent to channels. For
621
- 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
622
675
  chats, if the message was sent on behalf of a chat."""
623
676
 
624
677
  sender_chat: Option["Chat"] = Nothing
625
- """Optional. Sender of the message, sent on behalf of a chat. For example, the
626
- channel itself for channel posts, the supergroup itself for messages from
627
- anonymous group administrators, the linked channel for messages automatically
628
- forwarded to the discussion group. For backward compatibility, the field
629
- 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
630
683
  sent on behalf of a chat."""
631
684
 
632
685
  sender_boost_count: Option[int] = Nothing
633
- """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
634
687
  added by the user."""
635
688
 
636
689
  sender_business_bot: Option["User"] = Nothing
637
- """Optional. The bot that actually sent the message on behalf of the business
638
- 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
639
692
  business account."""
640
693
 
641
694
  business_connection_id: Option[str] = Nothing
642
- """Optional. Unique identifier of the business connection from which the
643
- message was received. If non-empty, the message belongs to a chat of the
644
- 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
645
698
  bot chat which might share the same identifier."""
646
699
 
647
700
  forward_origin: Option[
@@ -653,20 +706,20 @@ class Message(MaybeInaccessibleMessage):
653
706
  """Optional. True, if the message is sent to a forum topic."""
654
707
 
655
708
  is_automatic_forward: Option[bool] = Nothing
656
- """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
657
710
  forwarded to the connected discussion group."""
658
711
 
659
712
  reply_to_message: Option["Message"] = Nothing
660
- """Optional. For replies in the same chat and message thread, the original
661
- 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
662
715
  reply_to_message fields even if it itself is a reply."""
663
716
 
664
717
  external_reply: Option["ExternalReplyInfo"] = Nothing
665
- """Optional. Information about the message that is being replied to, which
718
+ """Optional. Information about the message that is being replied to, which
666
719
  may come from another chat or forum topic."""
667
720
 
668
721
  quote: Option["TextQuote"] = Nothing
669
- """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
670
723
  part of the message."""
671
724
 
672
725
  reply_to_story: Option["Story"] = Nothing
@@ -682,31 +735,34 @@ class Message(MaybeInaccessibleMessage):
682
735
  """Optional. True, if the message can't be forwarded."""
683
736
 
684
737
  is_from_offline: Option[bool] = Nothing
685
- """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,
686
739
  as an away or a greeting business message, or as a scheduled message."""
687
740
 
688
741
  media_group_id: Option[str] = Nothing
689
- """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
690
743
  to."""
691
744
 
692
745
  author_signature: Option[str] = Nothing
693
- """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
694
747
  custom title of an anonymous group administrator."""
695
748
 
696
749
  text: Option[str] = Nothing
697
750
  """Optional. For text messages, the actual UTF-8 text of the message."""
698
751
 
699
752
  entities: Option[list["MessageEntity"]] = Nothing
700
- """Optional. For text messages, special entities like usernames, URLs, bot
753
+ """Optional. For text messages, special entities like usernames, URLs, bot
701
754
  commands, etc. that appear in the text."""
702
755
 
703
756
  link_preview_options: Option["LinkPreviewOptions"] = Nothing
704
- """Optional. Options used for link preview generation for the message, if
757
+ """Optional. Options used for link preview generation for the message, if
705
758
  it is a text message and link preview options were changed."""
706
759
 
760
+ effect_id: Option[str] = Nothing
761
+ """Optional. Unique identifier of the message effect added to the message."""
762
+
707
763
  animation: Option["Animation"] = Nothing
708
- """Optional. Message is an animation, information about the animation. For
709
- 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
710
766
  also be set."""
711
767
 
712
768
  audio: Option["Audio"] = Nothing
@@ -715,6 +771,9 @@ class Message(MaybeInaccessibleMessage):
715
771
  document: Option["Document"] = Nothing
716
772
  """Optional. Message is a general file, information about the file."""
717
773
 
774
+ paid_media: Option["PaidMediaInfo"] = Nothing
775
+ """Optional. Message contains paid media; information about the paid media."""
776
+
718
777
  photo: Option[list["PhotoSize"]] = Nothing
719
778
  """Optional. Message is a photo, available sizes of the photo."""
720
779
 
@@ -734,13 +793,16 @@ class Message(MaybeInaccessibleMessage):
734
793
  """Optional. Message is a voice message, information about the file."""
735
794
 
736
795
  caption: Option[str] = Nothing
737
- """Optional. Caption for the animation, audio, document, photo, video or
738
- voice."""
796
+ """Optional. Caption for the animation, audio, document, paid media, photo,
797
+ video or voice."""
739
798
 
740
799
  caption_entities: Option[list["MessageEntity"]] = Nothing
741
- """Optional. For messages with a caption, special entities like usernames,
800
+ """Optional. For messages with a caption, special entities like usernames,
742
801
  URLs, bot commands, etc. that appear in the caption."""
743
802
 
803
+ show_caption_above_media: Option[bool] = Nothing
804
+ """Optional. True, if the caption must be shown above the message media."""
805
+
744
806
  has_media_spoiler: Option[bool] = Nothing
745
807
  """Optional. True, if the message media is covered by a spoiler animation."""
746
808
 
@@ -751,25 +813,25 @@ class Message(MaybeInaccessibleMessage):
751
813
  """Optional. Message is a dice with random value."""
752
814
 
753
815
  game: Option["Game"] = Nothing
754
- """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:
755
817
  https://core.telegram.org/bots/api#games."""
756
818
 
757
819
  poll: Option["Poll"] = Nothing
758
820
  """Optional. Message is a native poll, information about the poll."""
759
821
 
760
822
  venue: Option["Venue"] = Nothing
761
- """Optional. Message is a venue, information about the venue. For backward
823
+ """Optional. Message is a venue, information about the venue. For backward
762
824
  compatibility, when this field is set, the location field will also be set."""
763
825
 
764
826
  location: Option["Location"] = Nothing
765
827
  """Optional. Message is a shared location, information about the location."""
766
828
 
767
829
  new_chat_members: Option[list["User"]] = Nothing
768
- """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
769
831
  about them (the bot itself may be one of these members)."""
770
832
 
771
833
  left_chat_member: Option["User"] = Nothing
772
- """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
773
835
  member may be the bot itself)."""
774
836
 
775
837
  new_chat_title: Option[str] = Nothing
@@ -785,46 +847,50 @@ class Message(MaybeInaccessibleMessage):
785
847
  """Optional. Service message: the group has been created."""
786
848
 
787
849
  supergroup_chat_created: Option[bool] = Nothing
788
- """Optional. Service message: the supergroup has been created. This field
789
- can't be received in a message coming through updates, because bot can't
790
- 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
791
853
  if someone replies to a very first message in a directly created supergroup."""
792
854
 
793
855
  channel_chat_created: Option[bool] = Nothing
794
- """Optional. Service message: the channel has been created. This field can't
795
- be received in a message coming through updates, because bot can't be a member
796
- 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
797
859
  if someone replies to a very first message in a channel."""
798
860
 
799
861
  message_auto_delete_timer_changed: Option["MessageAutoDeleteTimerChanged"] = Nothing
800
- """Optional. Service message: auto-delete timer settings changed in the
862
+ """Optional. Service message: auto-delete timer settings changed in the
801
863
  chat."""
802
864
 
803
865
  migrate_to_chat_id: Option[int] = Nothing
804
- """Optional. The group has been migrated to a supergroup with the specified
805
- identifier. This number may have more than 32 significant bits and some
806
- programming languages may have difficulty/silent defects in interpreting
807
- 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
808
870
  float type are safe for storing this identifier."""
809
871
 
810
872
  migrate_from_chat_id: Option[int] = Nothing
811
- """Optional. The supergroup has been migrated from a group 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
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
815
877
  float type are safe for storing this identifier."""
816
878
 
817
879
  pinned_message: Option[Variative["Message", "InaccessibleMessage"]] = Nothing
818
- """Optional. Specified message was pinned. Note that the Message object in
819
- 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
820
882
  itself is a reply."""
821
883
 
822
884
  invoice: Option["Invoice"] = Nothing
823
- """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.
824
886
  More about payments: https://core.telegram.org/bots/api#payments."""
825
887
 
826
888
  successful_payment: Option["SuccessfulPayment"] = Nothing
827
- """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
828
894
  about the payment. More about payments: https://core.telegram.org/bots/api#payments."""
829
895
 
830
896
  users_shared: Option["UsersShared"] = Nothing
@@ -834,19 +900,19 @@ class Message(MaybeInaccessibleMessage):
834
900
  """Optional. Service message: a chat was shared with the bot."""
835
901
 
836
902
  connected_website: Option[str] = Nothing
837
- """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.
838
904
  More about Telegram Login: https://core.telegram.org/widgets/login."""
839
905
 
840
906
  write_access_allowed: Option["WriteAccessAllowed"] = Nothing
841
- """Optional. Service message: the user allowed the bot to write messages after
842
- 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,
843
909
  or accepting an explicit request from a Web App sent by the method requestWriteAccess."""
844
910
 
845
911
  passport_data: Option["PassportData"] = Nothing
846
912
  """Optional. Telegram Passport data."""
847
913
 
848
914
  proximity_alert_triggered: Option["ProximityAlertTriggered"] = Nothing
849
- """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
850
916
  proximity alert while sharing Live Location."""
851
917
 
852
918
  boost_added: Option["ChatBoostAdded"] = Nothing
@@ -901,9 +967,16 @@ class Message(MaybeInaccessibleMessage):
901
967
  """Optional. Service message: data sent by a Web App."""
902
968
 
903
969
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
904
- """Optional. Inline keyboard attached to the message. login_url buttons
970
+ """Optional. Inline keyboard attached to the message. login_url buttons
905
971
  are represented as ordinary url buttons."""
906
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
+
907
980
  @property
908
981
  def content_type(self) -> ContentType:
909
982
  """Type of content that the message contains."""
@@ -937,13 +1010,6 @@ class Message(MaybeInaccessibleMessage):
937
1010
  self.chat.full_name.unwrap() if self.chat.type == ChatType.PRIVATE else self.chat.title.unwrap()
938
1011
  )
939
1012
 
940
- def __eq__(self, other: typing.Any) -> bool:
941
- return (
942
- isinstance(other, self.__class__)
943
- and self.message_id == other.message_id
944
- and self.chat_id == other.chat_id
945
- )
946
-
947
1013
 
948
1014
  class MessageId(Model):
949
1015
  """Object `MessageId`, see the [documentation](https://core.telegram.org/bots/api#messageid).
@@ -968,7 +1034,7 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
968
1034
  """Unique message identifier inside the chat."""
969
1035
 
970
1036
  date: typing.Literal[0]
971
- """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
972
1038
  messages."""
973
1039
 
974
1040
 
@@ -979,15 +1045,16 @@ class MessageEntity(Model):
979
1045
  """
980
1046
 
981
1047
  type: MessageEntityType
982
- """Type of the entity. Currently, can be `mention` (@username), `hashtag`
983
- (#hashtag), `cashtag` ($USD), `bot_command` (/start@jobs_bot), `url`
984
- (https://telegram.org), `email` (do-not-reply@telegram.org), `phone_number`
985
- (+1-212-555-0123), `bold` (bold text), `italic` (italic text), `underline`
986
- (underlined text), `strikethrough` (strikethrough text), `spoiler`
987
- (spoiler message), `blockquote` (block quotation), `code` (monowidth
988
- string), `pre` (monowidth block), `text_link` (for clickable text URLs),
989
- `text_mention` (for users without usernames), `custom_emoji` (for inline
990
- 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)."""
991
1058
 
992
1059
  offset: int
993
1060
  """Offset in UTF-16 code units to the start of the entity."""
@@ -996,7 +1063,7 @@ class MessageEntity(Model):
996
1063
  """Length of the entity in UTF-16 code units."""
997
1064
 
998
1065
  url: Option[str] = Nothing
999
- """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
1000
1067
  on the text."""
1001
1068
 
1002
1069
  user: Option["User"] = Nothing
@@ -1006,7 +1073,7 @@ class MessageEntity(Model):
1006
1073
  """Optional. For `pre` only, the programming language of the entity text."""
1007
1074
 
1008
1075
  custom_emoji_id: Option[str] = Nothing
1009
- """Optional. For `custom_emoji` only, unique identifier of the custom emoji.
1076
+ """Optional. For `custom_emoji` only, unique identifier of the custom emoji.
1010
1077
  Use getCustomEmojiStickers to get full information about the sticker."""
1011
1078
 
1012
1079
 
@@ -1020,16 +1087,16 @@ class TextQuote(Model):
1020
1087
  """Text of the quoted part of a message that is replied to by the given message."""
1021
1088
 
1022
1089
  position: int
1023
- """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
1024
1091
  as specified by the sender."""
1025
1092
 
1026
1093
  entities: Option[list["MessageEntity"]] = Nothing
1027
- """Optional. Special entities that appear in the quote. Currently, only bold,
1028
- 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
1029
1096
  are kept in quotes."""
1030
1097
 
1031
1098
  is_manual: Option[bool] = Nothing
1032
- """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.
1033
1100
  Otherwise, the quote was added automatically by the server."""
1034
1101
 
1035
1102
 
@@ -1045,15 +1112,15 @@ class ExternalReplyInfo(Model):
1045
1112
  """Origin of the message replied to by the given message."""
1046
1113
 
1047
1114
  chat: Option["Chat"] = Nothing
1048
- """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
1049
1116
  is a supergroup or a channel."""
1050
1117
 
1051
1118
  message_id: Option[int] = Nothing
1052
- """Optional. Unique message identifier inside the original chat. Available
1119
+ """Optional. Unique message identifier inside the original chat. Available
1053
1120
  only if the original chat is a supergroup or a channel."""
1054
1121
 
1055
1122
  link_preview_options: Option["LinkPreviewOptions"] = Nothing
1056
- """Optional. Options used for link preview generation for the original message,
1123
+ """Optional. Options used for link preview generation for the original message,
1057
1124
  if it is a text message."""
1058
1125
 
1059
1126
  animation: Option["Animation"] = Nothing
@@ -1065,6 +1132,9 @@ class ExternalReplyInfo(Model):
1065
1132
  document: Option["Document"] = Nothing
1066
1133
  """Optional. Message is a general file, information about the file."""
1067
1134
 
1135
+ paid_media: Option["PaidMediaInfo"] = Nothing
1136
+ """Optional. Message contains paid media; information about the paid media."""
1137
+
1068
1138
  photo: Option[list["PhotoSize"]] = Nothing
1069
1139
  """Optional. Message is a photo, available sizes of the photo."""
1070
1140
 
@@ -1093,7 +1163,7 @@ class ExternalReplyInfo(Model):
1093
1163
  """Optional. Message is a dice with random value."""
1094
1164
 
1095
1165
  game: Option["Game"] = Nothing
1096
- """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:
1097
1167
  https://core.telegram.org/bots/api#games."""
1098
1168
 
1099
1169
  giveaway: Option["Giveaway"] = Nothing
@@ -1103,7 +1173,7 @@ class ExternalReplyInfo(Model):
1103
1173
  """Optional. A giveaway with public winners was completed."""
1104
1174
 
1105
1175
  invoice: Option["Invoice"] = Nothing
1106
- """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.
1107
1177
  More about payments: https://core.telegram.org/bots/api#payments."""
1108
1178
 
1109
1179
  location: Option["Location"] = Nothing
@@ -1123,32 +1193,32 @@ class ReplyParameters(Model):
1123
1193
  """
1124
1194
 
1125
1195
  message_id: int
1126
- """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
1127
1197
  in the chat chat_id if it is specified."""
1128
1198
 
1129
1199
  chat_id: Option[Variative[int, str]] = Nothing
1130
- """Optional. If the message to be replied to is from a different chat, unique
1131
- 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).
1132
1202
  Not supported for messages sent on behalf of a business account."""
1133
1203
 
1134
1204
  allow_sending_without_reply: Option[bool] = Nothing
1135
- """Optional. Pass True if the message should be sent even if the specified message
1136
- 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
1137
1207
  forum topic. Always True for messages sent on behalf of a business account."""
1138
1208
 
1139
1209
  quote: Option[str] = Nothing
1140
- """Optional. Quoted part of the message to be replied to; 0-1024 characters
1141
- after entities parsing. The quote must be an exact substring of the message
1142
- to be replied to, including bold, italic, underline, strikethrough, spoiler,
1143
- 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
1144
1214
  found in the original message."""
1145
1215
 
1146
1216
  quote_parse_mode: Option[str] = Nothing
1147
- """Optional. Mode for parsing entities in the quote. See formatting options
1217
+ """Optional. Mode for parsing entities in the quote. See formatting options
1148
1218
  for more details."""
1149
1219
 
1150
1220
  quote_entities: Option[list["MessageEntity"]] = Nothing
1151
- """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
1152
1222
  quote. It can be specified instead of quote_parse_mode."""
1153
1223
 
1154
1224
  quote_position: Option[int] = Nothing
@@ -1203,7 +1273,7 @@ class MessageOriginChat(MessageOrigin):
1203
1273
  """Chat that sent the message originally."""
1204
1274
 
1205
1275
  author_signature: Option[str] = Nothing
1206
- """Optional. For messages originally sent by an anonymous chat administrator,
1276
+ """Optional. For messages originally sent by an anonymous chat administrator,
1207
1277
  original message author signature."""
1208
1278
 
1209
1279
 
@@ -1239,7 +1309,7 @@ class PhotoSize(Model):
1239
1309
  """Identifier for this file, which can be used to download or reuse the file."""
1240
1310
 
1241
1311
  file_unique_id: str
1242
- """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
1243
1313
  and for different bots. Can't be used to download or reuse the file."""
1244
1314
 
1245
1315
  width: int
@@ -1262,31 +1332,31 @@ class Animation(Model):
1262
1332
  """Identifier for this file, which can be used to download or reuse the file."""
1263
1333
 
1264
1334
  file_unique_id: str
1265
- """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
1266
1336
  and for different bots. Can't be used to download or reuse the file."""
1267
1337
 
1268
1338
  width: int
1269
- """Video width as defined by sender."""
1339
+ """Video width as defined by the sender."""
1270
1340
 
1271
1341
  height: int
1272
- """Video height as defined by sender."""
1342
+ """Video height as defined by the sender."""
1273
1343
 
1274
1344
  duration: int
1275
- """Duration of the video in seconds as defined by sender."""
1345
+ """Duration of the video in seconds as defined by the sender."""
1276
1346
 
1277
1347
  thumbnail: Option["PhotoSize"] = Nothing
1278
- """Optional. Animation thumbnail as defined by sender."""
1348
+ """Optional. Animation thumbnail as defined by the sender."""
1279
1349
 
1280
1350
  file_name: Option[str] = Nothing
1281
- """Optional. Original animation filename as defined by sender."""
1351
+ """Optional. Original animation filename as defined by the sender."""
1282
1352
 
1283
1353
  mime_type: Option[str] = Nothing
1284
- """Optional. MIME type of the file as defined by sender."""
1354
+ """Optional. MIME type of the file as defined by the sender."""
1285
1355
 
1286
1356
  file_size: Option[int] = Nothing
1287
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1288
- languages may have difficulty/silent defects in interpreting it. But
1289
- 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
1290
1360
  float type are safe for storing this value."""
1291
1361
 
1292
1362
 
@@ -1300,28 +1370,28 @@ class Audio(Model):
1300
1370
  """Identifier for this file, which can be used to download or reuse the file."""
1301
1371
 
1302
1372
  file_unique_id: str
1303
- """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
1304
1374
  and for different bots. Can't be used to download or reuse the file."""
1305
1375
 
1306
1376
  duration: int
1307
- """Duration of the audio in seconds as defined by sender."""
1377
+ """Duration of the audio in seconds as defined by the sender."""
1308
1378
 
1309
1379
  performer: Option[str] = Nothing
1310
- """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."""
1311
1381
 
1312
1382
  title: Option[str] = Nothing
1313
- """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."""
1314
1384
 
1315
1385
  file_name: Option[str] = Nothing
1316
- """Optional. Original filename as defined by sender."""
1386
+ """Optional. Original filename as defined by the sender."""
1317
1387
 
1318
1388
  mime_type: Option[str] = Nothing
1319
- """Optional. MIME type of the file as defined by sender."""
1389
+ """Optional. MIME type of the file as defined by the sender."""
1320
1390
 
1321
1391
  file_size: Option[int] = Nothing
1322
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1323
- languages may have difficulty/silent defects in interpreting it. But
1324
- 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
1325
1395
  float type are safe for storing this value."""
1326
1396
 
1327
1397
  thumbnail: Option["PhotoSize"] = Nothing
@@ -1338,22 +1408,22 @@ class Document(Model):
1338
1408
  """Identifier for this file, which can be used to download or reuse the file."""
1339
1409
 
1340
1410
  file_unique_id: str
1341
- """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
1342
1412
  and for different bots. Can't be used to download or reuse the file."""
1343
1413
 
1344
1414
  thumbnail: Option["PhotoSize"] = Nothing
1345
- """Optional. Document thumbnail as defined by sender."""
1415
+ """Optional. Document thumbnail as defined by the sender."""
1346
1416
 
1347
1417
  file_name: Option[str] = Nothing
1348
- """Optional. Original filename as defined by sender."""
1418
+ """Optional. Original filename as defined by the sender."""
1349
1419
 
1350
1420
  mime_type: Option[str] = Nothing
1351
- """Optional. MIME type of the file as defined by sender."""
1421
+ """Optional. MIME type of the file as defined by the sender."""
1352
1422
 
1353
1423
  file_size: Option[int] = Nothing
1354
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1355
- languages may have difficulty/silent defects in interpreting it. But
1356
- 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
1357
1427
  float type are safe for storing this value."""
1358
1428
 
1359
1429
 
@@ -1380,31 +1450,31 @@ class Video(Model):
1380
1450
  """Identifier for this file, which can be used to download or reuse the file."""
1381
1451
 
1382
1452
  file_unique_id: str
1383
- """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
1384
1454
  and for different bots. Can't be used to download or reuse the file."""
1385
1455
 
1386
1456
  width: int
1387
- """Video width as defined by sender."""
1457
+ """Video width as defined by the sender."""
1388
1458
 
1389
1459
  height: int
1390
- """Video height as defined by sender."""
1460
+ """Video height as defined by the sender."""
1391
1461
 
1392
1462
  duration: int
1393
- """Duration of the video in seconds as defined by sender."""
1463
+ """Duration of the video in seconds as defined by the sender."""
1394
1464
 
1395
1465
  thumbnail: Option["PhotoSize"] = Nothing
1396
1466
  """Optional. Video thumbnail."""
1397
1467
 
1398
1468
  file_name: Option[str] = Nothing
1399
- """Optional. Original filename as defined by sender."""
1469
+ """Optional. Original filename as defined by the sender."""
1400
1470
 
1401
1471
  mime_type: Option[str] = Nothing
1402
- """Optional. MIME type of the file as defined by sender."""
1472
+ """Optional. MIME type of the file as defined by the sender."""
1403
1473
 
1404
1474
  file_size: Option[int] = Nothing
1405
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1406
- languages may have difficulty/silent defects in interpreting it. But
1407
- 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
1408
1478
  float type are safe for storing this value."""
1409
1479
 
1410
1480
 
@@ -1418,14 +1488,15 @@ class VideoNote(Model):
1418
1488
  """Identifier for this file, which can be used to download or reuse the file."""
1419
1489
 
1420
1490
  file_unique_id: str
1421
- """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
1422
1492
  and for different bots. Can't be used to download or reuse the file."""
1423
1493
 
1424
1494
  length: int
1425
- """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."""
1426
1497
 
1427
1498
  duration: int
1428
- """Duration of the video in seconds as defined by sender."""
1499
+ """Duration of the video in seconds as defined by the sender."""
1429
1500
 
1430
1501
  thumbnail: Option["PhotoSize"] = Nothing
1431
1502
  """Optional. Video thumbnail."""
@@ -1444,22 +1515,80 @@ class Voice(Model):
1444
1515
  """Identifier for this file, which can be used to download or reuse the file."""
1445
1516
 
1446
1517
  file_unique_id: str
1447
- """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
1448
1519
  and for different bots. Can't be used to download or reuse the file."""
1449
1520
 
1450
1521
  duration: int
1451
- """Duration of the audio in seconds as defined by sender."""
1522
+ """Duration of the audio in seconds as defined by the sender."""
1452
1523
 
1453
1524
  mime_type: Option[str] = Nothing
1454
- """Optional. MIME type of the file as defined by sender."""
1525
+ """Optional. MIME type of the file as defined by the sender."""
1455
1526
 
1456
1527
  file_size: Option[int] = Nothing
1457
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
1458
- languages may have difficulty/silent defects in interpreting it. But
1459
- 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
1460
1531
  float type are safe for storing this value."""
1461
1532
 
1462
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
+
1463
1592
  class Contact(Model):
1464
1593
  """Object `Contact`, see the [documentation](https://core.telegram.org/bots/api#contact).
1465
1594
 
@@ -1476,9 +1605,9 @@ class Contact(Model):
1476
1605
  """Optional. Contact's last name."""
1477
1606
 
1478
1607
  user_id: Option[int] = Nothing
1479
- """Optional. Contact's user identifier in Telegram. This number may have
1480
- more than 32 significant bits and some programming languages may have difficulty/silent
1481
- 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
1482
1611
  integer or double-precision float type are safe for storing this identifier."""
1483
1612
 
1484
1613
  vcard: Option[str] = Nothing
@@ -1495,7 +1624,7 @@ class Dice(Model):
1495
1624
  """Emoji on which the dice throw animation is based."""
1496
1625
 
1497
1626
  value: int
1498
- """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
1499
1628
  emoji, 1-64 for `🎰` base emoji."""
1500
1629
 
1501
1630
 
@@ -1512,25 +1641,25 @@ class PollOption(Model):
1512
1641
  """Number of users that voted for this option."""
1513
1642
 
1514
1643
  text_entities: Option[list["MessageEntity"]] = Nothing
1515
- """Optional. Special entities that appear in the option text. Currently,
1644
+ """Optional. Special entities that appear in the option text. Currently,
1516
1645
  only custom emoji entities are allowed in poll option texts."""
1517
1646
 
1518
1647
 
1519
1648
  class InputPollOption(Model):
1520
1649
  """Object `InputPollOption`, see the [documentation](https://core.telegram.org/bots/api#inputpolloption).
1521
1650
 
1522
- 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.
1523
1652
  """
1524
1653
 
1525
1654
  text: str
1526
1655
  """Option text, 1-100 characters."""
1527
1656
 
1528
1657
  text_parse_mode: Option[str] = Nothing
1529
- """Optional. Mode for parsing entities in the text. See formatting options
1658
+ """Optional. Mode for parsing entities in the text. See formatting options
1530
1659
  for more details. Currently, only custom emoji entities are allowed."""
1531
1660
 
1532
1661
  text_entities: Option[list["MessageEntity"]] = Nothing
1533
- """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
1534
1663
  poll option text. It can be specified instead of text_parse_mode."""
1535
1664
 
1536
1665
 
@@ -1544,14 +1673,14 @@ class PollAnswer(Model):
1544
1673
  """Unique poll identifier."""
1545
1674
 
1546
1675
  option_ids: list[int]
1547
- """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
1548
1677
  retracted."""
1549
1678
 
1550
1679
  voter_chat: Option["Chat"] = Nothing
1551
1680
  """Optional. The chat that changed the answer to the poll, if the voter is anonymous."""
1552
1681
 
1553
1682
  user: Option["User"] = Nothing
1554
- """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
1555
1684
  anonymous."""
1556
1685
 
1557
1686
 
@@ -1586,27 +1715,27 @@ class Poll(Model):
1586
1715
  """True, if the poll allows multiple answers."""
1587
1716
 
1588
1717
  question_entities: Option[list["MessageEntity"]] = Nothing
1589
- """Optional. Special entities that appear in the question. Currently, only
1718
+ """Optional. Special entities that appear in the question. Currently, only
1590
1719
  custom emoji entities are allowed in poll questions."""
1591
1720
 
1592
1721
  correct_option_id: Option[int] = Nothing
1593
- """Optional. 0-based identifier of the correct answer option. Available
1594
- 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)
1595
1724
  by the bot or to the private chat with the bot."""
1596
1725
 
1597
1726
  explanation: Option[str] = Nothing
1598
- """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
1599
1728
  on the lamp icon in a quiz-style poll, 0-200 characters."""
1600
1729
 
1601
1730
  explanation_entities: Option[list["MessageEntity"]] = Nothing
1602
- """Optional. Special entities like usernames, URLs, bot commands, etc. that
1731
+ """Optional. Special entities like usernames, URLs, bot commands, etc. that
1603
1732
  appear in the explanation."""
1604
1733
 
1605
1734
  open_period: Option[int] = Nothing
1606
1735
  """Optional. Amount of time in seconds the poll will be active after creation."""
1607
1736
 
1608
1737
  close_date: Option[datetime] = Nothing
1609
- """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
1610
1739
  closed."""
1611
1740
 
1612
1741
 
@@ -1617,25 +1746,25 @@ class Location(Model):
1617
1746
  """
1618
1747
 
1619
1748
  latitude: float
1620
- """Latitude as defined by sender."""
1749
+ """Latitude as defined by the sender."""
1621
1750
 
1622
1751
  longitude: float
1623
- """Longitude as defined by sender."""
1752
+ """Longitude as defined by the sender."""
1624
1753
 
1625
1754
  horizontal_accuracy: Option[float] = Nothing
1626
- """Optional. The radius of uncertainty for the location, measured in meters;
1755
+ """Optional. The radius of uncertainty for the location, measured in meters;
1627
1756
  0-1500."""
1628
1757
 
1629
1758
  live_period: Option[int] = Nothing
1630
- """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
1631
1760
  can be updated; in seconds. For active live locations only."""
1632
1761
 
1633
1762
  heading: Option[int] = Nothing
1634
- """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
1635
1764
  active live locations only."""
1636
1765
 
1637
1766
  proximity_alert_radius: Option[int] = Nothing
1638
- """Optional. The maximum distance for proximity alerts about approaching
1767
+ """Optional. The maximum distance for proximity alerts about approaching
1639
1768
  another chat member, in meters. For sent live locations only."""
1640
1769
 
1641
1770
 
@@ -1658,7 +1787,7 @@ class Venue(Model):
1658
1787
  """Optional. Foursquare identifier of the venue."""
1659
1788
 
1660
1789
  foursquare_type: Option[str] = Nothing
1661
- """Optional. Foursquare type of the venue. (For example, `arts_entertainment/default`,
1790
+ """Optional. Foursquare type of the venue. (For example, `arts_entertainment/default`,
1662
1791
  `arts_entertainment/aquarium` or `food/icecream`.)."""
1663
1792
 
1664
1793
  google_place_id: Option[str] = Nothing
@@ -1678,7 +1807,7 @@ class WebAppData(Model):
1678
1807
  """The data. Be aware that a bad client can send arbitrary data in this field."""
1679
1808
 
1680
1809
  button_text: str
1681
- """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
1682
1811
  aware that a bad client can send arbitrary data in this field."""
1683
1812
 
1684
1813
 
@@ -1760,7 +1889,7 @@ class BackgroundFillFreeformGradient(BackgroundFill):
1760
1889
  """Type of the background fill, always `freeform_gradient`."""
1761
1890
 
1762
1891
  colors: list[int]
1763
- """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
1764
1893
  in the RGB24 format."""
1765
1894
 
1766
1895
 
@@ -1796,7 +1925,7 @@ class BackgroundTypeWallpaper(BackgroundType):
1796
1925
  """Dimming of the background in dark themes, as a percentage; 0-100."""
1797
1926
 
1798
1927
  is_blurred: Option[bool] = Nothing
1799
- """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
1800
1929
  and then box-blurred with radius 12."""
1801
1930
 
1802
1931
  is_moving: Option[bool] = Nothing
@@ -1822,7 +1951,7 @@ class BackgroundTypePattern(BackgroundType):
1822
1951
  """Intensity of the pattern when it is shown above the filled background; 0-100."""
1823
1952
 
1824
1953
  is_inverted: Option[bool] = Nothing
1825
- """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
1826
1955
  itself. All other pixels are black in this case. For dark themes only."""
1827
1956
 
1828
1957
  is_moving: Option[bool] = Nothing
@@ -1887,7 +2016,7 @@ class ForumTopicEdited(Model):
1887
2016
  """Optional. New name of the topic, if it was edited."""
1888
2017
 
1889
2018
  icon_custom_emoji_id: Option[str] = Nothing
1890
- """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
1891
2020
  it was edited; an empty string if the icon was removed."""
1892
2021
 
1893
2022
 
@@ -1919,11 +2048,11 @@ class SharedUser(Model):
1919
2048
  """
1920
2049
 
1921
2050
  user_id: int
1922
- """Identifier of the shared user. This number may have more than 32 significant
1923
- bits and some programming languages may have difficulty/silent defects
1924
- in interpreting it. But it has at most 52 significant bits, so 64-bit integers
1925
- or double-precision float types are safe for storing these identifiers.
1926
- 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,
1927
2056
  unless the user is already known to the bot by some other means."""
1928
2057
 
1929
2058
  first_name: Option[str] = Nothing
@@ -1936,7 +2065,7 @@ class SharedUser(Model):
1936
2065
  """Optional. Username of the user, if the username was requested by the bot."""
1937
2066
 
1938
2067
  photo: Option[list["PhotoSize"]] = Nothing
1939
- """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
1940
2069
  by the bot."""
1941
2070
 
1942
2071
 
@@ -1963,22 +2092,22 @@ class ChatShared(Model):
1963
2092
  """Identifier of the request."""
1964
2093
 
1965
2094
  chat_id: int
1966
- """Identifier of the shared chat. This number may have more than 32 significant
1967
- bits and some programming languages may have difficulty/silent defects
1968
- in interpreting it. But it has at most 52 significant bits, so a 64-bit integer
1969
- or double-precision float type are safe for storing this identifier. The
1970
- 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,
1971
2100
  unless the chat is already known to the bot by some other means."""
1972
2101
 
1973
2102
  title: Option[str] = Nothing
1974
2103
  """Optional. Title of the chat, if the title was requested by the bot."""
1975
2104
 
1976
2105
  username: Option[str] = Nothing
1977
- """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
1978
2107
  and available."""
1979
2108
 
1980
2109
  photo: Option[list["PhotoSize"]] = Nothing
1981
- """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
1982
2111
  by the bot."""
1983
2112
 
1984
2113
 
@@ -1989,15 +2118,15 @@ class WriteAccessAllowed(Model):
1989
2118
  """
1990
2119
 
1991
2120
  from_request: Option[bool] = Nothing
1992
- """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
1993
2122
  request from a Web App sent by the method requestWriteAccess."""
1994
2123
 
1995
2124
  web_app_name: Option[str] = Nothing
1996
- """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
1997
2126
  launched from a link."""
1998
2127
 
1999
2128
  from_attachment_menu: Option[bool] = Nothing
2000
- """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
2001
2130
  or side menu."""
2002
2131
 
2003
2132
 
@@ -2008,7 +2137,7 @@ class VideoChatScheduled(Model):
2008
2137
  """
2009
2138
 
2010
2139
  start_date: datetime
2011
- """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
2012
2141
  by a chat administrator."""
2013
2142
 
2014
2143
 
@@ -2062,7 +2191,7 @@ class Giveaway(Model):
2062
2191
  """The number of users which are supposed to be selected as winners of the giveaway."""
2063
2192
 
2064
2193
  only_new_members: Option[bool] = Nothing
2065
- """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
2066
2195
  should be eligible to win."""
2067
2196
 
2068
2197
  has_public_winners: Option[bool] = Nothing
@@ -2072,13 +2201,13 @@ class Giveaway(Model):
2072
2201
  """Optional. Description of additional giveaway prize."""
2073
2202
 
2074
2203
  country_codes: Option[list[str]] = Nothing
2075
- """Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating
2076
- the countries from which eligible users for the giveaway must come. If empty,
2077
- 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
2078
2207
  that was bought on Fragment can always participate in giveaways."""
2079
2208
 
2080
2209
  premium_subscription_month_count: Option[int] = Nothing
2081
- """Optional. The number of months the Telegram Premium subscription won from
2210
+ """Optional. The number of months the Telegram Premium subscription won from
2082
2211
  the giveaway will be active for."""
2083
2212
 
2084
2213
 
@@ -2104,22 +2233,22 @@ class GiveawayWinners(Model):
2104
2233
  """List of up to 100 winners of the giveaway."""
2105
2234
 
2106
2235
  additional_chat_count: Option[int] = Nothing
2107
- """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
2108
2237
  for the giveaway."""
2109
2238
 
2110
2239
  premium_subscription_month_count: Option[int] = Nothing
2111
- """Optional. The number of months the Telegram Premium subscription won from
2240
+ """Optional. The number of months the Telegram Premium subscription won from
2112
2241
  the giveaway will be active for."""
2113
2242
 
2114
2243
  unclaimed_prize_count: Option[int] = Nothing
2115
2244
  """Optional. Number of undistributed prizes."""
2116
2245
 
2117
2246
  only_new_members: Option[bool] = Nothing
2118
- """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
2119
2248
  started were eligible to win."""
2120
2249
 
2121
2250
  was_refunded: Option[bool] = Nothing
2122
- """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
2123
2252
  was refunded."""
2124
2253
 
2125
2254
  prize_description: Option[str] = Nothing
@@ -2152,21 +2281,21 @@ class LinkPreviewOptions(Model):
2152
2281
  """Optional. True, if the link preview is disabled."""
2153
2282
 
2154
2283
  url: Option[str] = Nothing
2155
- """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
2156
2285
  in the message text will be used."""
2157
2286
 
2158
2287
  prefer_small_media: Option[bool] = Nothing
2159
- """Optional. True, if the media in the link preview is supposed to be shrunk;
2160
- 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
2161
2290
  supported for the preview."""
2162
2291
 
2163
2292
  prefer_large_media: Option[bool] = Nothing
2164
- """Optional. True, if the media in the link preview is supposed to be enlarged;
2165
- 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
2166
2295
  supported for the preview."""
2167
2296
 
2168
2297
  show_above_text: Option[bool] = Nothing
2169
- """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;
2170
2299
  otherwise, the link preview will be shown below the message text."""
2171
2300
 
2172
2301
 
@@ -2193,17 +2322,17 @@ class File(Model):
2193
2322
  """Identifier for this file, which can be used to download or reuse the file."""
2194
2323
 
2195
2324
  file_unique_id: str
2196
- """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
2197
2326
  and for different bots. Can't be used to download or reuse the file."""
2198
2327
 
2199
2328
  file_size: Option[int] = Nothing
2200
- """Optional. File size in bytes. It can be bigger than 2^31 and some programming
2201
- languages may have difficulty/silent defects in interpreting it. But
2202
- 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
2203
2332
  float type are safe for storing this value."""
2204
2333
 
2205
2334
  file_path: Option[str] = Nothing
2206
- """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>
2207
2336
  to get the file."""
2208
2337
 
2209
2338
 
@@ -2214,7 +2343,7 @@ class WebAppInfo(Model):
2214
2343
  """
2215
2344
 
2216
2345
  url: str
2217
- """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
2218
2347
  Initializing Web Apps."""
2219
2348
 
2220
2349
 
@@ -2228,32 +2357,32 @@ class ReplyKeyboardMarkup(Model):
2228
2357
  """Array of button rows, each represented by an Array of KeyboardButton objects."""
2229
2358
 
2230
2359
  is_persistent: Option[bool] = Nothing
2231
- """Optional. Requests clients to always show the keyboard when the regular
2232
- 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
2233
2362
  can be hidden and opened with a keyboard icon."""
2234
2363
 
2235
2364
  resize_keyboard: Option[bool] = Nothing
2236
- """Optional. Requests clients to resize the keyboard vertically for optimal
2237
- fit (e.g., make the keyboard smaller if there are just two rows of buttons).
2238
- 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
2239
2368
  height as the app's standard keyboard."""
2240
2369
 
2241
2370
  one_time_keyboard: Option[bool] = Nothing
2242
- """Optional. Requests clients to hide the keyboard as soon as it's been used.
2243
- The keyboard will still be available, but clients will automatically display
2244
- 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
2245
2374
  in the input field to see the custom keyboard again. Defaults to false."""
2246
2375
 
2247
2376
  input_field_placeholder: Option[str] = Nothing
2248
- """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
2249
2378
  is active; 1-64 characters."""
2250
2379
 
2251
2380
  selective: Option[bool] = Nothing
2252
- """Optional. Use this parameter if you want to show the keyboard to specific
2253
- users only. Targets: 1) users that are @mentioned in the text of the Message
2254
- object; 2) if the bot's message is a reply to a message in the same chat and
2255
- forum topic, sender of the original message. Example: A user requests to
2256
- 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
2257
2386
  select the new language. Other users in the group don't see the keyboard."""
2258
2387
 
2259
2388
  @property
@@ -2266,39 +2395,39 @@ class ReplyKeyboardMarkup(Model):
2266
2395
  class KeyboardButton(Model):
2267
2396
  """Object `KeyboardButton`, see the [documentation](https://core.telegram.org/bots/api#keyboardbutton).
2268
2397
 
2269
- 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.
2270
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.
2271
2400
  """
2272
2401
 
2273
2402
  text: str
2274
- """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
2275
2404
  as a message when the button is pressed."""
2276
2405
 
2277
2406
  request_users: Option["KeyboardButtonRequestUsers"] = Nothing
2278
- """Optional. If specified, pressing the button will open a list of suitable
2279
- 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`
2280
2409
  service message. Available in private chats only."""
2281
2410
 
2282
2411
  request_chat: Option["KeyboardButtonRequestChat"] = Nothing
2283
- """Optional. If specified, pressing the button will open a list of suitable
2284
- 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`
2285
2414
  service message. Available in private chats only."""
2286
2415
 
2287
2416
  request_contact: Option[bool] = Nothing
2288
- """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
2289
2418
  the button is pressed. Available in private chats only."""
2290
2419
 
2291
2420
  request_location: Option[bool] = Nothing
2292
- """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
2293
2422
  is pressed. Available in private chats only."""
2294
2423
 
2295
2424
  request_poll: Option["KeyboardButtonPollType"] = Nothing
2296
- """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
2297
2426
  to the bot when the button is pressed. Available in private chats only."""
2298
2427
 
2299
2428
  web_app: Option["WebAppInfo"] = Nothing
2300
- """Optional. If specified, the described Web App will be launched when the
2301
- 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
2302
2431
  message. Available in private chats only."""
2303
2432
 
2304
2433
 
@@ -2309,19 +2438,19 @@ class KeyboardButtonRequestUsers(Model):
2309
2438
  """
2310
2439
 
2311
2440
  request_id: int
2312
- """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
2313
2442
  UsersShared object. Must be unique within the message."""
2314
2443
 
2315
2444
  user_is_bot: Option[bool] = Nothing
2316
- """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.
2317
2446
  If not specified, no additional restrictions are applied."""
2318
2447
 
2319
2448
  user_is_premium: Option[bool] = Nothing
2320
- """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
2321
2450
  users. If not specified, no additional restrictions are applied."""
2322
2451
 
2323
2452
  max_quantity: Option[int] = Nothing
2324
- """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
2325
2454
  1."""
2326
2455
 
2327
2456
  request_name: Option[bool] = Nothing
@@ -2341,38 +2470,38 @@ class KeyboardButtonRequestChat(Model):
2341
2470
  """
2342
2471
 
2343
2472
  request_id: int
2344
- """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
2345
2474
  the ChatShared object. Must be unique within the message."""
2346
2475
 
2347
2476
  chat_is_channel: bool
2348
- """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
2349
2478
  chat."""
2350
2479
 
2351
2480
  chat_is_forum: Option[bool] = Nothing
2352
- """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
2353
2482
  a non-forum chat. If not specified, no additional restrictions are applied."""
2354
2483
 
2355
2484
  chat_has_username: Option[bool] = Nothing
2356
- """Optional. Pass True to request a supergroup or a channel with a username,
2357
- 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
2358
2487
  restrictions are applied."""
2359
2488
 
2360
2489
  chat_is_created: Option[bool] = Nothing
2361
- """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
2362
2491
  restrictions are applied."""
2363
2492
 
2364
2493
  user_administrator_rights: Option["ChatAdministratorRights"] = Nothing
2365
- """Optional. A JSON-serialized object listing the required administrator
2366
- 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.
2367
2496
  If not specified, no additional restrictions are applied."""
2368
2497
 
2369
2498
  bot_administrator_rights: Option["ChatAdministratorRights"] = Nothing
2370
- """Optional. A JSON-serialized object listing the required administrator
2371
- 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.
2372
2501
  If not specified, no additional restrictions are applied."""
2373
2502
 
2374
2503
  bot_is_member: Option[bool] = Nothing
2375
- """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,
2376
2505
  no additional restrictions are applied."""
2377
2506
 
2378
2507
  request_title: Option[bool] = Nothing
@@ -2392,8 +2521,8 @@ class KeyboardButtonPollType(Model):
2392
2521
  """
2393
2522
 
2394
2523
  type: Option[typing.Literal["quiz", "regular"]] = Nothing
2395
- """Optional. If quiz is passed, the user will be allowed to create only polls
2396
- 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.
2397
2526
  Otherwise, the user will be allowed to create a poll of any type."""
2398
2527
 
2399
2528
 
@@ -2404,17 +2533,17 @@ class ReplyKeyboardRemove(Model):
2404
2533
  """
2405
2534
 
2406
2535
  remove_keyboard: bool
2407
- """Requests clients to remove the custom keyboard (user will not be able to
2408
- 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
2409
2538
  it accessible, use one_time_keyboard in ReplyKeyboardMarkup)."""
2410
2539
 
2411
2540
  selective: Option[bool] = Nothing
2412
- """Optional. Use this parameter if you want to remove the keyboard for specific
2413
- users only. Targets: 1) users that are @mentioned in the text of the Message
2414
- object; 2) if the bot's message is a reply to a message in the same chat and
2415
- forum topic, sender of the original message. Example: A user votes in a poll,
2416
- bot returns confirmation message in reply to the vote and removes the keyboard
2417
- 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
2418
2547
  who haven't voted yet."""
2419
2548
 
2420
2549
 
@@ -2425,70 +2554,70 @@ class InlineKeyboardMarkup(Model):
2425
2554
  """
2426
2555
 
2427
2556
  inline_keyboard: list[list["InlineKeyboardButton"]]
2428
- """Array of button rows, each represented by an Array of InlineKeyboardButton
2557
+ """Array of button rows, each represented by an Array of InlineKeyboardButton
2429
2558
  objects."""
2430
2559
 
2431
2560
 
2432
2561
  class InlineKeyboardButton(Model):
2433
2562
  """Object `InlineKeyboardButton`, see the [documentation](https://core.telegram.org/bots/api#inlinekeyboardbutton).
2434
2563
 
2435
- 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.
2436
2565
  """
2437
2566
 
2438
2567
  text: str
2439
2568
  """Label text on the button."""
2440
2569
 
2441
2570
  url: Option[str] = Nothing
2442
- """Optional. HTTP or tg:// URL to be opened when the button is pressed. Links
2443
- 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
2444
2573
  without using a username, if this is allowed by their privacy settings."""
2445
2574
 
2446
2575
  callback_data: Option[str] = Nothing
2447
- """Optional. Data to be sent in a callback query to the bot when button is pressed,
2448
- 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business
2449
- account."""
2576
+ """Optional. Data to be sent in a callback query to the bot when the button is
2577
+ pressed, 1-64 bytes."""
2450
2578
 
2451
2579
  web_app: Option["WebAppInfo"] = Nothing
2452
- """Optional. Description of the Web App that will be launched when the user
2453
- presses the button. The Web App will be able to send an arbitrary message
2454
- on behalf of the user using the method answerWebAppQuery. Available only
2455
- 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
2456
2584
  on behalf of a Telegram Business account."""
2457
2585
 
2458
2586
  login_url: Option["LoginUrl"] = Nothing
2459
- """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
2460
2588
  used as a replacement for the Telegram Login Widget."""
2461
2589
 
2462
2590
  switch_inline_query: Option[str] = Nothing
2463
- """Optional. If set, pressing the button will prompt the user to select one
2464
- of their chats, open that chat and insert the bot's username and the specified
2465
- inline query in the input field. May be empty, in which case just the bot's
2466
- 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
2467
2595
  a Telegram Business account."""
2468
2596
 
2469
2597
  switch_inline_query_current_chat: Option[str] = Nothing
2470
- """Optional. If set, pressing the button will insert the bot's username and
2471
- the specified inline query in the current chat's input field. May be empty,
2472
- in which case only the bot's username will be inserted. This offers a quick
2473
- way for the user to open your bot in inline mode in the same chat - good for selecting
2474
- 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
2475
2603
  sent on behalf of a Telegram Business account."""
2476
2604
 
2477
2605
  switch_inline_query_chosen_chat: Option["SwitchInlineQueryChosenChat"] = Nothing
2478
- """Optional. If set, pressing the button will prompt the user to select one
2479
- of their chats of the specified type, open that chat and insert the bot's
2480
- 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
2481
2609
  for messages sent on behalf of a Telegram Business account."""
2482
2610
 
2483
2611
  callback_game: Option["CallbackGame"] = Nothing
2484
- """Optional. Description of the game that will be launched when the user presses
2485
- 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
2486
2614
  first row."""
2487
2615
 
2488
2616
  pay: Option[bool] = Nothing
2489
- """Optional. Specify True, to send a Pay button. NOTE: This type of button must
2490
- always be the first button in the first row and can only be used in invoice
2491
- 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."""
2492
2621
 
2493
2622
 
2494
2623
  class LoginUrl(Model):
@@ -2499,24 +2628,24 @@ class LoginUrl(Model):
2499
2628
  """
2500
2629
 
2501
2630
  url: str
2502
- """An HTTPS URL to be opened with user authorization data added to the query
2503
- string when the button is pressed. If the user refuses to provide authorization
2504
- data, the original URL without information about the user will be opened.
2505
- The data added is the same as described in Receiving authorization data.
2506
- 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
2507
2636
  and the integrity of the data as described in Checking authorization."""
2508
2637
 
2509
2638
  forward_text: Option[str] = Nothing
2510
2639
  """Optional. New text of the button in forwarded messages."""
2511
2640
 
2512
2641
  bot_username: Option[str] = Nothing
2513
- """Optional. Username of a bot, which will be used for user authorization.
2514
- See Setting up a bot for more details. If not specified, the current bot's
2515
- 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
2516
2645
  linked with the bot. See Linking your domain to the bot for more details."""
2517
2646
 
2518
2647
  request_write_access: Option[bool] = Nothing
2519
- """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
2520
2649
  to the user."""
2521
2650
 
2522
2651
 
@@ -2527,7 +2656,7 @@ class SwitchInlineQueryChosenChat(Model):
2527
2656
  """
2528
2657
 
2529
2658
  query: Option[str] = Nothing
2530
- """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
2531
2660
  left empty, only the bot's username will be inserted."""
2532
2661
 
2533
2662
  allow_user_chats: Option[bool] = Nothing
@@ -2556,23 +2685,23 @@ class CallbackQuery(Model):
2556
2685
  """Sender."""
2557
2686
 
2558
2687
  chat_instance: str
2559
- """Global identifier, uniquely corresponding to the chat to which the message
2688
+ """Global identifier, uniquely corresponding to the chat to which the message
2560
2689
  with the callback button was sent. Useful for high scores in games."""
2561
2690
 
2562
2691
  message: Option[Variative["Message", "InaccessibleMessage"]] = Nothing
2563
- """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
2564
2693
  the query."""
2565
2694
 
2566
2695
  inline_message_id: Option[str] = Nothing
2567
- """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
2568
2697
  originated the query."""
2569
2698
 
2570
2699
  data: Option[str] = Nothing
2571
- """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
2572
2701
  originated the query can contain no callback buttons with this data."""
2573
2702
 
2574
2703
  game_short_name: Option[str] = Nothing
2575
- """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
2576
2705
  for the game."""
2577
2706
 
2578
2707
 
@@ -2583,17 +2712,17 @@ class ForceReply(Model):
2583
2712
  """
2584
2713
 
2585
2714
  force_reply: bool
2586
- """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
2587
2716
  message and tapped 'Reply'."""
2588
2717
 
2589
2718
  input_field_placeholder: Option[str] = Nothing
2590
- """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
2591
2720
  active; 1-64 characters."""
2592
2721
 
2593
2722
  selective: Option[bool] = Nothing
2594
- """Optional. Use this parameter if you want to force reply from specific users
2595
- only. Targets: 1) users that are @mentioned in the text of the Message object;
2596
- 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,
2597
2726
  sender of the original message."""
2598
2727
 
2599
2728
 
@@ -2604,21 +2733,21 @@ class ChatPhoto(Model):
2604
2733
  """
2605
2734
 
2606
2735
  small_file_id: str
2607
- """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
2608
2737
  only for photo download and only for as long as the photo is not changed."""
2609
2738
 
2610
2739
  small_file_unique_id: str
2611
- """Unique file identifier of small (160x160) chat photo, which is supposed
2612
- 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
2613
2742
  or reuse the file."""
2614
2743
 
2615
2744
  big_file_id: str
2616
- """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
2617
2746
  for photo download and only for as long as the photo is not changed."""
2618
2747
 
2619
2748
  big_file_unique_id: str
2620
- """Unique file identifier of big (640x640) chat photo, which is supposed to
2621
- 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
2622
2751
  reuse the file."""
2623
2752
 
2624
2753
 
@@ -2629,7 +2758,7 @@ class ChatInviteLink(Model):
2629
2758
  """
2630
2759
 
2631
2760
  invite_link: str
2632
- """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,
2633
2762
  then the second part of the link will be replaced with `...`."""
2634
2763
 
2635
2764
  creator: "User"
@@ -2648,11 +2777,11 @@ class ChatInviteLink(Model):
2648
2777
  """Optional. Invite link name."""
2649
2778
 
2650
2779
  expire_date: Option[datetime] = Nothing
2651
- """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
2652
2781
  been expired."""
2653
2782
 
2654
2783
  member_limit: Option[int] = Nothing
2655
- """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
2656
2785
  after joining the chat via this invite link; 1-99999."""
2657
2786
 
2658
2787
  pending_join_request_count: Option[int] = Nothing
@@ -2669,8 +2798,8 @@ class ChatAdministratorRights(Model):
2669
2798
  """True, if the user's presence in the chat is hidden."""
2670
2799
 
2671
2800
  can_manage_chat: bool
2672
- """True, if the administrator can access the chat event log, get boost list,
2673
- 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
2674
2803
  slow mode. Implied by any other administrator privilege."""
2675
2804
 
2676
2805
  can_delete_messages: bool
@@ -2680,12 +2809,12 @@ class ChatAdministratorRights(Model):
2680
2809
  """True, if the administrator can manage video chats."""
2681
2810
 
2682
2811
  can_restrict_members: bool
2683
- """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
2684
2813
  supergroup statistics."""
2685
2814
 
2686
2815
  can_promote_members: bool
2687
- """True, if the administrator can add new administrators with a subset of their
2688
- 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
2689
2818
  or indirectly (promoted by administrators that were appointed by the user)."""
2690
2819
 
2691
2820
  can_change_info: bool
@@ -2698,26 +2827,26 @@ class ChatAdministratorRights(Model):
2698
2827
  """True, if the administrator can post stories to the chat."""
2699
2828
 
2700
2829
  can_edit_stories: bool
2701
- """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
2702
2831
  stories to the chat page, pin chat stories, and access the chat's story archive."""
2703
2832
 
2704
2833
  can_delete_stories: bool
2705
2834
  """True, if the administrator can delete stories posted by other users."""
2706
2835
 
2707
2836
  can_post_messages: Option[bool] = Nothing
2708
- """Optional. True, if the administrator can post messages in the channel,
2837
+ """Optional. True, if the administrator can post messages in the channel,
2709
2838
  or access channel statistics; for channels only."""
2710
2839
 
2711
2840
  can_edit_messages: Option[bool] = Nothing
2712
- """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
2713
2842
  can pin messages; for channels only."""
2714
2843
 
2715
2844
  can_pin_messages: Option[bool] = Nothing
2716
- """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
2717
2846
  only."""
2718
2847
 
2719
2848
  can_manage_topics: Option[bool] = Nothing
2720
- """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
2721
2850
  forum topics; for supergroups only."""
2722
2851
 
2723
2852
 
@@ -2757,11 +2886,11 @@ class ChatMemberUpdated(Model):
2757
2886
  """New information about the chat member."""
2758
2887
 
2759
2888
  invite_link: Option["ChatInviteLink"] = Nothing
2760
- """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
2761
2890
  joining by invite link events only."""
2762
2891
 
2763
2892
  via_join_request: Option[bool] = Nothing
2764
- """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
2765
2894
  without using an invite link and being approved by an administrator."""
2766
2895
 
2767
2896
  via_chat_folder_invite_link: Option[bool] = Nothing
@@ -2812,8 +2941,8 @@ class ChatMemberAdministrator(ChatMember):
2812
2941
  """True, if the user's presence in the chat is hidden."""
2813
2942
 
2814
2943
  can_manage_chat: bool
2815
- """True, if the administrator can access the chat event log, get boost list,
2816
- 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
2817
2946
  slow mode. Implied by any other administrator privilege."""
2818
2947
 
2819
2948
  can_delete_messages: bool
@@ -2823,12 +2952,12 @@ class ChatMemberAdministrator(ChatMember):
2823
2952
  """True, if the administrator can manage video chats."""
2824
2953
 
2825
2954
  can_restrict_members: bool
2826
- """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
2827
2956
  supergroup statistics."""
2828
2957
 
2829
2958
  can_promote_members: bool
2830
- """True, if the administrator can add new administrators with a subset of their
2831
- 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
2832
2961
  or indirectly (promoted by administrators that were appointed by the user)."""
2833
2962
 
2834
2963
  can_change_info: bool
@@ -2841,26 +2970,26 @@ class ChatMemberAdministrator(ChatMember):
2841
2970
  """True, if the administrator can post stories to the chat."""
2842
2971
 
2843
2972
  can_edit_stories: bool
2844
- """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
2845
2974
  stories to the chat page, pin chat stories, and access the chat's story archive."""
2846
2975
 
2847
2976
  can_delete_stories: bool
2848
2977
  """True, if the administrator can delete stories posted by other users."""
2849
2978
 
2850
2979
  can_post_messages: Option[bool] = Nothing
2851
- """Optional. True, if the administrator can post messages in the channel,
2980
+ """Optional. True, if the administrator can post messages in the channel,
2852
2981
  or access channel statistics; for channels only."""
2853
2982
 
2854
2983
  can_edit_messages: Option[bool] = Nothing
2855
- """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
2856
2985
  can pin messages; for channels only."""
2857
2986
 
2858
2987
  can_pin_messages: Option[bool] = Nothing
2859
- """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
2860
2989
  only."""
2861
2990
 
2862
2991
  can_manage_topics: Option[bool] = Nothing
2863
- """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
2864
2993
  forum topics; for supergroups only."""
2865
2994
 
2866
2995
  custom_title: Option[str] = Nothing
@@ -2896,7 +3025,7 @@ class ChatMemberRestricted(ChatMember):
2896
3025
  """True, if the user is a member of the chat at the moment of the request."""
2897
3026
 
2898
3027
  can_send_messages: bool
2899
- """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,
2900
3029
  giveaway winners, invoices, locations and venues."""
2901
3030
 
2902
3031
  can_send_audios: bool
@@ -2921,7 +3050,7 @@ class ChatMemberRestricted(ChatMember):
2921
3050
  """True, if the user is allowed to send polls."""
2922
3051
 
2923
3052
  can_send_other_messages: bool
2924
- """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
2925
3054
  inline bots."""
2926
3055
 
2927
3056
  can_add_web_page_previews: bool
@@ -2940,7 +3069,7 @@ class ChatMemberRestricted(ChatMember):
2940
3069
  """True, if the user is allowed to create forum topics."""
2941
3070
 
2942
3071
  until_date: datetime
2943
- """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
2944
3073
  the user is restricted forever."""
2945
3074
 
2946
3075
 
@@ -2970,7 +3099,7 @@ class ChatMemberBanned(ChatMember):
2970
3099
  """Information about the user."""
2971
3100
 
2972
3101
  until_date: datetime
2973
- """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
2974
3103
  the user is banned forever."""
2975
3104
 
2976
3105
 
@@ -2987,12 +3116,12 @@ class ChatJoinRequest(Model):
2987
3116
  """User that sent the join request."""
2988
3117
 
2989
3118
  user_chat_id: int
2990
- """Identifier of a private chat with the user who sent the join request. This
2991
- number may have more than 32 significant bits and some programming languages
2992
- may have difficulty/silent defects in interpreting it. But it has at most
2993
- 52 significant bits, so a 64-bit integer or double-precision float type
2994
- are safe for storing this identifier. The bot can use this identifier for
2995
- 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
2996
3125
  no other administrator contacted the user."""
2997
3126
 
2998
3127
  date: datetime
@@ -3018,7 +3147,7 @@ class ChatPermissions(Model):
3018
3147
  """
3019
3148
 
3020
3149
  can_send_messages: Option[bool] = Nothing
3021
- """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,
3022
3151
  giveaways, giveaway winners, invoices, locations and venues."""
3023
3152
 
3024
3153
  can_send_audios: Option[bool] = Nothing
@@ -3043,25 +3172,25 @@ class ChatPermissions(Model):
3043
3172
  """Optional. True, if the user is allowed to send polls."""
3044
3173
 
3045
3174
  can_send_other_messages: Option[bool] = Nothing
3046
- """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
3047
3176
  and use inline bots."""
3048
3177
 
3049
3178
  can_add_web_page_previews: Option[bool] = Nothing
3050
3179
  """Optional. True, if the user is allowed to add web page previews to their messages."""
3051
3180
 
3052
3181
  can_change_info: Option[bool] = Nothing
3053
- """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
3054
3183
  other settings. Ignored in public supergroups."""
3055
3184
 
3056
3185
  can_invite_users: Option[bool] = Nothing
3057
3186
  """Optional. True, if the user is allowed to invite new users to the chat."""
3058
3187
 
3059
3188
  can_pin_messages: Option[bool] = Nothing
3060
- """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
3061
3190
  supergroups."""
3062
3191
 
3063
3192
  can_manage_topics: Option[bool] = Nothing
3064
- """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
3065
3194
  defaults to the value of can_pin_messages."""
3066
3195
 
3067
3196
 
@@ -3132,11 +3261,11 @@ class BusinessOpeningHoursInterval(Model):
3132
3261
  """
3133
3262
 
3134
3263
  opening_minute: int
3135
- """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
3136
3265
  start of the time interval during which the business is open; 0 - 7 * 24 * 60."""
3137
3266
 
3138
3267
  closing_minute: int
3139
- """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
3140
3269
  end of the time interval during which the business is open; 0 - 8 * 24 * 60."""
3141
3270
 
3142
3271
 
@@ -3176,11 +3305,11 @@ class ReactionTypeEmoji(ReactionType):
3176
3305
  """Type of the reaction, always `emoji`."""
3177
3306
 
3178
3307
  emoji: ReactionEmoji
3179
- """Reaction emoji. Currently, it can be one of `👍`, `👎`, `❤`, `🔥`, `🥰`, `👏`,
3180
- `😁`, `🤔`, `🤯`, `😱`, `🤬`, `😢`, `🎉`, `🤩`, `🤮`, `💩`, `🙏`, `👌`, `🕊`, `🤡`, `🥱`,
3181
- `🥴`, `😍`, `🐳`, `❤‍🔥`, `🌚`, `🌭`, `💯`, `🤣`, `⚡`, `🍌`, `🏆`, `💔`, `🤨`, `😐`, `🍓`,
3182
- `🍾`, `💋`, `🖕`, `😈`, `😴`, `😭`, `🤓`, `👻`, `👨‍💻`, `👀`, `🎃`, `🙈`, `😇`, `😨`, `🤝`,
3183
- `✍`, `🤗`, `🫡`, `🎅`, `🎄`, `☃`, `💅`, `🤪`, `🗿`, `🆒`, `💘`, `🙉`, `🦄`, `😘`, `💊`,
3308
+ """Reaction emoji. Currently, it can be one of `👍`, `👎`, `❤`, `🔥`, `🥰`, `👏`,
3309
+ `😁`, `🤔`, `🤯`, `😱`, `🤬`, `😢`, `🎉`, `🤩`, `🤮`, `💩`, `🙏`, `👌`, `🕊`, `🤡`, `🥱`,
3310
+ `🥴`, `😍`, `🐳`, `❤‍🔥`, `🌚`, `🌭`, `💯`, `🤣`, `⚡`, `🍌`, `🏆`, `💔`, `🤨`, `😐`, `🍓`,
3311
+ `🍾`, `💋`, `🖕`, `😈`, `😴`, `😭`, `🤓`, `👻`, `👨‍💻`, `👀`, `🎃`, `🙈`, `😇`, `😨`, `🤝`,
3312
+ `✍`, `🤗`, `🫡`, `🎅`, `🎄`, `☃`, `💅`, `🤪`, `🗿`, `🆒`, `💘`, `🙉`, `🦄`, `😘`, `💊`,
3184
3313
  `🙊`, `😎`, `👾`, `🤷‍♂`, `🤷`, `🤷‍♀`, `😡`."""
3185
3314
 
3186
3315
 
@@ -3235,7 +3364,7 @@ class MessageReactionUpdated(Model):
3235
3364
  """Optional. The user that changed the reaction, if the user isn't anonymous."""
3236
3365
 
3237
3366
  actor_chat: Option["Chat"] = Nothing
3238
- """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
3239
3368
  is anonymous."""
3240
3369
 
3241
3370
 
@@ -3284,7 +3413,7 @@ class BotCommand(Model):
3284
3413
  """
3285
3414
 
3286
3415
  command: str
3287
- """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
3288
3417
  letters, digits and underscores."""
3289
3418
 
3290
3419
  description: str
@@ -3341,7 +3470,7 @@ class BotCommandScopeChat(BotCommandScope):
3341
3470
  """Scope type, must be chat."""
3342
3471
 
3343
3472
  chat_id: Variative[int, str]
3344
- """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
3345
3474
  (in the format @supergroupusername)."""
3346
3475
 
3347
3476
 
@@ -3355,7 +3484,7 @@ class BotCommandScopeChatAdministrators(BotCommandScope):
3355
3484
  """Scope type, must be chat_administrators."""
3356
3485
 
3357
3486
  chat_id: Variative[int, str]
3358
- """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
3359
3488
  (in the format @supergroupusername)."""
3360
3489
 
3361
3490
 
@@ -3369,7 +3498,7 @@ class BotCommandScopeChatMember(BotCommandScope):
3369
3498
  """Scope type, must be chat_member."""
3370
3499
 
3371
3500
  chat_id: Variative[int, str]
3372
- """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
3373
3502
  (in the format @supergroupusername)."""
3374
3503
 
3375
3504
  user_id: int
@@ -3429,9 +3558,11 @@ class MenuButtonWebApp(MenuButton):
3429
3558
  """Text on the button."""
3430
3559
 
3431
3560
  web_app: "WebAppInfo"
3432
- """Description of the Web App that will be launched when the user presses the
3433
- button. The Web App will be able to send an arbitrary message on behalf of
3434
- 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."""
3435
3566
 
3436
3567
 
3437
3568
  class MenuButtonDefault(MenuButton):
@@ -3480,14 +3611,14 @@ class ChatBoostSourceGiveaway(ChatBoostSource):
3480
3611
  """Source of the boost, always `giveaway`."""
3481
3612
 
3482
3613
  giveaway_message_id: int
3483
- """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
3484
3615
  have been deleted already. May be 0 if the message isn't sent yet."""
3485
3616
 
3486
3617
  user: Option["User"] = Nothing
3487
3618
  """Optional. User that won the prize in the giveaway if any."""
3488
3619
 
3489
3620
  is_unclaimed: Option[bool] = Nothing
3490
- """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
3491
3622
  the prize."""
3492
3623
 
3493
3624
 
@@ -3504,7 +3635,7 @@ class ChatBoost(Model):
3504
3635
  """Point in time (Unix timestamp) when the chat was boosted."""
3505
3636
 
3506
3637
  expiration_date: datetime
3507
- """Point in time (Unix timestamp) when the boost will automatically expire,
3638
+ """Point in time (Unix timestamp) when the boost will automatically expire,
3508
3639
  unless the booster's Telegram Premium subscription is prolonged."""
3509
3640
 
3510
3641
  source: Variative["ChatBoostSourcePremium", "ChatBoostSourceGiftCode", "ChatBoostSourceGiveaway"]
@@ -3566,17 +3697,17 @@ class BusinessConnection(Model):
3566
3697
  """Business account user that created the business connection."""
3567
3698
 
3568
3699
  user_chat_id: int
3569
- """Identifier of a private chat with the user who created the business connection.
3570
- This number may have more than 32 significant bits and some programming
3571
- languages may have difficulty/silent defects in interpreting it. But
3572
- 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
3573
3704
  float type are safe for storing this identifier."""
3574
3705
 
3575
3706
  date: datetime
3576
3707
  """Date the connection was established in Unix time."""
3577
3708
 
3578
3709
  can_reply: bool
3579
- """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
3580
3711
  active in the last 24 hours."""
3581
3712
 
3582
3713
  is_enabled: bool
@@ -3593,7 +3724,7 @@ class BusinessMessagesDeleted(Model):
3593
3724
  """Unique identifier of the business connection."""
3594
3725
 
3595
3726
  chat: "Chat"
3596
- """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
3597
3728
  to the chat or the corresponding user."""
3598
3729
 
3599
3730
  message_ids: list[int]
@@ -3607,14 +3738,14 @@ class ResponseParameters(Model):
3607
3738
  """
3608
3739
 
3609
3740
  migrate_to_chat_id: Option[int] = Nothing
3610
- """Optional. The group has been migrated to a supergroup with the specified
3611
- identifier. This number may have more than 32 significant bits and some
3612
- programming languages may have difficulty/silent defects in interpreting
3613
- 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
3614
3745
  float type are safe for storing this identifier."""
3615
3746
 
3616
3747
  retry_after: Option[int] = Nothing
3617
- """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
3618
3749
  to wait before the request can be repeated."""
3619
3750
 
3620
3751
 
@@ -3628,23 +3759,26 @@ class InputMediaPhoto(InputMedia):
3628
3759
  """Type of the result, must be photo."""
3629
3760
 
3630
3761
  media: Variative["InputFile", str]
3631
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3632
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3633
- 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
3634
3765
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3635
3766
 
3636
3767
  caption: Option[str] = Nothing
3637
- """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
3638
3769
  parsing."""
3639
3770
 
3640
3771
  parse_mode: Option[str] = Nothing
3641
- """Optional. Mode for parsing entities in the photo caption. See formatting
3772
+ """Optional. Mode for parsing entities in the photo caption. See formatting
3642
3773
  options for more details."""
3643
3774
 
3644
3775
  caption_entities: Option[list["MessageEntity"]] = Nothing
3645
- """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
3646
3777
  be specified instead of parse_mode."""
3647
3778
 
3779
+ show_caption_above_media: Option[bool] = Nothing
3780
+ """Optional. Pass True, if the caption must be shown above the message media."""
3781
+
3648
3782
  has_spoiler: Option[bool] = Nothing
3649
3783
  """Optional. Pass True if the photo needs to be covered with a spoiler animation."""
3650
3784
 
@@ -3659,32 +3793,35 @@ class InputMediaVideo(InputMedia):
3659
3793
  """Type of the result, must be video."""
3660
3794
 
3661
3795
  media: Variative["InputFile", str]
3662
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3663
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3664
- 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
3665
3799
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3666
3800
 
3667
3801
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3668
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3669
- for the file is supported server-side. The thumbnail should be in JPEG format
3670
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3671
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3672
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3673
- 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>.
3674
3808
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3675
3809
 
3676
3810
  caption: Option[str] = Nothing
3677
- """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
3678
3812
  parsing."""
3679
3813
 
3680
3814
  parse_mode: Option[str] = Nothing
3681
- """Optional. Mode for parsing entities in the video caption. See formatting
3815
+ """Optional. Mode for parsing entities in the video caption. See formatting
3682
3816
  options for more details."""
3683
3817
 
3684
3818
  caption_entities: Option[list["MessageEntity"]] = Nothing
3685
- """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
3686
3820
  be specified instead of parse_mode."""
3687
3821
 
3822
+ show_caption_above_media: Option[bool] = Nothing
3823
+ """Optional. Pass True, if the caption must be shown above the message media."""
3824
+
3688
3825
  width: Option[int] = Nothing
3689
3826
  """Optional. Video width."""
3690
3827
 
@@ -3711,32 +3848,35 @@ class InputMediaAnimation(InputMedia):
3711
3848
  """Type of the result, must be animation."""
3712
3849
 
3713
3850
  media: Variative["InputFile", str]
3714
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3715
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3716
- 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
3717
3854
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3718
3855
 
3719
3856
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3720
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3721
- for the file is supported server-side. The thumbnail should be in JPEG format
3722
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3723
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3724
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3725
- 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>.
3726
3863
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3727
3864
 
3728
3865
  caption: Option[str] = Nothing
3729
- """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
3730
3867
  entities parsing."""
3731
3868
 
3732
3869
  parse_mode: Option[str] = Nothing
3733
- """Optional. Mode for parsing entities in the animation caption. See formatting
3870
+ """Optional. Mode for parsing entities in the animation caption. See formatting
3734
3871
  options for more details."""
3735
3872
 
3736
3873
  caption_entities: Option[list["MessageEntity"]] = Nothing
3737
- """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
3738
3875
  be specified instead of parse_mode."""
3739
3876
 
3877
+ show_caption_above_media: Option[bool] = Nothing
3878
+ """Optional. Pass True, if the caption must be shown above the message media."""
3879
+
3740
3880
  width: Option[int] = Nothing
3741
3881
  """Optional. Animation width."""
3742
3882
 
@@ -3760,30 +3900,30 @@ class InputMediaAudio(InputMedia):
3760
3900
  """Type of the result, must be audio."""
3761
3901
 
3762
3902
  media: Variative["InputFile", str]
3763
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3764
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3765
- 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
3766
3906
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3767
3907
 
3768
3908
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3769
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3770
- for the file is supported server-side. The thumbnail should be in JPEG format
3771
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3772
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3773
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3774
- 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>.
3775
3915
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3776
3916
 
3777
3917
  caption: Option[str] = Nothing
3778
- """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
3779
3919
  parsing."""
3780
3920
 
3781
3921
  parse_mode: Option[str] = Nothing
3782
- """Optional. Mode for parsing entities in the audio caption. See formatting
3922
+ """Optional. Mode for parsing entities in the audio caption. See formatting
3783
3923
  options for more details."""
3784
3924
 
3785
3925
  caption_entities: Option[list["MessageEntity"]] = Nothing
3786
- """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
3787
3927
  be specified instead of parse_mode."""
3788
3928
 
3789
3929
  duration: Option[int] = Nothing
@@ -3806,35 +3946,35 @@ class InputMediaDocument(InputMedia):
3806
3946
  """Type of the result, must be document."""
3807
3947
 
3808
3948
  media: Variative["InputFile", str]
3809
- """File to send. Pass a file_id to send a file that exists on the Telegram servers
3810
- (recommended), pass an HTTP URL for Telegram to get a file from the Internet,
3811
- 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
3812
3952
  under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3813
3953
 
3814
3954
  thumbnail: Option[Variative["InputFile", str]] = Nothing
3815
- """Optional. Thumbnail of the file sent; can be ignored if thumbnail generation
3816
- for the file is supported server-side. The thumbnail should be in JPEG format
3817
- and less than 200 kB in size. A thumbnail's width and height should not exceed
3818
- 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails
3819
- can't be reused and can be only uploaded as a new file, so you can pass `attach://<file_attach_name>`
3820
- 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>.
3821
3961
  More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3822
3962
 
3823
3963
  caption: Option[str] = Nothing
3824
- """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
3825
3965
  parsing."""
3826
3966
 
3827
3967
  parse_mode: Option[str] = Nothing
3828
- """Optional. Mode for parsing entities in the document caption. See formatting
3968
+ """Optional. Mode for parsing entities in the document caption. See formatting
3829
3969
  options for more details."""
3830
3970
 
3831
3971
  caption_entities: Option[list["MessageEntity"]] = Nothing
3832
- """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
3833
3973
  be specified instead of parse_mode."""
3834
3974
 
3835
3975
  disable_content_type_detection: Option[bool] = Nothing
3836
- """Optional. Disables automatic server-side content type detection for
3837
- 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
3838
3978
  is sent as part of an album."""
3839
3979
 
3840
3980
 
@@ -3850,6 +3990,67 @@ class InputFile(typing.NamedTuple):
3850
3990
  data: bytes
3851
3991
  """Bytes of file."""
3852
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
+
3853
4054
 
3854
4055
  class Sticker(Model):
3855
4056
  """Object `Sticker`, see the [documentation](https://core.telegram.org/bots/api#sticker).
@@ -3861,12 +4062,12 @@ class Sticker(Model):
3861
4062
  """Identifier for this file, which can be used to download or reuse the file."""
3862
4063
 
3863
4064
  file_unique_id: str
3864
- """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
3865
4066
  and for different bots. Can't be used to download or reuse the file."""
3866
4067
 
3867
4068
  type: typing.Literal["regular", "mask", "custom_emoji"]
3868
- """Type of the sticker, currently one of `regular`, `mask`, `custom_emoji`.
3869
- 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
3870
4071
  by the fields is_animated and is_video."""
3871
4072
 
3872
4073
  width: int
@@ -3900,8 +4101,8 @@ class Sticker(Model):
3900
4101
  """Optional. For custom emoji stickers, unique identifier of the custom emoji."""
3901
4102
 
3902
4103
  needs_repainting: Option[bool] = Nothing
3903
- """Optional. True, if the sticker must be repainted to a text color in messages,
3904
- 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
3905
4106
  photos, or another appropriate color in other places."""
3906
4107
 
3907
4108
  file_size: Option[int] = Nothing
@@ -3937,17 +4138,17 @@ class MaskPosition(Model):
3937
4138
  """
3938
4139
 
3939
4140
  point: str
3940
- """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`,
3941
4142
  `eyes`, `mouth`, or `chin`."""
3942
4143
 
3943
4144
  x_shift: float
3944
- """Shift by X-axis measured in widths of the mask scaled to the face size, from
3945
- 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
3946
4147
  of the default mask position."""
3947
4148
 
3948
4149
  y_shift: float
3949
- """Shift by Y-axis measured in heights of the mask scaled to the face size, from
3950
- 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
3951
4152
  mask position."""
3952
4153
 
3953
4154
  scale: float
@@ -3961,26 +4162,26 @@ class InputSticker(Model):
3961
4162
  """
3962
4163
 
3963
4164
  sticker: Variative["InputFile", str]
3964
- """The added sticker. Pass a file_id as a String to send a file that already exists
3965
- on the Telegram servers, pass an HTTP URL as a String for Telegram to get a
3966
- file from the Internet, upload a new one using multipart/form-data, or
3967
- pass `attach://<file_attach_name>` to upload a new one using multipart/form-data
3968
- 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
3969
4170
  via HTTP URL. More information on Sending Files: https://core.telegram.org/bots/api#sending-files."""
3970
4171
 
3971
4172
  format: str
3972
- """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,
3973
4174
  `animated` for a .TGS animation, `video` for a WEBM video."""
3974
4175
 
3975
4176
  emoji_list: list[str]
3976
4177
  """List of 1-20 emoji associated with the sticker."""
3977
4178
 
3978
4179
  mask_position: Option["MaskPosition"] = Nothing
3979
- """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`
3980
4181
  stickers only."""
3981
4182
 
3982
4183
  keywords: Option[list[str]] = Nothing
3983
- """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
3984
4185
  of up to 64 characters. For `regular` and `custom_emoji` stickers only."""
3985
4186
 
3986
4187
 
@@ -4003,10 +4204,10 @@ class InlineQuery(Model):
4003
4204
  """Offset of the results to be returned, can be controlled by the bot."""
4004
4205
 
4005
4206
  chat_type: Option[ChatType] = Nothing
4006
- """Optional. Type of the chat from which the inline query was sent. Can be either
4007
- `sender` for a private chat with the inline query sender, `private`, `group`,
4008
- `supergroup`, or `channel`. The chat type should be always known for requests
4009
- 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
4010
4211
  was sent from a secret chat."""
4011
4212
 
4012
4213
  location: Option["Location"] = Nothing
@@ -4023,20 +4224,20 @@ class InlineQueryResultsButton(Model):
4023
4224
  """Label text on the button."""
4024
4225
 
4025
4226
  web_app: Option["WebAppInfo"] = Nothing
4026
- """Optional. Description of the Web App that will be launched when the user
4027
- 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
4028
4229
  using the method switchInlineQuery inside the Web App."""
4029
4230
 
4030
4231
  start_parameter: Option[str] = Nothing
4031
- """Optional. Deep-linking parameter for the /start message sent to the bot
4032
- when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and
4033
- - are allowed. Example: An inline bot that sends YouTube videos can ask the
4034
- user to connect the bot to their YouTube account to adapt search results
4035
- accordingly. To do this, it displays a 'Connect your YouTube account' button
4036
- above the results, or even before showing any. The user presses the button,
4037
- switches to a private chat with the bot and, in doing so, passes a start parameter
4038
- that instructs the bot to return an OAuth link. Once done, the bot can offer
4039
- 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
4040
4241
  they wanted to use the bot's inline capabilities."""
4041
4242
 
4042
4243
 
@@ -4099,7 +4300,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
4099
4300
  """Unique identifier for this result, 1-64 bytes."""
4100
4301
 
4101
4302
  photo_url: str
4102
- """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
4103
4304
  exceed 5MB."""
4104
4305
 
4105
4306
  thumbnail_url: str
@@ -4118,17 +4319,20 @@ class InlineQueryResultPhoto(InlineQueryResult):
4118
4319
  """Optional. Short description of the result."""
4119
4320
 
4120
4321
  caption: Option[str] = Nothing
4121
- """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
4122
4323
  parsing."""
4123
4324
 
4124
4325
  parse_mode: Option[str] = Nothing
4125
- """Optional. Mode for parsing entities in the photo caption. See formatting
4326
+ """Optional. Mode for parsing entities in the photo caption. See formatting
4126
4327
  options for more details."""
4127
4328
 
4128
4329
  caption_entities: Option[list["MessageEntity"]] = Nothing
4129
- """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
4130
4331
  be specified instead of parse_mode."""
4131
4332
 
4333
+ show_caption_above_media: Option[bool] = Nothing
4334
+ """Optional. Pass True, if the caption must be shown above the message media."""
4335
+
4132
4336
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4133
4337
  """Optional. Inline keyboard attached to the message."""
4134
4338
 
@@ -4172,24 +4376,27 @@ class InlineQueryResultGif(InlineQueryResult):
4172
4376
  """Optional. Duration of the GIF in seconds."""
4173
4377
 
4174
4378
  thumbnail_mime_type: Option[typing.Literal["image/jpeg", "image/gif", "video/mp4"]] = Nothing
4175
- """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4379
+ """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4176
4380
  or `video/mp4`. Defaults to `image/jpeg`."""
4177
4381
 
4178
4382
  title: Option[str] = Nothing
4179
4383
  """Optional. Title for the result."""
4180
4384
 
4181
4385
  caption: Option[str] = Nothing
4182
- """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
4183
4387
  parsing."""
4184
4388
 
4185
4389
  parse_mode: Option[str] = Nothing
4186
- """Optional. Mode for parsing entities in the caption. See formatting options
4390
+ """Optional. Mode for parsing entities in the caption. See formatting options
4187
4391
  for more details."""
4188
4392
 
4189
4393
  caption_entities: Option[list["MessageEntity"]] = Nothing
4190
- """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
4191
4395
  be specified instead of parse_mode."""
4192
4396
 
4397
+ show_caption_above_media: Option[bool] = Nothing
4398
+ """Optional. Pass True, if the caption must be shown above the message media."""
4399
+
4193
4400
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4194
4401
  """Optional. Inline keyboard attached to the message."""
4195
4402
 
@@ -4233,24 +4440,27 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
4233
4440
  """Optional. Video duration in seconds."""
4234
4441
 
4235
4442
  thumbnail_mime_type: Option[typing.Literal["image/jpeg", "image/gif", "video/mp4"]] = Nothing
4236
- """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4443
+ """Optional. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
4237
4444
  or `video/mp4`. Defaults to `image/jpeg`."""
4238
4445
 
4239
4446
  title: Option[str] = Nothing
4240
4447
  """Optional. Title for the result."""
4241
4448
 
4242
4449
  caption: Option[str] = Nothing
4243
- """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
4244
4451
  entities parsing."""
4245
4452
 
4246
4453
  parse_mode: Option[str] = Nothing
4247
- """Optional. Mode for parsing entities in the caption. See formatting options
4454
+ """Optional. Mode for parsing entities in the caption. See formatting options
4248
4455
  for more details."""
4249
4456
 
4250
4457
  caption_entities: Option[list["MessageEntity"]] = Nothing
4251
- """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
4252
4459
  be specified instead of parse_mode."""
4253
4460
 
4461
+ show_caption_above_media: Option[bool] = Nothing
4462
+ """Optional. Pass True, if the caption must be shown above the message media."""
4463
+
4254
4464
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4255
4465
  """Optional. Inline keyboard attached to the message."""
4256
4466
 
@@ -4291,17 +4501,20 @@ class InlineQueryResultVideo(InlineQueryResult):
4291
4501
  """Title for the result."""
4292
4502
 
4293
4503
  caption: Option[str] = Nothing
4294
- """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
4295
4505
  parsing."""
4296
4506
 
4297
4507
  parse_mode: Option[str] = Nothing
4298
- """Optional. Mode for parsing entities in the video caption. See formatting
4508
+ """Optional. Mode for parsing entities in the video caption. See formatting
4299
4509
  options for more details."""
4300
4510
 
4301
4511
  caption_entities: Option[list["MessageEntity"]] = Nothing
4302
- """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
4303
4513
  be specified instead of parse_mode."""
4304
4514
 
4515
+ show_caption_above_media: Option[bool] = Nothing
4516
+ """Optional. Pass True, if the caption must be shown above the message media."""
4517
+
4305
4518
  video_width: Option[int] = Nothing
4306
4519
  """Optional. Video width."""
4307
4520
 
@@ -4326,8 +4539,8 @@ class InlineQueryResultVideo(InlineQueryResult):
4326
4539
  "InputInvoiceMessageContent",
4327
4540
  ]
4328
4541
  ] = Nothing
4329
- """Optional. Content of the message to be sent instead of the video. This field
4330
- 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
4331
4544
  result (e.g., a YouTube video)."""
4332
4545
 
4333
4546
 
@@ -4353,11 +4566,11 @@ class InlineQueryResultAudio(InlineQueryResult):
4353
4566
  """Optional. Caption, 0-1024 characters after entities parsing."""
4354
4567
 
4355
4568
  parse_mode: Option[str] = Nothing
4356
- """Optional. Mode for parsing entities in the audio caption. See formatting
4569
+ """Optional. Mode for parsing entities in the audio caption. See formatting
4357
4570
  options for more details."""
4358
4571
 
4359
4572
  caption_entities: Option[list["MessageEntity"]] = Nothing
4360
- """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
4361
4574
  be specified instead of parse_mode."""
4362
4575
 
4363
4576
  performer: Option[str] = Nothing
@@ -4403,11 +4616,11 @@ class InlineQueryResultVoice(InlineQueryResult):
4403
4616
  """Optional. Caption, 0-1024 characters after entities parsing."""
4404
4617
 
4405
4618
  parse_mode: Option[str] = Nothing
4406
- """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
4407
4620
  options for more details."""
4408
4621
 
4409
4622
  caption_entities: Option[list["MessageEntity"]] = Nothing
4410
- """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
4411
4624
  be specified instead of parse_mode."""
4412
4625
 
4413
4626
  voice_duration: Option[int] = Nothing
@@ -4450,15 +4663,15 @@ class InlineQueryResultDocument(InlineQueryResult):
4450
4663
  """MIME type of the content of the file, either `application/pdf` or `application/zip`."""
4451
4664
 
4452
4665
  caption: Option[str] = Nothing
4453
- """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
4454
4667
  parsing."""
4455
4668
 
4456
4669
  parse_mode: Option[str] = Nothing
4457
- """Optional. Mode for parsing entities in the document caption. See formatting
4670
+ """Optional. Mode for parsing entities in the document caption. See formatting
4458
4671
  options for more details."""
4459
4672
 
4460
4673
  caption_entities: Option[list["MessageEntity"]] = Nothing
4461
- """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
4462
4675
  be specified instead of parse_mode."""
4463
4676
 
4464
4677
  description: Option[str] = Nothing
@@ -4510,21 +4723,21 @@ class InlineQueryResultLocation(InlineQueryResult):
4510
4723
  """Location title."""
4511
4724
 
4512
4725
  horizontal_accuracy: Option[float] = Nothing
4513
- """Optional. The radius of uncertainty for the location, measured in meters;
4726
+ """Optional. The radius of uncertainty for the location, measured in meters;
4514
4727
  0-1500."""
4515
4728
 
4516
4729
  live_period: Option[int] = Nothing
4517
- """Optional. Period in seconds during which the location can be updated, should
4518
- 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
4519
4732
  indefinitely."""
4520
4733
 
4521
4734
  heading: Option[int] = Nothing
4522
- """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
4523
4736
  degrees. Must be between 1 and 360 if specified."""
4524
4737
 
4525
4738
  proximity_alert_radius: Option[int] = Nothing
4526
- """Optional. For live locations, a maximum distance for proximity alerts
4527
- 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
4528
4741
  100000 if specified."""
4529
4742
 
4530
4743
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -4579,7 +4792,7 @@ class InlineQueryResultVenue(InlineQueryResult):
4579
4792
  """Optional. Foursquare identifier of the venue if known."""
4580
4793
 
4581
4794
  foursquare_type: Option[str] = Nothing
4582
- """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`,
4583
4796
  `arts_entertainment/aquarium` or `food/icecream`.)."""
4584
4797
 
4585
4798
  google_place_id: Option[str] = Nothing
@@ -4634,7 +4847,7 @@ class InlineQueryResultContact(InlineQueryResult):
4634
4847
  """Optional. Contact's last name."""
4635
4848
 
4636
4849
  vcard: Option[str] = Nothing
4637
- """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
4638
4851
  bytes."""
4639
4852
 
4640
4853
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -4702,17 +4915,20 @@ class InlineQueryResultCachedPhoto(InlineQueryResult):
4702
4915
  """Optional. Short description of the result."""
4703
4916
 
4704
4917
  caption: Option[str] = Nothing
4705
- """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
4706
4919
  parsing."""
4707
4920
 
4708
4921
  parse_mode: Option[str] = Nothing
4709
- """Optional. Mode for parsing entities in the photo caption. See formatting
4922
+ """Optional. Mode for parsing entities in the photo caption. See formatting
4710
4923
  options for more details."""
4711
4924
 
4712
4925
  caption_entities: Option[list["MessageEntity"]] = Nothing
4713
- """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
4714
4927
  be specified instead of parse_mode."""
4715
4928
 
4929
+ show_caption_above_media: Option[bool] = Nothing
4930
+ """Optional. Pass True, if the caption must be shown above the message media."""
4931
+
4716
4932
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4717
4933
  """Optional. Inline keyboard attached to the message."""
4718
4934
 
@@ -4747,17 +4963,20 @@ class InlineQueryResultCachedGif(InlineQueryResult):
4747
4963
  """Optional. Title for the result."""
4748
4964
 
4749
4965
  caption: Option[str] = Nothing
4750
- """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
4751
4967
  parsing."""
4752
4968
 
4753
4969
  parse_mode: Option[str] = Nothing
4754
- """Optional. Mode for parsing entities in the caption. See formatting options
4970
+ """Optional. Mode for parsing entities in the caption. See formatting options
4755
4971
  for more details."""
4756
4972
 
4757
4973
  caption_entities: Option[list["MessageEntity"]] = Nothing
4758
- """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
4759
4975
  be specified instead of parse_mode."""
4760
4976
 
4977
+ show_caption_above_media: Option[bool] = Nothing
4978
+ """Optional. Pass True, if the caption must be shown above the message media."""
4979
+
4761
4980
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4762
4981
  """Optional. Inline keyboard attached to the message."""
4763
4982
 
@@ -4792,17 +5011,20 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
4792
5011
  """Optional. Title for the result."""
4793
5012
 
4794
5013
  caption: Option[str] = Nothing
4795
- """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
4796
5015
  entities parsing."""
4797
5016
 
4798
5017
  parse_mode: Option[str] = Nothing
4799
- """Optional. Mode for parsing entities in the caption. See formatting options
5018
+ """Optional. Mode for parsing entities in the caption. See formatting options
4800
5019
  for more details."""
4801
5020
 
4802
5021
  caption_entities: Option[list["MessageEntity"]] = Nothing
4803
- """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
4804
5023
  be specified instead of parse_mode."""
4805
5024
 
5025
+ show_caption_above_media: Option[bool] = Nothing
5026
+ """Optional. Pass True, if the caption must be shown above the message media."""
5027
+
4806
5028
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4807
5029
  """Optional. Inline keyboard attached to the message."""
4808
5030
 
@@ -4870,15 +5092,15 @@ class InlineQueryResultCachedDocument(InlineQueryResult):
4870
5092
  """Optional. Short description of the result."""
4871
5093
 
4872
5094
  caption: Option[str] = Nothing
4873
- """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
4874
5096
  parsing."""
4875
5097
 
4876
5098
  parse_mode: Option[str] = Nothing
4877
- """Optional. Mode for parsing entities in the document caption. See formatting
5099
+ """Optional. Mode for parsing entities in the document caption. See formatting
4878
5100
  options for more details."""
4879
5101
 
4880
5102
  caption_entities: Option[list["MessageEntity"]] = Nothing
4881
- """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
4882
5104
  be specified instead of parse_mode."""
4883
5105
 
4884
5106
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -4918,17 +5140,20 @@ class InlineQueryResultCachedVideo(InlineQueryResult):
4918
5140
  """Optional. Short description of the result."""
4919
5141
 
4920
5142
  caption: Option[str] = Nothing
4921
- """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
4922
5144
  parsing."""
4923
5145
 
4924
5146
  parse_mode: Option[str] = Nothing
4925
- """Optional. Mode for parsing entities in the video caption. See formatting
5147
+ """Optional. Mode for parsing entities in the video caption. See formatting
4926
5148
  options for more details."""
4927
5149
 
4928
5150
  caption_entities: Option[list["MessageEntity"]] = Nothing
4929
- """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
4930
5152
  be specified instead of parse_mode."""
4931
5153
 
5154
+ show_caption_above_media: Option[bool] = Nothing
5155
+ """Optional. Pass True, if the caption must be shown above the message media."""
5156
+
4932
5157
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
4933
5158
  """Optional. Inline keyboard attached to the message."""
4934
5159
 
@@ -4966,11 +5191,11 @@ class InlineQueryResultCachedVoice(InlineQueryResult):
4966
5191
  """Optional. Caption, 0-1024 characters after entities parsing."""
4967
5192
 
4968
5193
  parse_mode: Option[str] = Nothing
4969
- """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
4970
5195
  options for more details."""
4971
5196
 
4972
5197
  caption_entities: Option[list["MessageEntity"]] = Nothing
4973
- """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
4974
5199
  be specified instead of parse_mode."""
4975
5200
 
4976
5201
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -5007,11 +5232,11 @@ class InlineQueryResultCachedAudio(InlineQueryResult):
5007
5232
  """Optional. Caption, 0-1024 characters after entities parsing."""
5008
5233
 
5009
5234
  parse_mode: Option[str] = Nothing
5010
- """Optional. Mode for parsing entities in the audio caption. See formatting
5235
+ """Optional. Mode for parsing entities in the audio caption. See formatting
5011
5236
  options for more details."""
5012
5237
 
5013
5238
  caption_entities: Option[list["MessageEntity"]] = Nothing
5014
- """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
5015
5240
  be specified instead of parse_mode."""
5016
5241
 
5017
5242
  reply_markup: Option["InlineKeyboardMarkup"] = Nothing
@@ -5039,11 +5264,11 @@ class InputTextMessageContent(InputMessageContent):
5039
5264
  """Text of the message to be sent, 1-4096 characters."""
5040
5265
 
5041
5266
  parse_mode: Option[str] = Nothing
5042
- """Optional. Mode for parsing entities in the message text. See formatting
5267
+ """Optional. Mode for parsing entities in the message text. See formatting
5043
5268
  options for more details."""
5044
5269
 
5045
5270
  entities: Option[list["MessageEntity"]] = Nothing
5046
- """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
5047
5272
  be specified instead of parse_mode."""
5048
5273
 
5049
5274
  link_preview_options: Option["LinkPreviewOptions"] = Nothing
@@ -5063,21 +5288,21 @@ class InputLocationMessageContent(InputMessageContent):
5063
5288
  """Longitude of the location in degrees."""
5064
5289
 
5065
5290
  horizontal_accuracy: Option[float] = Nothing
5066
- """Optional. The radius of uncertainty for the location, measured in meters;
5291
+ """Optional. The radius of uncertainty for the location, measured in meters;
5067
5292
  0-1500."""
5068
5293
 
5069
5294
  live_period: Option[int] = Nothing
5070
- """Optional. Period in seconds during which the location can be updated, should
5071
- 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
5072
5297
  indefinitely."""
5073
5298
 
5074
5299
  heading: Option[int] = Nothing
5075
- """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
5076
5301
  degrees. Must be between 1 and 360 if specified."""
5077
5302
 
5078
5303
  proximity_alert_radius: Option[int] = Nothing
5079
- """Optional. For live locations, a maximum distance for proximity alerts
5080
- 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
5081
5306
  100000 if specified."""
5082
5307
 
5083
5308
 
@@ -5103,7 +5328,7 @@ class InputVenueMessageContent(InputMessageContent):
5103
5328
  """Optional. Foursquare identifier of the venue, if known."""
5104
5329
 
5105
5330
  foursquare_type: Option[str] = Nothing
5106
- """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`,
5107
5332
  `arts_entertainment/aquarium` or `food/icecream`.)."""
5108
5333
 
5109
5334
  google_place_id: Option[str] = Nothing
@@ -5129,7 +5354,7 @@ class InputContactMessageContent(InputMessageContent):
5129
5354
  """Optional. Contact's last name."""
5130
5355
 
5131
5356
  vcard: Option[str] = Nothing
5132
- """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
5133
5358
  bytes."""
5134
5359
 
5135
5360
 
@@ -5146,39 +5371,43 @@ class InputInvoiceMessageContent(InputMessageContent):
5146
5371
  """Product description, 1-255 characters."""
5147
5372
 
5148
5373
  payload: str
5149
- """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
5150
5375
  the user, use for your internal processes."""
5151
5376
 
5152
- provider_token: str
5153
- """Payment provider token, obtained via @BotFather."""
5154
-
5155
- currency: str
5156
- """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."""
5157
5380
 
5158
5381
  prices: list["LabeledPrice"]
5159
- """Price breakdown, a JSON-serialized list of components (e.g. product price,
5160
- 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."""
5161
5389
 
5162
5390
  max_tip_amount: Option[int] = Nothing
5163
- """Optional. The maximum accepted amount for tips in the smallest units of
5164
- the currency (integer, not float/double). For example, for a maximum tip
5165
- of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json,
5166
- it shows the number of digits past the decimal point for each currency (2
5167
- 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."""
5168
5397
 
5169
5398
  suggested_tip_amounts: Option[list[int]] = Nothing
5170
- """Optional. A JSON-serialized array of suggested amounts of tip in the smallest
5171
- units of the currency (integer, not float/double). At most 4 suggested
5172
- 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,
5173
5402
  passed in a strictly increased order and must not exceed max_tip_amount."""
5174
5403
 
5175
5404
  provider_data: Option[str] = Nothing
5176
- """Optional. A JSON-serialized object for data about the invoice, which will
5177
- 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
5178
5407
  fields should be provided by the payment provider."""
5179
5408
 
5180
5409
  photo_url: Option[str] = Nothing
5181
- """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
5182
5411
  or a marketing image for a service."""
5183
5412
 
5184
5413
  photo_size: Option[int] = Nothing
@@ -5191,28 +5420,32 @@ class InputInvoiceMessageContent(InputMessageContent):
5191
5420
  """Optional. Photo height."""
5192
5421
 
5193
5422
  need_name: Option[bool] = Nothing
5194
- """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."""
5195
5425
 
5196
5426
  need_phone_number: Option[bool] = Nothing
5197
- """Optional. Pass True if you require the user's phone number to complete the
5198
- order."""
5427
+ """Optional. Pass True if you require the user's phone number to complete the
5428
+ order. Ignored for payments in Telegram Stars."""
5199
5429
 
5200
5430
  need_email: Option[bool] = Nothing
5201
- """Optional. Pass True if you require the user's email address to complete
5202
- 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."""
5203
5433
 
5204
5434
  need_shipping_address: Option[bool] = Nothing
5205
- """Optional. Pass True if you require the user's shipping address to complete
5206
- 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."""
5207
5437
 
5208
5438
  send_phone_number_to_provider: Option[bool] = Nothing
5209
- """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."""
5210
5441
 
5211
5442
  send_email_to_provider: Option[bool] = Nothing
5212
- """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."""
5213
5445
 
5214
5446
  is_flexible: Option[bool] = Nothing
5215
- """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."""
5216
5449
 
5217
5450
 
5218
5451
  class ChosenInlineResult(Model):
@@ -5235,8 +5468,8 @@ class ChosenInlineResult(Model):
5235
5468
  """Optional. Sender location, only for bots that require user location."""
5236
5469
 
5237
5470
  inline_message_id: Option[str] = Nothing
5238
- """Optional. Identifier of the sent inline message. Available only if there
5239
- 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
5240
5473
  queries and can be used to edit the message."""
5241
5474
 
5242
5475
 
@@ -5247,7 +5480,7 @@ class SentWebAppMessage(Model):
5247
5480
  """
5248
5481
 
5249
5482
  inline_message_id: Option[str] = Nothing
5250
- """Optional. Identifier of the sent inline message. Available only if there
5483
+ """Optional. Identifier of the sent inline message. Available only if there
5251
5484
  is an inline keyboard attached to the message."""
5252
5485
 
5253
5486
 
@@ -5261,9 +5494,9 @@ class LabeledPrice(Model):
5261
5494
  """Portion label."""
5262
5495
 
5263
5496
  amount: int
5264
- """Price of the product in the smallest units of the currency (integer, not
5265
- float/double). For example, for a price of US$ 1.45 pass amount = 145. See
5266
- 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
5267
5500
  the decimal point for each currency (2 for the majority of currencies)."""
5268
5501
 
5269
5502
 
@@ -5282,13 +5515,14 @@ class Invoice(Model):
5282
5515
  start_parameter: str
5283
5516
  """Unique bot deep-linking parameter that can be used to generate this invoice."""
5284
5517
 
5285
- currency: str
5286
- """Three-letter ISO 4217 currency code."""
5518
+ currency: Currency
5519
+ """Three-letter ISO 4217 currency code, or `XTR` for payments in Telegram
5520
+ Stars."""
5287
5521
 
5288
5522
  total_amount: int
5289
- """Total price in the smallest units of the currency (integer, not float/double).
5290
- For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5291
- 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
5292
5526
  for each currency (2 for the majority of currencies)."""
5293
5527
 
5294
5528
 
@@ -5358,17 +5592,18 @@ class SuccessfulPayment(Model):
5358
5592
  This object contains basic information about a successful payment.
5359
5593
  """
5360
5594
 
5361
- currency: str
5362
- """Three-letter ISO 4217 currency code."""
5595
+ currency: Currency
5596
+ """Three-letter ISO 4217 currency code, or `XTR` for payments in Telegram
5597
+ Stars."""
5363
5598
 
5364
5599
  total_amount: int
5365
- """Total price in the smallest units of the currency (integer, not float/double).
5366
- For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5367
- 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
5368
5603
  for each currency (2 for the majority of currencies)."""
5369
5604
 
5370
5605
  invoice_payload: str
5371
- """Bot specified invoice payload."""
5606
+ """Bot-specified invoice payload."""
5372
5607
 
5373
5608
  telegram_payment_charge_id: str
5374
5609
  """Telegram payment identifier."""
@@ -5383,6 +5618,32 @@ class SuccessfulPayment(Model):
5383
5618
  """Optional. Order information provided by the user."""
5384
5619
 
5385
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
+
5386
5647
  class ShippingQuery(Model):
5387
5648
  """Object `ShippingQuery`, see the [documentation](https://core.telegram.org/bots/api#shippingquery).
5388
5649
 
@@ -5396,7 +5657,7 @@ class ShippingQuery(Model):
5396
5657
  """User who sent the query."""
5397
5658
 
5398
5659
  invoice_payload: str
5399
- """Bot specified invoice payload."""
5660
+ """Bot-specified invoice payload."""
5400
5661
 
5401
5662
  shipping_address: "ShippingAddress"
5402
5663
  """User specified shipping address."""
@@ -5414,17 +5675,18 @@ class PreCheckoutQuery(Model):
5414
5675
  from_: "User"
5415
5676
  """User who sent the query."""
5416
5677
 
5417
- currency: str
5418
- """Three-letter ISO 4217 currency code."""
5678
+ currency: Currency
5679
+ """Three-letter ISO 4217 currency code, or `XTR` for payments in Telegram
5680
+ Stars."""
5419
5681
 
5420
5682
  total_amount: int
5421
- """Total price in the smallest units of the currency (integer, not float/double).
5422
- For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter
5423
- 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
5424
5686
  for each currency (2 for the majority of currencies)."""
5425
5687
 
5426
5688
  invoice_payload: str
5427
- """Bot specified invoice payload."""
5689
+ """Bot-specified invoice payload."""
5428
5690
 
5429
5691
  shipping_option_id: Option[str] = Nothing
5430
5692
  """Optional. Identifier of the shipping option chosen by the user."""
@@ -5433,6 +5695,146 @@ class PreCheckoutQuery(Model):
5433
5695
  """Optional. Order information provided by the user."""
5434
5696
 
5435
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
+
5436
5838
  class PassportData(Model):
5437
5839
  """Object `PassportData`, see the [documentation](https://core.telegram.org/bots/api#passportdata).
5438
5840
 
@@ -5440,7 +5842,7 @@ class PassportData(Model):
5440
5842
  """
5441
5843
 
5442
5844
  data: list["EncryptedPassportElement"]
5443
- """Array with information about documents and other Telegram Passport elements
5845
+ """Array with information about documents and other Telegram Passport elements
5444
5846
  that was shared with the bot."""
5445
5847
 
5446
5848
  credentials: "EncryptedCredentials"
@@ -5457,7 +5859,7 @@ class PassportFile(Model):
5457
5859
  """Identifier for this file, which can be used to download or reuse the file."""
5458
5860
 
5459
5861
  file_unique_id: str
5460
- """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
5461
5863
  and for different bots. Can't be used to download or reuse the file."""
5462
5864
 
5463
5865
  file_size: int
@@ -5474,55 +5876,55 @@ class EncryptedPassportElement(Model):
5474
5876
  """
5475
5877
 
5476
5878
  type: EncryptedPassportElementType
5477
- """Element type. One of `personal_details`, `passport`, `driver_license`,
5478
- `identity_card`, `internal_passport`, `address`, `utility_bill`,
5479
- `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`,
5480
5882
  `temporary_registration`, `phone_number`, `email`."""
5481
5883
 
5482
5884
  hash: str
5483
5885
  """Base64-encoded element hash for using in PassportElementErrorUnspecified."""
5484
5886
 
5485
5887
  data: Option[str] = Nothing
5486
- """Optional. Base64-encoded encrypted Telegram Passport element data provided
5487
- by the user; available only for `personal_details`, `passport`, `driver_license`,
5488
- `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
5489
5891
  and verified using the accompanying EncryptedCredentials."""
5490
5892
 
5491
5893
  phone_number: Option[str] = Nothing
5492
- """Optional. User's verified phone number; available only for `phone_number`
5894
+ """Optional. User's verified phone number; available only for `phone_number`
5493
5895
  type."""
5494
5896
 
5495
5897
  email: Option[str] = Nothing
5496
5898
  """Optional. User's verified email address; available only for `email` type."""
5497
5899
 
5498
5900
  files: Option[list["PassportFile"]] = Nothing
5499
- """Optional. Array of encrypted files with documents provided by the user;
5500
- available only for `utility_bill`, `bank_statement`, `rental_agreement`,
5501
- `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
5502
5904
  can be decrypted and verified using the accompanying EncryptedCredentials."""
5503
5905
 
5504
5906
  front_side: Option["PassportFile"] = Nothing
5505
- """Optional. Encrypted file with the front side of the document, provided
5506
- by the user; available only for `passport`, `driver_license`, `identity_card`
5507
- 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
5508
5910
  the accompanying EncryptedCredentials."""
5509
5911
 
5510
5912
  reverse_side: Option["PassportFile"] = Nothing
5511
- """Optional. Encrypted file with the reverse side of the document, provided
5512
- 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`.
5513
5915
  The file can be decrypted and verified using the accompanying EncryptedCredentials."""
5514
5916
 
5515
5917
  selfie: Option["PassportFile"] = Nothing
5516
- """Optional. Encrypted file with the selfie of the user holding a document,
5517
- provided by the user; available if requested for `passport`, `driver_license`,
5518
- `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
5519
5921
  verified using the accompanying EncryptedCredentials."""
5520
5922
 
5521
5923
  translation: Option[list["PassportFile"]] = Nothing
5522
- """Optional. Array of encrypted files with translated versions of documents
5523
- provided by the user; available if requested for `passport`, `driver_license`,
5524
- `identity_card`, `internal_passport`, `utility_bill`, `bank_statement`,
5525
- `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`
5526
5928
  types. Files can be decrypted and verified using the accompanying EncryptedCredentials."""
5527
5929
 
5528
5930
 
@@ -5533,15 +5935,15 @@ class EncryptedCredentials(Model):
5533
5935
  """
5534
5936
 
5535
5937
  data: str
5536
- """Base64-encoded encrypted JSON-serialized data with unique user's payload,
5537
- 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
5538
5940
  and authentication."""
5539
5941
 
5540
5942
  hash: str
5541
5943
  """Base64-encoded data hash for data authentication."""
5542
5944
 
5543
5945
  secret: str
5544
- """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
5545
5947
  for data decryption."""
5546
5948
 
5547
5949
 
@@ -5555,14 +5957,15 @@ class PassportElementErrorDataField(PassportElementError):
5555
5957
  """Error source, must be data."""
5556
5958
 
5557
5959
  type: typing.Literal[
5960
+ "personal_details",
5558
5961
  "passport",
5559
5962
  "driver_license",
5560
5963
  "identity_card",
5561
5964
  "internal_passport",
5562
5965
  "address",
5563
5966
  ]
5564
- """The section of the user's Telegram Passport which has the error, one of `personal_details`,
5565
- `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`,
5566
5969
  `address`."""
5567
5970
 
5568
5971
  field_name: str
@@ -5590,7 +5993,7 @@ class PassportElementErrorFrontSide(PassportElementError):
5590
5993
  "identity_card",
5591
5994
  "internal_passport",
5592
5995
  ]
5593
- """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`,
5594
5997
  `driver_license`, `identity_card`, `internal_passport`."""
5595
5998
 
5596
5999
  file_hash: str
@@ -5610,7 +6013,7 @@ class PassportElementErrorReverseSide(PassportElementError):
5610
6013
  """Error source, must be reverse_side."""
5611
6014
 
5612
6015
  type: typing.Literal["driver_license", "identity_card"]
5613
- """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`,
5614
6017
  `identity_card`."""
5615
6018
 
5616
6019
  file_hash: str
@@ -5635,7 +6038,7 @@ class PassportElementErrorSelfie(PassportElementError):
5635
6038
  "identity_card",
5636
6039
  "internal_passport",
5637
6040
  ]
5638
- """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`,
5639
6042
  `driver_license`, `identity_card`, `internal_passport`."""
5640
6043
 
5641
6044
  file_hash: str
@@ -5661,8 +6064,8 @@ class PassportElementErrorFile(PassportElementError):
5661
6064
  "passport_registration",
5662
6065
  "temporary_registration",
5663
6066
  ]
5664
- """The section of the user's Telegram Passport which has the issue, one of `utility_bill`,
5665
- `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`,
5666
6069
  `temporary_registration`."""
5667
6070
 
5668
6071
  file_hash: str
@@ -5688,8 +6091,8 @@ class PassportElementErrorFiles(PassportElementError):
5688
6091
  "passport_registration",
5689
6092
  "temporary_registration",
5690
6093
  ]
5691
- """The section of the user's Telegram Passport which has the issue, one of `utility_bill`,
5692
- `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`,
5693
6096
  `temporary_registration`."""
5694
6097
 
5695
6098
  file_hashes: list[str]
@@ -5719,9 +6122,9 @@ class PassportElementErrorTranslationFile(PassportElementError):
5719
6122
  "passport_registration",
5720
6123
  "temporary_registration",
5721
6124
  ]
5722
- """Type of element of the user's Telegram Passport which has the issue, one
5723
- of `passport`, `driver_license`, `identity_card`, `internal_passport`,
5724
- `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`,
5725
6128
  `temporary_registration`."""
5726
6129
 
5727
6130
  file_hash: str
@@ -5751,9 +6154,9 @@ class PassportElementErrorTranslationFiles(PassportElementError):
5751
6154
  "passport_registration",
5752
6155
  "temporary_registration",
5753
6156
  ]
5754
- """Type of element of the user's Telegram Passport which has the issue, one
5755
- of `passport`, `driver_license`, `identity_card`, `internal_passport`,
5756
- `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`,
5757
6160
  `temporary_registration`."""
5758
6161
 
5759
6162
  file_hashes: list[str]
@@ -5798,17 +6201,17 @@ class Game(Model):
5798
6201
  """Photo that will be displayed in the game message in chats."""
5799
6202
 
5800
6203
  text: Option[str] = Nothing
5801
- """Optional. Brief description of the game or high scores included in the game
5802
- message. Can be automatically edited to include current high scores for
5803
- 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.
5804
6207
  0-4096 characters."""
5805
6208
 
5806
6209
  text_entities: Option[list["MessageEntity"]] = Nothing
5807
- """Optional. Special entities that appear in text, such as usernames, URLs,
6210
+ """Optional. Special entities that appear in text, such as usernames, URLs,
5808
6211
  bot commands, etc."""
5809
6212
 
5810
6213
  animation: Option["Animation"] = Nothing
5811
- """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.
5812
6215
  Upload via BotFather."""
5813
6216
 
5814
6217
 
@@ -5953,6 +6356,9 @@ __all__ = (
5953
6356
  "InputMediaPhoto",
5954
6357
  "InputMediaVideo",
5955
6358
  "InputMessageContent",
6359
+ "InputPaidMedia",
6360
+ "InputPaidMediaPhoto",
6361
+ "InputPaidMediaVideo",
5956
6362
  "InputPollOption",
5957
6363
  "InputSticker",
5958
6364
  "InputTextMessageContent",
@@ -5985,6 +6391,11 @@ __all__ = (
5985
6391
  "MessageReactionUpdated",
5986
6392
  "Model",
5987
6393
  "OrderInfo",
6394
+ "PaidMedia",
6395
+ "PaidMediaInfo",
6396
+ "PaidMediaPhoto",
6397
+ "PaidMediaPreview",
6398
+ "PaidMediaVideo",
5988
6399
  "PassportData",
5989
6400
  "PassportElementError",
5990
6401
  "PassportElementErrorDataField",
@@ -6007,21 +6418,33 @@ __all__ = (
6007
6418
  "ReactionType",
6008
6419
  "ReactionTypeCustomEmoji",
6009
6420
  "ReactionTypeEmoji",
6421
+ "RefundedPayment",
6010
6422
  "ReplyKeyboardMarkup",
6011
6423
  "ReplyKeyboardRemove",
6012
6424
  "ReplyParameters",
6013
6425
  "ResponseParameters",
6426
+ "RevenueWithdrawalState",
6427
+ "RevenueWithdrawalStateFailed",
6428
+ "RevenueWithdrawalStatePending",
6429
+ "RevenueWithdrawalStateSucceeded",
6014
6430
  "SentWebAppMessage",
6015
6431
  "SharedUser",
6016
6432
  "ShippingAddress",
6017
6433
  "ShippingOption",
6018
6434
  "ShippingQuery",
6435
+ "StarTransaction",
6436
+ "StarTransactions",
6019
6437
  "Sticker",
6020
6438
  "StickerSet",
6021
6439
  "Story",
6022
6440
  "SuccessfulPayment",
6023
6441
  "SwitchInlineQueryChosenChat",
6024
6442
  "TextQuote",
6443
+ "TransactionPartner",
6444
+ "TransactionPartnerFragment",
6445
+ "TransactionPartnerOther",
6446
+ "TransactionPartnerTelegramAds",
6447
+ "TransactionPartnerUser",
6025
6448
  "Update",
6026
6449
  "User",
6027
6450
  "UserChatBoosts",