telegrinder 0.1.dev167__py3-none-any.whl → 0.1.dev169__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of telegrinder might be problematic. Click here for more details.

Files changed (101) hide show
  1. telegrinder/__init__.py +9 -3
  2. telegrinder/bot/__init__.py +7 -5
  3. telegrinder/bot/cute_types/base.py +12 -14
  4. telegrinder/bot/cute_types/callback_query.py +55 -44
  5. telegrinder/bot/cute_types/chat_join_request.py +8 -7
  6. telegrinder/bot/cute_types/chat_member_updated.py +23 -17
  7. telegrinder/bot/cute_types/inline_query.py +1 -1
  8. telegrinder/bot/cute_types/message.py +331 -183
  9. telegrinder/bot/cute_types/update.py +4 -8
  10. telegrinder/bot/cute_types/utils.py +1 -5
  11. telegrinder/bot/dispatch/__init__.py +2 -3
  12. telegrinder/bot/dispatch/abc.py +4 -0
  13. telegrinder/bot/dispatch/context.py +9 -4
  14. telegrinder/bot/dispatch/dispatch.py +33 -30
  15. telegrinder/bot/dispatch/handler/func.py +33 -12
  16. telegrinder/bot/dispatch/handler/message_reply.py +6 -3
  17. telegrinder/bot/dispatch/middleware/abc.py +4 -4
  18. telegrinder/bot/dispatch/process.py +40 -13
  19. telegrinder/bot/dispatch/return_manager/abc.py +12 -12
  20. telegrinder/bot/dispatch/return_manager/callback_query.py +1 -3
  21. telegrinder/bot/dispatch/return_manager/inline_query.py +1 -3
  22. telegrinder/bot/dispatch/view/abc.py +74 -31
  23. telegrinder/bot/dispatch/view/box.py +66 -50
  24. telegrinder/bot/dispatch/view/message.py +1 -5
  25. telegrinder/bot/dispatch/view/raw.py +6 -6
  26. telegrinder/bot/dispatch/waiter_machine/__init__.py +2 -1
  27. telegrinder/bot/dispatch/waiter_machine/machine.py +86 -50
  28. telegrinder/bot/dispatch/waiter_machine/middleware.py +31 -7
  29. telegrinder/bot/dispatch/waiter_machine/short_state.py +26 -7
  30. telegrinder/bot/polling/polling.py +4 -4
  31. telegrinder/bot/rules/__init__.py +9 -6
  32. telegrinder/bot/rules/abc.py +99 -22
  33. telegrinder/bot/rules/adapter/__init__.py +4 -1
  34. telegrinder/bot/rules/adapter/abc.py +11 -6
  35. telegrinder/bot/rules/adapter/errors.py +1 -2
  36. telegrinder/bot/rules/adapter/event.py +14 -9
  37. telegrinder/bot/rules/adapter/node.py +42 -0
  38. telegrinder/bot/rules/callback_data.py +13 -15
  39. telegrinder/bot/rules/chat_join.py +3 -2
  40. telegrinder/bot/rules/command.py +26 -14
  41. telegrinder/bot/rules/enum_text.py +5 -5
  42. telegrinder/bot/rules/func.py +6 -6
  43. telegrinder/bot/rules/fuzzy.py +5 -7
  44. telegrinder/bot/rules/inline.py +4 -5
  45. telegrinder/bot/rules/integer.py +10 -8
  46. telegrinder/bot/rules/is_from.py +63 -91
  47. telegrinder/bot/rules/markup.py +5 -5
  48. telegrinder/bot/rules/mention.py +4 -4
  49. telegrinder/bot/rules/message.py +1 -1
  50. telegrinder/bot/rules/node.py +27 -0
  51. telegrinder/bot/rules/regex.py +5 -5
  52. telegrinder/bot/rules/rule_enum.py +4 -4
  53. telegrinder/bot/rules/start.py +5 -5
  54. telegrinder/bot/rules/text.py +9 -13
  55. telegrinder/bot/rules/update.py +4 -4
  56. telegrinder/bot/scenario/__init__.py +3 -3
  57. telegrinder/bot/scenario/checkbox.py +5 -5
  58. telegrinder/bot/scenario/choice.py +5 -5
  59. telegrinder/model.py +49 -15
  60. telegrinder/modules.py +14 -6
  61. telegrinder/msgspec_utils.py +8 -17
  62. telegrinder/node/__init__.py +26 -8
  63. telegrinder/node/attachment.py +13 -9
  64. telegrinder/node/base.py +27 -14
  65. telegrinder/node/callback_query.py +18 -0
  66. telegrinder/node/command.py +29 -0
  67. telegrinder/node/composer.py +119 -30
  68. telegrinder/node/me.py +14 -0
  69. telegrinder/node/message.py +2 -4
  70. telegrinder/node/polymorphic.py +44 -0
  71. telegrinder/node/rule.py +26 -22
  72. telegrinder/node/scope.py +36 -0
  73. telegrinder/node/source.py +37 -10
  74. telegrinder/node/text.py +11 -5
  75. telegrinder/node/tools/__init__.py +2 -2
  76. telegrinder/node/tools/generator.py +6 -6
  77. telegrinder/tools/__init__.py +9 -14
  78. telegrinder/tools/buttons.py +23 -17
  79. telegrinder/tools/error_handler/error_handler.py +11 -14
  80. telegrinder/tools/formatting/__init__.py +0 -6
  81. telegrinder/tools/formatting/html.py +10 -12
  82. telegrinder/tools/formatting/links.py +0 -5
  83. telegrinder/tools/formatting/spec_html_formats.py +0 -11
  84. telegrinder/tools/global_context/abc.py +1 -3
  85. telegrinder/tools/global_context/global_context.py +6 -16
  86. telegrinder/tools/i18n/simple.py +1 -3
  87. telegrinder/tools/kb_set/yaml.py +1 -2
  88. telegrinder/tools/keyboard.py +7 -8
  89. telegrinder/tools/limited_dict.py +13 -3
  90. telegrinder/tools/loop_wrapper/loop_wrapper.py +6 -5
  91. telegrinder/tools/magic.py +27 -5
  92. telegrinder/types/__init__.py +20 -0
  93. telegrinder/types/enums.py +37 -31
  94. telegrinder/types/methods.py +613 -401
  95. telegrinder/types/objects.py +1151 -757
  96. {telegrinder-0.1.dev167.dist-info → telegrinder-0.1.dev169.dist-info}/LICENSE +1 -1
  97. {telegrinder-0.1.dev167.dist-info → telegrinder-0.1.dev169.dist-info}/METADATA +9 -8
  98. telegrinder-0.1.dev169.dist-info/RECORD +143 -0
  99. telegrinder/bot/dispatch/composition.py +0 -88
  100. telegrinder-0.1.dev167.dist-info/RECORD +0 -137
  101. {telegrinder-0.1.dev167.dist-info → telegrinder-0.1.dev169.dist-info}/WHEEL +0 -0
@@ -4,7 +4,7 @@ from datetime import datetime
4
4
  from fntypes.co import Result, Variative
5
5
 
6
6
  from telegrinder.api.error import APIError
7
- from telegrinder.model import full_result, get_params
7
+ from telegrinder.model import ProxiedDict, full_result, get_params
8
8
  from telegrinder.types.enums import * # noqa: F403
9
9
  from telegrinder.types.objects import * # noqa: F403
10
10
 
@@ -13,7 +13,13 @@ if typing.TYPE_CHECKING:
13
13
 
14
14
 
15
15
  class APIMethods:
16
- """Telegram Bot API 7.3 methods, released `May 6, 2024`."""
16
+ """Telegram Bot API 7.7 methods, released `July 7, 2024`."""
17
+
18
+ default_params = ProxiedDict(
19
+ typing.TypedDict(
20
+ "DefaultParams", {"parse_mode": str, "question_parse_mode": str, "explanation_parse_mode": str}
21
+ )
22
+ )
17
23
 
18
24
  def __init__(self, api: "ABCAPI") -> None:
19
25
  self.api = api
@@ -28,7 +34,7 @@ class APIMethods:
28
34
  ) -> Result[list[Update], APIError]:
29
35
  """Method `getUpdates`, see the [documentation](https://core.telegram.org/bots/api#getupdates)
30
36
 
31
- Use this method to receive incoming updates using long polling (wiki).
37
+ Use this method to receive incoming updates using long polling (wiki).
32
38
  Returns an Array of Update objects.
33
39
 
34
40
  :param offset: Identifier of the first update to be returned. Must be greater by one than \
@@ -75,13 +81,13 @@ class APIMethods:
75
81
  ) -> Result[bool, APIError]:
76
82
  """Method `setWebhook`, see the [documentation](https://core.telegram.org/bots/api#setwebhook)
77
83
 
78
- Use this method to specify a URL and receive incoming updates via an outgoing
79
- webhook. Whenever there is an update for the bot, we will send an HTTPS POST
80
- request to the specified URL, containing a JSON-serialized Update. In
81
- case of an unsuccessful request, we will give up after a reasonable amount
82
- of attempts. Returns True on success. If you'd like to make sure that the
83
- webhook was set by you, you can specify secret data in the parameter secret_token.
84
- If specified, the request will contain a header "X-Telegram-Bot-Api-Secret-Token"
84
+ Use this method to specify a URL and receive incoming updates via an outgoing
85
+ webhook. Whenever there is an update for the bot, we will send an HTTPS POST
86
+ request to the specified URL, containing a JSON-serialized Update. In
87
+ case of an unsuccessful request, we will give up after a reasonable amount
88
+ of attempts. Returns True on success. If you'd like to make sure that the
89
+ webhook was set by you, you can specify secret data in the parameter secret_token.
90
+ If specified, the request will contain a header "X-Telegram-Bot-Api-Secret-Token"
85
91
  with the secret token as content.
86
92
 
87
93
  :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration. \
@@ -139,9 +145,7 @@ class APIMethods:
139
145
  )
140
146
  return full_result(method_response, bool)
141
147
 
142
- async def get_webhook_info(
143
- self, **other: typing.Any
144
- ) -> Result[WebhookInfo, APIError]:
148
+ async def get_webhook_info(self, **other: typing.Any) -> Result[WebhookInfo, APIError]:
145
149
  """Method `getWebhookInfo`, see the [documentation](https://core.telegram.org/bots/api#getwebhookinfo)
146
150
 
147
151
  Use this method to get current webhook status. Requires no parameters.
@@ -208,19 +212,18 @@ class APIMethods:
208
212
  text: str,
209
213
  business_connection_id: str | None = None,
210
214
  message_thread_id: int | None = None,
211
- parse_mode: str | None = None,
215
+ parse_mode: str | None = default_params["parse_mode"],
212
216
  entities: list[MessageEntity] | None = None,
213
217
  link_preview_options: LinkPreviewOptions | None = None,
214
218
  disable_notification: bool | None = None,
215
219
  protect_content: bool | None = None,
220
+ message_effect_id: str | None = None,
216
221
  reply_parameters: ReplyParameters | None = None,
217
- reply_markup: (
218
- InlineKeyboardMarkup
219
- | ReplyKeyboardMarkup
220
- | ReplyKeyboardRemove
221
- | ForceReply
222
- | None
223
- ) = None,
222
+ reply_markup: InlineKeyboardMarkup
223
+ | ReplyKeyboardMarkup
224
+ | ReplyKeyboardRemove
225
+ | ForceReply
226
+ | None = None,
224
227
  **other: typing.Any,
225
228
  ) -> Result[Message, APIError]:
226
229
  """Method `sendMessage`, see the [documentation](https://core.telegram.org/bots/api#sendmessage)
@@ -250,6 +253,9 @@ class APIMethods:
250
253
 
251
254
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
252
255
 
256
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
257
+ chats only.
258
+
253
259
  :param reply_parameters: Description of the message to reply to.
254
260
 
255
261
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -275,8 +281,8 @@ class APIMethods:
275
281
  ) -> Result[Message, APIError]:
276
282
  """Method `forwardMessage`, see the [documentation](https://core.telegram.org/bots/api#forwardmessage)
277
283
 
278
- Use this method to forward messages of any kind. Service messages and messages
279
- with protected content can't be forwarded. On success, the sent Message
284
+ Use this method to forward messages of any kind. Service messages and messages
285
+ with protected content can't be forwarded. On success, the sent Message
280
286
  is returned.
281
287
 
282
288
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -313,10 +319,10 @@ class APIMethods:
313
319
  ) -> Result[list[MessageId], APIError]:
314
320
  """Method `forwardMessages`, see the [documentation](https://core.telegram.org/bots/api#forwardmessages)
315
321
 
316
- Use this method to forward multiple messages of any kind. If some of the specified
317
- messages can't be found or forwarded, they are skipped. Service messages
318
- and messages with protected content can't be forwarded. Album grouping
319
- is kept for forwarded messages. On success, an array of MessageId of the
322
+ Use this method to forward multiple messages of any kind. If some of the specified
323
+ messages can't be found or forwarded, they are skipped. Service messages
324
+ and messages with protected content can't be forwarded. Album grouping
325
+ is kept for forwarded messages. On success, an array of MessageId of the
320
326
  sent messages is returned.
321
327
 
322
328
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -351,28 +357,27 @@ class APIMethods:
351
357
  message_id: int,
352
358
  message_thread_id: int | None = None,
353
359
  caption: str | None = None,
354
- parse_mode: str | None = None,
360
+ parse_mode: str | None = default_params["parse_mode"],
355
361
  caption_entities: list[MessageEntity] | None = None,
362
+ show_caption_above_media: bool | None = None,
356
363
  disable_notification: bool | None = None,
357
364
  protect_content: bool | None = None,
358
365
  reply_parameters: ReplyParameters | None = None,
359
- reply_markup: (
360
- InlineKeyboardMarkup
361
- | ReplyKeyboardMarkup
362
- | ReplyKeyboardRemove
363
- | ForceReply
364
- | None
365
- ) = None,
366
+ reply_markup: InlineKeyboardMarkup
367
+ | ReplyKeyboardMarkup
368
+ | ReplyKeyboardRemove
369
+ | ForceReply
370
+ | None = None,
366
371
  **other: typing.Any,
367
372
  ) -> Result[MessageId, APIError]:
368
373
  """Method `copyMessage`, see the [documentation](https://core.telegram.org/bots/api#copymessage)
369
374
 
370
- Use this method to copy messages of any kind. Service messages, giveaway
371
- messages, giveaway winners messages, and invoice messages can't be copied.
372
- A quiz poll can be copied only if the value of the field correct_option_id
373
- is known to the bot. The method is analogous to the method forwardMessage,
374
- but the copied message doesn't have a link to the original message. Returns
375
- the MessageId of the sent message on success.
375
+ Use this method to copy messages of any kind. Service messages, paid media
376
+ messages, giveaway messages, giveaway winners messages, and invoice
377
+ messages can't be copied. A quiz poll can be copied only if the value of the
378
+ field correct_option_id is known to the bot. The method is analogous to
379
+ the method forwardMessage, but the copied message doesn't have a link to
380
+ the original message. Returns the MessageId of the sent message on success.
376
381
 
377
382
  :param chat_id: Unique identifier for the target chat or username of the target channel \
378
383
  (in the format @channelusername).
@@ -394,6 +399,9 @@ class APIMethods:
394
399
  :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, \
395
400
  which can be specified instead of parse_mode.
396
401
 
402
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Ignored \
403
+ if a new caption isn't specified.
404
+
397
405
  :param disable_notification: Sends the message silently. Users will receive a notification with no sound. \
398
406
 
399
407
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
@@ -424,14 +432,14 @@ class APIMethods:
424
432
  ) -> Result[list[MessageId], APIError]:
425
433
  """Method `copyMessages`, see the [documentation](https://core.telegram.org/bots/api#copymessages)
426
434
 
427
- Use this method to copy messages of any kind. If some of the specified messages
428
- can't be found or copied, they are skipped. Service messages, giveaway
429
- messages, giveaway winners messages, and invoice messages can't be copied.
430
- A quiz poll can be copied only if the value of the field correct_option_id
431
- is known to the bot. The method is analogous to the method forwardMessages,
432
- but the copied messages don't have a link to the original message. Album
433
- grouping is kept for copied messages. On success, an array of MessageId
434
- of the sent messages is returned.
435
+ Use this method to copy messages of any kind. If some of the specified messages
436
+ can't be found or copied, they are skipped. Service messages, paid media
437
+ messages, giveaway messages, giveaway winners messages, and invoice
438
+ messages can't be copied. A quiz poll can be copied only if the value of the
439
+ field correct_option_id is known to the bot. The method is analogous to
440
+ the method forwardMessages, but the copied messages don't have a link to
441
+ the original message. Album grouping is kept for copied messages. On success,
442
+ an array of MessageId of the sent messages is returned.
435
443
 
436
444
  :param chat_id: Unique identifier for the target chat or username of the target channel \
437
445
  (in the format @channelusername).
@@ -466,19 +474,19 @@ class APIMethods:
466
474
  business_connection_id: str | None = None,
467
475
  message_thread_id: int | None = None,
468
476
  caption: str | None = None,
469
- parse_mode: str | None = None,
477
+ parse_mode: str | None = default_params["parse_mode"],
470
478
  caption_entities: list[MessageEntity] | None = None,
479
+ show_caption_above_media: bool | None = None,
471
480
  has_spoiler: bool | None = None,
472
481
  disable_notification: bool | None = None,
473
482
  protect_content: bool | None = None,
483
+ message_effect_id: str | None = None,
474
484
  reply_parameters: ReplyParameters | None = None,
475
- reply_markup: (
476
- InlineKeyboardMarkup
477
- | ReplyKeyboardMarkup
478
- | ReplyKeyboardRemove
479
- | ForceReply
480
- | None
481
- ) = None,
485
+ reply_markup: InlineKeyboardMarkup
486
+ | ReplyKeyboardMarkup
487
+ | ReplyKeyboardRemove
488
+ | ForceReply
489
+ | None = None,
482
490
  **other: typing.Any,
483
491
  ) -> Result[Message, APIError]:
484
492
  """Method `sendPhoto`, see the [documentation](https://core.telegram.org/bots/api#sendphoto)
@@ -510,12 +518,17 @@ class APIMethods:
510
518
  :param caption_entities: A JSON-serialized list of special entities that appear in the caption, \
511
519
  which can be specified instead of parse_mode.
512
520
 
521
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media.
522
+
513
523
  :param has_spoiler: Pass True if the photo needs to be covered with a spoiler animation.
514
524
 
515
525
  :param disable_notification: Sends the message silently. Users will receive a notification with no sound. \
516
526
 
517
527
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
518
528
 
529
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
530
+ chats only.
531
+
519
532
  :param reply_parameters: Description of the message to reply to.
520
533
 
521
534
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -536,7 +549,7 @@ class APIMethods:
536
549
  business_connection_id: str | None = None,
537
550
  message_thread_id: int | None = None,
538
551
  caption: str | None = None,
539
- parse_mode: str | None = None,
552
+ parse_mode: str | None = default_params["parse_mode"],
540
553
  caption_entities: list[MessageEntity] | None = None,
541
554
  duration: int | None = None,
542
555
  performer: str | None = None,
@@ -544,22 +557,21 @@ class APIMethods:
544
557
  thumbnail: InputFile | str | None = None,
545
558
  disable_notification: bool | None = None,
546
559
  protect_content: bool | None = None,
560
+ message_effect_id: str | None = None,
547
561
  reply_parameters: ReplyParameters | None = None,
548
- reply_markup: (
549
- InlineKeyboardMarkup
550
- | ReplyKeyboardMarkup
551
- | ReplyKeyboardRemove
552
- | ForceReply
553
- | None
554
- ) = None,
562
+ reply_markup: InlineKeyboardMarkup
563
+ | ReplyKeyboardMarkup
564
+ | ReplyKeyboardRemove
565
+ | ForceReply
566
+ | None = None,
555
567
  **other: typing.Any,
556
568
  ) -> Result[Message, APIError]:
557
569
  """Method `sendAudio`, see the [documentation](https://core.telegram.org/bots/api#sendaudio)
558
570
 
559
- Use this method to send audio files, if you want Telegram clients to display
560
- them in the music player. Your audio must be in the .MP3 or .M4A format. On
561
- success, the sent Message is returned. Bots can currently send audio files
562
- of up to 50 MB in size, this limit may be changed in the future. For sending
571
+ Use this method to send audio files, if you want Telegram clients to display
572
+ them in the music player. Your audio must be in the .MP3 or .M4A format. On
573
+ success, the sent Message is returned. Bots can currently send audio files
574
+ of up to 50 MB in size, this limit may be changed in the future. For sending
563
575
  voice messages, use the sendVoice method instead.
564
576
 
565
577
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -602,6 +614,9 @@ class APIMethods:
602
614
 
603
615
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
604
616
 
617
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
618
+ chats only.
619
+
605
620
  :param reply_parameters: Description of the message to reply to.
606
621
 
607
622
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -623,25 +638,24 @@ class APIMethods:
623
638
  message_thread_id: int | None = None,
624
639
  thumbnail: InputFile | str | None = None,
625
640
  caption: str | None = None,
626
- parse_mode: str | None = None,
641
+ parse_mode: str | None = default_params["parse_mode"],
627
642
  caption_entities: list[MessageEntity] | None = None,
628
643
  disable_content_type_detection: bool | None = None,
629
644
  disable_notification: bool | None = None,
630
645
  protect_content: bool | None = None,
646
+ message_effect_id: str | None = None,
631
647
  reply_parameters: ReplyParameters | None = None,
632
- reply_markup: (
633
- InlineKeyboardMarkup
634
- | ReplyKeyboardMarkup
635
- | ReplyKeyboardRemove
636
- | ForceReply
637
- | None
638
- ) = None,
648
+ reply_markup: InlineKeyboardMarkup
649
+ | ReplyKeyboardMarkup
650
+ | ReplyKeyboardRemove
651
+ | ForceReply
652
+ | None = None,
639
653
  **other: typing.Any,
640
654
  ) -> Result[Message, APIError]:
641
655
  """Method `sendDocument`, see the [documentation](https://core.telegram.org/bots/api#senddocument)
642
656
 
643
- Use this method to send general files. On success, the sent Message is returned.
644
- Bots can currently send files of any type of up to 50 MB in size, this limit
657
+ Use this method to send general files. On success, the sent Message is returned.
658
+ Bots can currently send files of any type of up to 50 MB in size, this limit
645
659
  may be changed in the future.
646
660
 
647
661
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -682,6 +696,9 @@ class APIMethods:
682
696
 
683
697
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
684
698
 
699
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
700
+ chats only.
701
+
685
702
  :param reply_parameters: Description of the message to reply to.
686
703
 
687
704
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -706,27 +723,27 @@ class APIMethods:
706
723
  height: int | None = None,
707
724
  thumbnail: InputFile | str | None = None,
708
725
  caption: str | None = None,
709
- parse_mode: str | None = None,
726
+ parse_mode: str | None = default_params["parse_mode"],
710
727
  caption_entities: list[MessageEntity] | None = None,
728
+ show_caption_above_media: bool | None = None,
711
729
  has_spoiler: bool | None = None,
712
730
  supports_streaming: bool | None = None,
713
731
  disable_notification: bool | None = None,
714
732
  protect_content: bool | None = None,
733
+ message_effect_id: str | None = None,
715
734
  reply_parameters: ReplyParameters | None = None,
716
- reply_markup: (
717
- InlineKeyboardMarkup
718
- | ReplyKeyboardMarkup
719
- | ReplyKeyboardRemove
720
- | ForceReply
721
- | None
722
- ) = None,
735
+ reply_markup: InlineKeyboardMarkup
736
+ | ReplyKeyboardMarkup
737
+ | ReplyKeyboardRemove
738
+ | ForceReply
739
+ | None = None,
723
740
  **other: typing.Any,
724
741
  ) -> Result[Message, APIError]:
725
742
  """Method `sendVideo`, see the [documentation](https://core.telegram.org/bots/api#sendvideo)
726
743
 
727
- Use this method to send video files, Telegram clients support MPEG4 videos
728
- (other formats may be sent as Document). On success, the sent Message is
729
- returned. Bots can currently send video files of up to 50 MB in size, this
744
+ Use this method to send video files, Telegram clients support MPEG4 videos
745
+ (other formats may be sent as Document). On success, the sent Message is
746
+ returned. Bots can currently send video files of up to 50 MB in size, this
730
747
  limit may be changed in the future.
731
748
 
732
749
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -766,6 +783,8 @@ class APIMethods:
766
783
  :param caption_entities: A JSON-serialized list of special entities that appear in the caption, \
767
784
  which can be specified instead of parse_mode.
768
785
 
786
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media.
787
+
769
788
  :param has_spoiler: Pass True if the video needs to be covered with a spoiler animation.
770
789
 
771
790
  :param supports_streaming: Pass True if the uploaded video is suitable for streaming.
@@ -774,6 +793,9 @@ class APIMethods:
774
793
 
775
794
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
776
795
 
796
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
797
+ chats only.
798
+
777
799
  :param reply_parameters: Description of the message to reply to.
778
800
 
779
801
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -798,25 +820,25 @@ class APIMethods:
798
820
  height: int | None = None,
799
821
  thumbnail: InputFile | str | None = None,
800
822
  caption: str | None = None,
801
- parse_mode: str | None = None,
823
+ parse_mode: str | None = default_params["parse_mode"],
802
824
  caption_entities: list[MessageEntity] | None = None,
825
+ show_caption_above_media: bool | None = None,
803
826
  has_spoiler: bool | None = None,
804
827
  disable_notification: bool | None = None,
805
828
  protect_content: bool | None = None,
829
+ message_effect_id: str | None = None,
806
830
  reply_parameters: ReplyParameters | None = None,
807
- reply_markup: (
808
- InlineKeyboardMarkup
809
- | ReplyKeyboardMarkup
810
- | ReplyKeyboardRemove
811
- | ForceReply
812
- | None
813
- ) = None,
831
+ reply_markup: InlineKeyboardMarkup
832
+ | ReplyKeyboardMarkup
833
+ | ReplyKeyboardRemove
834
+ | ForceReply
835
+ | None = None,
814
836
  **other: typing.Any,
815
837
  ) -> Result[Message, APIError]:
816
838
  """Method `sendAnimation`, see the [documentation](https://core.telegram.org/bots/api#sendanimation)
817
839
 
818
- Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without
819
- sound). On success, the sent Message is returned. Bots can currently send
840
+ Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without
841
+ sound). On success, the sent Message is returned. Bots can currently send
820
842
  animation files of up to 50 MB in size, this limit may be changed in the future.
821
843
 
822
844
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -856,12 +878,17 @@ class APIMethods:
856
878
  :param caption_entities: A JSON-serialized list of special entities that appear in the caption, \
857
879
  which can be specified instead of parse_mode.
858
880
 
881
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media.
882
+
859
883
  :param has_spoiler: Pass True if the animation needs to be covered with a spoiler animation. \
860
884
 
861
885
  :param disable_notification: Sends the message silently. Users will receive a notification with no sound. \
862
886
 
863
887
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
864
888
 
889
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
890
+ chats only.
891
+
865
892
  :param reply_parameters: Description of the message to reply to.
866
893
 
867
894
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -882,28 +909,27 @@ class APIMethods:
882
909
  business_connection_id: str | None = None,
883
910
  message_thread_id: int | None = None,
884
911
  caption: str | None = None,
885
- parse_mode: str | None = None,
912
+ parse_mode: str | None = default_params["parse_mode"],
886
913
  caption_entities: list[MessageEntity] | None = None,
887
914
  duration: int | None = None,
888
915
  disable_notification: bool | None = None,
889
916
  protect_content: bool | None = None,
917
+ message_effect_id: str | None = None,
890
918
  reply_parameters: ReplyParameters | None = None,
891
- reply_markup: (
892
- InlineKeyboardMarkup
893
- | ReplyKeyboardMarkup
894
- | ReplyKeyboardRemove
895
- | ForceReply
896
- | None
897
- ) = None,
919
+ reply_markup: InlineKeyboardMarkup
920
+ | ReplyKeyboardMarkup
921
+ | ReplyKeyboardRemove
922
+ | ForceReply
923
+ | None = None,
898
924
  **other: typing.Any,
899
925
  ) -> Result[Message, APIError]:
900
926
  """Method `sendVoice`, see the [documentation](https://core.telegram.org/bots/api#sendvoice)
901
927
 
902
- Use this method to send audio files, if you want Telegram clients to display
903
- the file as a playable voice message. For this to work, your audio must be
904
- in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other
905
- formats may be sent as Audio or Document). On success, the sent Message is
906
- returned. Bots can currently send voice messages of up to 50 MB in size, this
928
+ Use this method to send audio files, if you want Telegram clients to display
929
+ the file as a playable voice message. For this to work, your audio must be
930
+ in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other
931
+ formats may be sent as Audio or Document). On success, the sent Message is
932
+ returned. Bots can currently send voice messages of up to 50 MB in size, this
907
933
  limit may be changed in the future.
908
934
 
909
935
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -934,6 +960,9 @@ class APIMethods:
934
960
 
935
961
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
936
962
 
963
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
964
+ chats only.
965
+
937
966
  :param reply_parameters: Description of the message to reply to.
938
967
 
939
968
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -958,20 +987,19 @@ class APIMethods:
958
987
  thumbnail: InputFile | str | None = None,
959
988
  disable_notification: bool | None = None,
960
989
  protect_content: bool | None = None,
990
+ message_effect_id: str | None = None,
961
991
  reply_parameters: ReplyParameters | None = None,
962
- reply_markup: (
963
- InlineKeyboardMarkup
964
- | ReplyKeyboardMarkup
965
- | ReplyKeyboardRemove
966
- | ForceReply
967
- | None
968
- ) = None,
992
+ reply_markup: InlineKeyboardMarkup
993
+ | ReplyKeyboardMarkup
994
+ | ReplyKeyboardRemove
995
+ | ForceReply
996
+ | None = None,
969
997
  **other: typing.Any,
970
998
  ) -> Result[Message, APIError]:
971
999
  """Method `sendVideoNote`, see the [documentation](https://core.telegram.org/bots/api#sendvideonote)
972
1000
 
973
- As of v.4.0, Telegram clients support rounded square MPEG4 videos of up
974
- to 1 minute long. Use this method to send video messages. On success, the
1001
+ As of v.4.0, Telegram clients support rounded square MPEG4 videos of up
1002
+ to 1 minute long. Use this method to send video messages. On success, the
975
1003
  sent Message is returned.
976
1004
 
977
1005
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -1004,6 +1032,9 @@ class APIMethods:
1004
1032
 
1005
1033
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
1006
1034
 
1035
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
1036
+ chats only.
1037
+
1007
1038
  :param reply_parameters: Description of the message to reply to.
1008
1039
 
1009
1040
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -1017,23 +1048,80 @@ class APIMethods:
1017
1048
  )
1018
1049
  return full_result(method_response, Message)
1019
1050
 
1051
+ async def send_paid_media(
1052
+ self,
1053
+ chat_id: int | str,
1054
+ star_count: int,
1055
+ media: list[InputPaidMedia],
1056
+ caption: str | None = None,
1057
+ parse_mode: str | None = default_params["parse_mode"],
1058
+ caption_entities: list[MessageEntity] | None = None,
1059
+ show_caption_above_media: bool | None = None,
1060
+ disable_notification: bool | None = None,
1061
+ protect_content: bool | None = None,
1062
+ reply_parameters: ReplyParameters | None = None,
1063
+ reply_markup: InlineKeyboardMarkup
1064
+ | ReplyKeyboardMarkup
1065
+ | ReplyKeyboardRemove
1066
+ | ForceReply
1067
+ | None = None,
1068
+ **other: typing.Any,
1069
+ ) -> Result[Message, APIError]:
1070
+ """Method `sendPaidMedia`, see the [documentation](https://core.telegram.org/bots/api#sendpaidmedia)
1071
+
1072
+ Use this method to send paid media to channel chats. On success, the sent
1073
+ Message is returned.
1074
+
1075
+ :param chat_id: Unique identifier for the target chat or username of the target channel \
1076
+ (in the format @channelusername).
1077
+
1078
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media. \
1079
+
1080
+ :param media: A JSON-serialized array describing the media to be sent; up to 10 items. \
1081
+
1082
+ :param caption: Media caption, 0-1024 characters after entities parsing.
1083
+
1084
+ :param parse_mode: Mode for parsing entities in the media caption. See formatting options \
1085
+ for more details.
1086
+
1087
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, \
1088
+ which can be specified instead of parse_mode.
1089
+
1090
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media.
1091
+
1092
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound. \
1093
+
1094
+ :param protect_content: Protects the contents of the sent message from forwarding and saving.
1095
+
1096
+ :param reply_parameters: Description of the message to reply to.
1097
+
1098
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
1099
+ keyboard, custom reply keyboard, instructions to remove a reply keyboard \
1100
+ or to force a reply from the user.
1101
+ """
1102
+
1103
+ method_response = await self.api.request_raw(
1104
+ "sendPaidMedia",
1105
+ get_params(locals()),
1106
+ )
1107
+ return full_result(method_response, Message)
1108
+
1020
1109
  async def send_media_group(
1021
1110
  self,
1022
1111
  chat_id: int | str,
1023
- media: list[
1024
- InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo
1025
- ],
1112
+ media: list[InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo],
1026
1113
  business_connection_id: str | None = None,
1027
1114
  message_thread_id: int | None = None,
1028
1115
  disable_notification: bool | None = None,
1029
1116
  protect_content: bool | None = None,
1117
+ message_effect_id: str | None = None,
1030
1118
  reply_parameters: ReplyParameters | None = None,
1031
1119
  **other: typing.Any,
1032
1120
  ) -> Result[list[Message], APIError]:
1033
1121
  """Method `sendMediaGroup`, see the [documentation](https://core.telegram.org/bots/api#sendmediagroup)
1034
1122
 
1035
- Use this method to send a group of photos, videos, documents or audios as
1036
- an album. Documents and audio files can be only grouped in an album with messages
1123
+ Use this method to send a group of photos, videos, documents or audios as
1124
+ an album. Documents and audio files can be only grouped in an album with messages
1037
1125
  of the same type. On success, an array of Messages that were sent is returned.
1038
1126
 
1039
1127
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -1052,6 +1140,9 @@ class APIMethods:
1052
1140
 
1053
1141
  :param protect_content: Protects the contents of the sent messages from forwarding and saving. \
1054
1142
 
1143
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
1144
+ chats only.
1145
+
1055
1146
  :param reply_parameters: Description of the message to reply to.
1056
1147
  """
1057
1148
 
@@ -1074,14 +1165,13 @@ class APIMethods:
1074
1165
  proximity_alert_radius: int | None = None,
1075
1166
  disable_notification: bool | None = None,
1076
1167
  protect_content: bool | None = None,
1168
+ message_effect_id: str | None = None,
1077
1169
  reply_parameters: ReplyParameters | None = None,
1078
- reply_markup: (
1079
- InlineKeyboardMarkup
1080
- | ReplyKeyboardMarkup
1081
- | ReplyKeyboardRemove
1082
- | ForceReply
1083
- | None
1084
- ) = None,
1170
+ reply_markup: InlineKeyboardMarkup
1171
+ | ReplyKeyboardMarkup
1172
+ | ReplyKeyboardRemove
1173
+ | ForceReply
1174
+ | None = None,
1085
1175
  **other: typing.Any,
1086
1176
  ) -> Result[Message, APIError]:
1087
1177
  """Method `sendLocation`, see the [documentation](https://core.telegram.org/bots/api#sendlocation)
@@ -1117,6 +1207,9 @@ class APIMethods:
1117
1207
 
1118
1208
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
1119
1209
 
1210
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
1211
+ chats only.
1212
+
1120
1213
  :param reply_parameters: Description of the message to reply to.
1121
1214
 
1122
1215
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -1145,19 +1238,18 @@ class APIMethods:
1145
1238
  google_place_type: str | None = None,
1146
1239
  disable_notification: bool | None = None,
1147
1240
  protect_content: bool | None = None,
1241
+ message_effect_id: str | None = None,
1148
1242
  reply_parameters: ReplyParameters | None = None,
1149
- reply_markup: (
1150
- InlineKeyboardMarkup
1151
- | ReplyKeyboardMarkup
1152
- | ReplyKeyboardRemove
1153
- | ForceReply
1154
- | None
1155
- ) = None,
1243
+ reply_markup: InlineKeyboardMarkup
1244
+ | ReplyKeyboardMarkup
1245
+ | ReplyKeyboardRemove
1246
+ | ForceReply
1247
+ | None = None,
1156
1248
  **other: typing.Any,
1157
1249
  ) -> Result[Message, APIError]:
1158
1250
  """Method `sendVenue`, see the [documentation](https://core.telegram.org/bots/api#sendvenue)
1159
1251
 
1160
- Use this method to send information about a venue. On success, the sent Message
1252
+ Use this method to send information about a venue. On success, the sent Message
1161
1253
  is returned.
1162
1254
 
1163
1255
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -1190,6 +1282,9 @@ class APIMethods:
1190
1282
 
1191
1283
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
1192
1284
 
1285
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
1286
+ chats only.
1287
+
1193
1288
  :param reply_parameters: Description of the message to reply to.
1194
1289
 
1195
1290
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -1214,14 +1309,13 @@ class APIMethods:
1214
1309
  vcard: str | None = None,
1215
1310
  disable_notification: bool | None = None,
1216
1311
  protect_content: bool | None = None,
1312
+ message_effect_id: str | None = None,
1217
1313
  reply_parameters: ReplyParameters | None = None,
1218
- reply_markup: (
1219
- InlineKeyboardMarkup
1220
- | ReplyKeyboardMarkup
1221
- | ReplyKeyboardRemove
1222
- | ForceReply
1223
- | None
1224
- ) = None,
1314
+ reply_markup: InlineKeyboardMarkup
1315
+ | ReplyKeyboardMarkup
1316
+ | ReplyKeyboardRemove
1317
+ | ForceReply
1318
+ | None = None,
1225
1319
  **other: typing.Any,
1226
1320
  ) -> Result[Message, APIError]:
1227
1321
  """Method `sendContact`, see the [documentation](https://core.telegram.org/bots/api#sendcontact)
@@ -1249,6 +1343,9 @@ class APIMethods:
1249
1343
 
1250
1344
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
1251
1345
 
1346
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
1347
+ chats only.
1348
+
1252
1349
  :param reply_parameters: Description of the message to reply to.
1253
1350
 
1254
1351
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -1269,28 +1366,27 @@ class APIMethods:
1269
1366
  options: list[InputPollOption],
1270
1367
  business_connection_id: str | None = None,
1271
1368
  message_thread_id: int | None = None,
1272
- question_parse_mode: str | None = None,
1369
+ question_parse_mode: str | None = default_params["question_parse_mode"],
1273
1370
  question_entities: list[MessageEntity] | None = None,
1274
1371
  is_anonymous: bool | None = None,
1275
1372
  type: typing.Literal["quiz", "regular"] | None = None,
1276
1373
  allows_multiple_answers: bool | None = None,
1277
1374
  correct_option_id: int | None = None,
1278
1375
  explanation: str | None = None,
1279
- explanation_parse_mode: str | None = None,
1376
+ explanation_parse_mode: str | None = default_params["explanation_parse_mode"],
1280
1377
  explanation_entities: list[MessageEntity] | None = None,
1281
1378
  open_period: int | None = None,
1282
1379
  close_date: datetime | int | None = None,
1283
1380
  is_closed: bool | None = None,
1284
1381
  disable_notification: bool | None = None,
1285
1382
  protect_content: bool | None = None,
1383
+ message_effect_id: str | None = None,
1286
1384
  reply_parameters: ReplyParameters | None = None,
1287
- reply_markup: (
1288
- InlineKeyboardMarkup
1289
- | ReplyKeyboardMarkup
1290
- | ReplyKeyboardRemove
1291
- | ForceReply
1292
- | None
1293
- ) = None,
1385
+ reply_markup: InlineKeyboardMarkup
1386
+ | ReplyKeyboardMarkup
1387
+ | ReplyKeyboardRemove
1388
+ | ForceReply
1389
+ | None = None,
1294
1390
  **other: typing.Any,
1295
1391
  ) -> Result[Message, APIError]:
1296
1392
  """Method `sendPoll`, see the [documentation](https://core.telegram.org/bots/api#sendpoll)
@@ -1350,6 +1446,9 @@ class APIMethods:
1350
1446
 
1351
1447
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
1352
1448
 
1449
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
1450
+ chats only.
1451
+
1353
1452
  :param reply_parameters: Description of the message to reply to.
1354
1453
 
1355
1454
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -1371,19 +1470,18 @@ class APIMethods:
1371
1470
  emoji: DiceEmoji | None = None,
1372
1471
  disable_notification: bool | None = None,
1373
1472
  protect_content: bool | None = None,
1473
+ message_effect_id: str | None = None,
1374
1474
  reply_parameters: ReplyParameters | None = None,
1375
- reply_markup: (
1376
- InlineKeyboardMarkup
1377
- | ReplyKeyboardMarkup
1378
- | ReplyKeyboardRemove
1379
- | ForceReply
1380
- | None
1381
- ) = None,
1475
+ reply_markup: InlineKeyboardMarkup
1476
+ | ReplyKeyboardMarkup
1477
+ | ReplyKeyboardRemove
1478
+ | ForceReply
1479
+ | None = None,
1382
1480
  **other: typing.Any,
1383
1481
  ) -> Result[Message, APIError]:
1384
1482
  """Method `sendDice`, see the [documentation](https://core.telegram.org/bots/api#senddice)
1385
1483
 
1386
- Use this method to send an animated emoji that will display a random value.
1484
+ Use this method to send an animated emoji that will display a random value.
1387
1485
  On success, the sent Message is returned.
1388
1486
 
1389
1487
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -1403,6 +1501,9 @@ class APIMethods:
1403
1501
 
1404
1502
  :param protect_content: Protects the contents of the sent message from forwarding.
1405
1503
 
1504
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
1505
+ chats only.
1506
+
1406
1507
  :param reply_parameters: Description of the message to reply to.
1407
1508
 
1408
1509
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -1426,10 +1527,10 @@ class APIMethods:
1426
1527
  ) -> Result[bool, APIError]:
1427
1528
  """Method `sendChatAction`, see the [documentation](https://core.telegram.org/bots/api#sendchataction)
1428
1529
 
1429
- Use this method when you need to tell the user that something is happening
1430
- on the bot's side. The status is set for 5 seconds or less (when a message arrives
1431
- from your bot, Telegram clients clear its typing status). Returns True
1432
- on success. We only recommend using this method when a response from the
1530
+ Use this method when you need to tell the user that something is happening
1531
+ on the bot's side. The status is set for 5 seconds or less (when a message arrives
1532
+ from your bot, Telegram clients clear its typing status). Returns True
1533
+ on success. We only recommend using this method when a response from the
1433
1534
  bot will take a noticeable amount of time to arrive.
1434
1535
 
1435
1536
  :param business_connection_id: Unique identifier of the business connection on behalf of which the action \
@@ -1464,9 +1565,9 @@ class APIMethods:
1464
1565
  ) -> Result[bool, APIError]:
1465
1566
  """Method `setMessageReaction`, see the [documentation](https://core.telegram.org/bots/api#setmessagereaction)
1466
1567
 
1467
- Use this method to change the chosen reactions on a message. Service messages
1468
- can't be reacted to. Automatically forwarded messages from a channel to
1469
- its discussion group have the same available reactions as messages in the
1568
+ Use this method to change the chosen reactions on a message. Service messages
1569
+ can't be reacted to. Automatically forwarded messages from a channel to
1570
+ its discussion group have the same available reactions as messages in the
1470
1571
  channel. Returns True on success.
1471
1572
 
1472
1573
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1498,7 +1599,7 @@ class APIMethods:
1498
1599
  ) -> Result[UserProfilePhotos, APIError]:
1499
1600
  """Method `getUserProfilePhotos`, see the [documentation](https://core.telegram.org/bots/api#getuserprofilephotos)
1500
1601
 
1501
- Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos
1602
+ Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos
1502
1603
  object.
1503
1604
 
1504
1605
  :param user_id: Unique identifier of the target user.
@@ -1551,10 +1652,10 @@ class APIMethods:
1551
1652
  ) -> Result[bool, APIError]:
1552
1653
  """Method `banChatMember`, see the [documentation](https://core.telegram.org/bots/api#banchatmember)
1553
1654
 
1554
- Use this method to ban a user in a group, a supergroup or a channel. In the case
1555
- of supergroups and channels, the user will not be able to return to the chat
1556
- on their own using invite links, etc., unless unbanned first. The bot must
1557
- be an administrator in the chat for this to work and must have the appropriate
1655
+ Use this method to ban a user in a group, a supergroup or a channel. In the case
1656
+ of supergroups and channels, the user will not be able to return to the chat
1657
+ on their own using invite links, etc., unless unbanned first. The bot must
1658
+ be an administrator in the chat for this to work and must have the appropriate
1558
1659
  administrator rights. Returns True on success.
1559
1660
 
1560
1661
  :param chat_id: Unique identifier for the target group or username of the target supergroup \
@@ -1586,12 +1687,12 @@ class APIMethods:
1586
1687
  ) -> Result[bool, APIError]:
1587
1688
  """Method `unbanChatMember`, see the [documentation](https://core.telegram.org/bots/api#unbanchatmember)
1588
1689
 
1589
- Use this method to unban a previously banned user in a supergroup or channel.
1590
- The user will not return to the group or channel automatically, but will
1591
- be able to join via link, etc. The bot must be an administrator for this to
1592
- work. By default, this method guarantees that after the call the user is
1593
- not a member of the chat, but will be able to join it. So if the user is a member
1594
- of the chat they will also be removed from the chat. If you don't want this,
1690
+ Use this method to unban a previously banned user in a supergroup or channel.
1691
+ The user will not return to the group or channel automatically, but will
1692
+ be able to join via link, etc. The bot must be an administrator for this to
1693
+ work. By default, this method guarantees that after the call the user is
1694
+ not a member of the chat, but will be able to join it. So if the user is a member
1695
+ of the chat they will also be removed from the chat. If you don't want this,
1595
1696
  use the parameter only_if_banned. Returns True on success.
1596
1697
 
1597
1698
  :param chat_id: Unique identifier for the target group or username of the target supergroup \
@@ -1619,9 +1720,9 @@ class APIMethods:
1619
1720
  ) -> Result[bool, APIError]:
1620
1721
  """Method `restrictChatMember`, see the [documentation](https://core.telegram.org/bots/api#restrictchatmember)
1621
1722
 
1622
- Use this method to restrict a user in a supergroup. The bot must be an administrator
1623
- in the supergroup for this to work and must have the appropriate administrator
1624
- rights. Pass True for all permissions to lift restrictions from a user.
1723
+ Use this method to restrict a user in a supergroup. The bot must be an administrator
1724
+ in the supergroup for this to work and must have the appropriate administrator
1725
+ rights. Pass True for all permissions to lift restrictions from a user.
1625
1726
  Returns True on success.
1626
1727
 
1627
1728
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -1671,9 +1772,9 @@ class APIMethods:
1671
1772
  ) -> Result[bool, APIError]:
1672
1773
  """Method `promoteChatMember`, see the [documentation](https://core.telegram.org/bots/api#promotechatmember)
1673
1774
 
1674
- Use this method to promote or demote a user in a supergroup or a channel. The
1675
- bot must be an administrator in the chat for this to work and must have the
1676
- appropriate administrator rights. Pass False for all boolean parameters
1775
+ Use this method to promote or demote a user in a supergroup or a channel. The
1776
+ bot must be an administrator in the chat for this to work and must have the
1777
+ appropriate administrator rights. Pass False for all boolean parameters
1677
1778
  to demote a user. Returns True on success.
1678
1779
 
1679
1780
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1737,7 +1838,7 @@ class APIMethods:
1737
1838
  ) -> Result[bool, APIError]:
1738
1839
  """Method `setChatAdministratorCustomTitle`, see the [documentation](https://core.telegram.org/bots/api#setchatadministratorcustomtitle)
1739
1840
 
1740
- Use this method to set a custom title for an administrator in a supergroup
1841
+ Use this method to set a custom title for an administrator in a supergroup
1741
1842
  promoted by the bot. Returns True on success.
1742
1843
 
1743
1844
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -1763,10 +1864,10 @@ class APIMethods:
1763
1864
  ) -> Result[bool, APIError]:
1764
1865
  """Method `banChatSenderChat`, see the [documentation](https://core.telegram.org/bots/api#banchatsenderchat)
1765
1866
 
1766
- Use this method to ban a channel chat in a supergroup or a channel. Until the
1767
- chat is unbanned, the owner of the banned chat won't be able to send messages
1768
- on behalf of any of their channels. The bot must be an administrator in the
1769
- supergroup or channel for this to work and must have the appropriate administrator
1867
+ Use this method to ban a channel chat in a supergroup or a channel. Until the
1868
+ chat is unbanned, the owner of the banned chat won't be able to send messages
1869
+ on behalf of any of their channels. The bot must be an administrator in the
1870
+ supergroup or channel for this to work and must have the appropriate administrator
1770
1871
  rights. Returns True on success.
1771
1872
 
1772
1873
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1789,8 +1890,8 @@ class APIMethods:
1789
1890
  ) -> Result[bool, APIError]:
1790
1891
  """Method `unbanChatSenderChat`, see the [documentation](https://core.telegram.org/bots/api#unbanchatsenderchat)
1791
1892
 
1792
- Use this method to unban a previously banned channel chat in a supergroup
1793
- or channel. The bot must be an administrator for this to work and must have
1893
+ Use this method to unban a previously banned channel chat in a supergroup
1894
+ or channel. The bot must be an administrator for this to work and must have
1794
1895
  the appropriate administrator rights. Returns True on success.
1795
1896
 
1796
1897
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1814,9 +1915,9 @@ class APIMethods:
1814
1915
  ) -> Result[bool, APIError]:
1815
1916
  """Method `setChatPermissions`, see the [documentation](https://core.telegram.org/bots/api#setchatpermissions)
1816
1917
 
1817
- Use this method to set default chat permissions for all members. The bot
1818
- must be an administrator in the group or a supergroup for this to work and
1819
- must have the can_restrict_members administrator rights. Returns True
1918
+ Use this method to set default chat permissions for all members. The bot
1919
+ must be an administrator in the group or a supergroup for this to work and
1920
+ must have the can_restrict_members administrator rights. Returns True
1820
1921
  on success.
1821
1922
 
1822
1923
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -1844,9 +1945,9 @@ class APIMethods:
1844
1945
  ) -> Result[str, APIError]:
1845
1946
  """Method `exportChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#exportchatinvitelink)
1846
1947
 
1847
- Use this method to generate a new primary invite link for a chat; any previously
1848
- generated primary link is revoked. The bot must be an administrator in the
1849
- chat for this to work and must have the appropriate administrator rights.
1948
+ Use this method to generate a new primary invite link for a chat; any previously
1949
+ generated primary link is revoked. The bot must be an administrator in the
1950
+ chat for this to work and must have the appropriate administrator rights.
1850
1951
  Returns the new invite link as String on success.
1851
1952
 
1852
1953
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1870,9 +1971,9 @@ class APIMethods:
1870
1971
  ) -> Result[ChatInviteLink, APIError]:
1871
1972
  """Method `createChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#createchatinvitelink)
1872
1973
 
1873
- Use this method to create an additional invite link for a chat. The bot must
1874
- be an administrator in the chat for this to work and must have the appropriate
1875
- administrator rights. The link can be revoked using the method revokeChatInviteLink.
1974
+ Use this method to create an additional invite link for a chat. The bot must
1975
+ be an administrator in the chat for this to work and must have the appropriate
1976
+ administrator rights. The link can be revoked using the method revokeChatInviteLink.
1876
1977
  Returns the new invite link as ChatInviteLink object.
1877
1978
 
1878
1979
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1907,9 +2008,9 @@ class APIMethods:
1907
2008
  ) -> Result[ChatInviteLink, APIError]:
1908
2009
  """Method `editChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#editchatinvitelink)
1909
2010
 
1910
- Use this method to edit a non-primary invite link created by the bot. The
1911
- bot must be an administrator in the chat for this to work and must have the
1912
- appropriate administrator rights. Returns the edited invite link as a
2011
+ Use this method to edit a non-primary invite link created by the bot. The
2012
+ bot must be an administrator in the chat for this to work and must have the
2013
+ appropriate administrator rights. Returns the edited invite link as a
1913
2014
  ChatInviteLink object.
1914
2015
 
1915
2016
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1942,10 +2043,10 @@ class APIMethods:
1942
2043
  ) -> Result[ChatInviteLink, APIError]:
1943
2044
  """Method `revokeChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#revokechatinvitelink)
1944
2045
 
1945
- Use this method to revoke an invite link created by the bot. If the primary
1946
- link is revoked, a new link is automatically generated. The bot must be an
1947
- administrator in the chat for this to work and must have the appropriate
1948
- administrator rights. Returns the revoked invite link as ChatInviteLink
2046
+ Use this method to revoke an invite link created by the bot. If the primary
2047
+ link is revoked, a new link is automatically generated. The bot must be an
2048
+ administrator in the chat for this to work and must have the appropriate
2049
+ administrator rights. Returns the revoked invite link as ChatInviteLink
1949
2050
  object.
1950
2051
 
1951
2052
  :param chat_id: Unique identifier of the target chat or username of the target channel (in \
@@ -1968,8 +2069,8 @@ class APIMethods:
1968
2069
  ) -> Result[bool, APIError]:
1969
2070
  """Method `approveChatJoinRequest`, see the [documentation](https://core.telegram.org/bots/api#approvechatjoinrequest)
1970
2071
 
1971
- Use this method to approve a chat join request. The bot must be an administrator
1972
- in the chat for this to work and must have the can_invite_users administrator
2072
+ Use this method to approve a chat join request. The bot must be an administrator
2073
+ in the chat for this to work and must have the can_invite_users administrator
1973
2074
  right. Returns True on success.
1974
2075
 
1975
2076
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -1992,8 +2093,8 @@ class APIMethods:
1992
2093
  ) -> Result[bool, APIError]:
1993
2094
  """Method `declineChatJoinRequest`, see the [documentation](https://core.telegram.org/bots/api#declinechatjoinrequest)
1994
2095
 
1995
- Use this method to decline a chat join request. The bot must be an administrator
1996
- in the chat for this to work and must have the can_invite_users administrator
2096
+ Use this method to decline a chat join request. The bot must be an administrator
2097
+ in the chat for this to work and must have the can_invite_users administrator
1997
2098
  right. Returns True on success.
1998
2099
 
1999
2100
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2016,9 +2117,9 @@ class APIMethods:
2016
2117
  ) -> Result[bool, APIError]:
2017
2118
  """Method `setChatPhoto`, see the [documentation](https://core.telegram.org/bots/api#setchatphoto)
2018
2119
 
2019
- Use this method to set a new profile photo for the chat. Photos can't be changed
2020
- for private chats. The bot must be an administrator in the chat for this to
2021
- work and must have the appropriate administrator rights. Returns True
2120
+ Use this method to set a new profile photo for the chat. Photos can't be changed
2121
+ for private chats. The bot must be an administrator in the chat for this to
2122
+ work and must have the appropriate administrator rights. Returns True
2022
2123
  on success.
2023
2124
 
2024
2125
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2040,8 +2141,8 @@ class APIMethods:
2040
2141
  ) -> Result[bool, APIError]:
2041
2142
  """Method `deleteChatPhoto`, see the [documentation](https://core.telegram.org/bots/api#deletechatphoto)
2042
2143
 
2043
- Use this method to delete a chat photo. Photos can't be changed for private
2044
- chats. The bot must be an administrator in the chat for this to work and must
2144
+ Use this method to delete a chat photo. Photos can't be changed for private
2145
+ chats. The bot must be an administrator in the chat for this to work and must
2045
2146
  have the appropriate administrator rights. Returns True on success.
2046
2147
 
2047
2148
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2062,8 +2163,8 @@ class APIMethods:
2062
2163
  ) -> Result[bool, APIError]:
2063
2164
  """Method `setChatTitle`, see the [documentation](https://core.telegram.org/bots/api#setchattitle)
2064
2165
 
2065
- Use this method to change the title of a chat. Titles can't be changed for
2066
- private chats. The bot must be an administrator in the chat for this to work
2166
+ Use this method to change the title of a chat. Titles can't be changed for
2167
+ private chats. The bot must be an administrator in the chat for this to work
2067
2168
  and must have the appropriate administrator rights. Returns True on success.
2068
2169
 
2069
2170
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2086,8 +2187,8 @@ class APIMethods:
2086
2187
  ) -> Result[bool, APIError]:
2087
2188
  """Method `setChatDescription`, see the [documentation](https://core.telegram.org/bots/api#setchatdescription)
2088
2189
 
2089
- Use this method to change the description of a group, a supergroup or a channel.
2090
- The bot must be an administrator in the chat for this to work and must have
2190
+ Use this method to change the description of a group, a supergroup or a channel.
2191
+ The bot must be an administrator in the chat for this to work and must have
2091
2192
  the appropriate administrator rights. Returns True on success.
2092
2193
 
2093
2194
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2111,10 +2212,10 @@ class APIMethods:
2111
2212
  ) -> Result[bool, APIError]:
2112
2213
  """Method `pinChatMessage`, see the [documentation](https://core.telegram.org/bots/api#pinchatmessage)
2113
2214
 
2114
- Use this method to add a message to the list of pinned messages in a chat. If
2115
- the chat is not a private chat, the bot must be an administrator in the chat
2116
- for this to work and must have the 'can_pin_messages' administrator right
2117
- in a supergroup or 'can_edit_messages' administrator right in a channel.
2215
+ Use this method to add a message to the list of pinned messages in a chat. If
2216
+ the chat is not a private chat, the bot must be an administrator in the chat
2217
+ for this to work and must have the 'can_pin_messages' administrator right
2218
+ in a supergroup or 'can_edit_messages' administrator right in a channel.
2118
2219
  Returns True on success.
2119
2220
 
2120
2221
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2141,10 +2242,10 @@ class APIMethods:
2141
2242
  ) -> Result[bool, APIError]:
2142
2243
  """Method `unpinChatMessage`, see the [documentation](https://core.telegram.org/bots/api#unpinchatmessage)
2143
2244
 
2144
- Use this method to remove a message from the list of pinned messages in a chat.
2145
- If the chat is not a private chat, the bot must be an administrator in the chat
2146
- for this to work and must have the 'can_pin_messages' administrator right
2147
- in a supergroup or 'can_edit_messages' administrator right in a channel.
2245
+ Use this method to remove a message from the list of pinned messages in a chat.
2246
+ If the chat is not a private chat, the bot must be an administrator in the chat
2247
+ for this to work and must have the 'can_pin_messages' administrator right
2248
+ in a supergroup or 'can_edit_messages' administrator right in a channel.
2148
2249
  Returns True on success.
2149
2250
 
2150
2251
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2167,10 +2268,10 @@ class APIMethods:
2167
2268
  ) -> Result[bool, APIError]:
2168
2269
  """Method `unpinAllChatMessages`, see the [documentation](https://core.telegram.org/bots/api#unpinallchatmessages)
2169
2270
 
2170
- Use this method to clear the list of pinned messages in a chat. If the chat
2171
- is not a private chat, the bot must be an administrator in the chat for this
2172
- to work and must have the 'can_pin_messages' administrator right in a supergroup
2173
- or 'can_edit_messages' administrator right in a channel. Returns True
2271
+ Use this method to clear the list of pinned messages in a chat. If the chat
2272
+ is not a private chat, the bot must be an administrator in the chat for this
2273
+ to work and must have the 'can_pin_messages' administrator right in a supergroup
2274
+ or 'can_edit_messages' administrator right in a channel. Returns True
2174
2275
  on success.
2175
2276
 
2176
2277
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -2190,7 +2291,7 @@ class APIMethods:
2190
2291
  ) -> Result[bool, APIError]:
2191
2292
  """Method `leaveChat`, see the [documentation](https://core.telegram.org/bots/api#leavechat)
2192
2293
 
2193
- Use this method for your bot to leave a group, supergroup or channel. Returns
2294
+ Use this method for your bot to leave a group, supergroup or channel. Returns
2194
2295
  True on success.
2195
2296
 
2196
2297
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2210,7 +2311,7 @@ class APIMethods:
2210
2311
  ) -> Result[ChatFullInfo, APIError]:
2211
2312
  """Method `getChat`, see the [documentation](https://core.telegram.org/bots/api#getchat)
2212
2313
 
2213
- Use this method to get up-to-date information about the chat. Returns a
2314
+ Use this method to get up-to-date information about the chat. Returns a
2214
2315
  ChatFullInfo object on success.
2215
2316
 
2216
2317
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2242,7 +2343,7 @@ class APIMethods:
2242
2343
  ]:
2243
2344
  """Method `getChatAdministrators`, see the [documentation](https://core.telegram.org/bots/api#getchatadministrators)
2244
2345
 
2245
- Use this method to get a list of administrators in a chat, which aren't bots.
2346
+ Use this method to get a list of administrators in a chat, which aren't bots.
2246
2347
  Returns an Array of ChatMember objects.
2247
2348
 
2248
2349
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2304,8 +2405,8 @@ class APIMethods:
2304
2405
  ]:
2305
2406
  """Method `getChatMember`, see the [documentation](https://core.telegram.org/bots/api#getchatmember)
2306
2407
 
2307
- Use this method to get information about a member of a chat. The method is
2308
- only guaranteed to work for other users if the bot is an administrator in
2408
+ Use this method to get information about a member of a chat. The method is
2409
+ only guaranteed to work for other users if the bot is an administrator in
2309
2410
  the chat. Returns a ChatMember object on success.
2310
2411
 
2311
2412
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2338,10 +2439,10 @@ class APIMethods:
2338
2439
  ) -> Result[bool, APIError]:
2339
2440
  """Method `setChatStickerSet`, see the [documentation](https://core.telegram.org/bots/api#setchatstickerset)
2340
2441
 
2341
- Use this method to set a new group sticker set for a supergroup. The bot must
2342
- be an administrator in the chat for this to work and must have the appropriate
2343
- administrator rights. Use the field can_set_sticker_set optionally
2344
- returned in getChat requests to check if the bot can use this method. Returns
2442
+ Use this method to set a new group sticker set for a supergroup. The bot must
2443
+ be an administrator in the chat for this to work and must have the appropriate
2444
+ administrator rights. Use the field can_set_sticker_set optionally
2445
+ returned in getChat requests to check if the bot can use this method. Returns
2345
2446
  True on success.
2346
2447
 
2347
2448
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2363,10 +2464,10 @@ class APIMethods:
2363
2464
  ) -> Result[bool, APIError]:
2364
2465
  """Method `deleteChatStickerSet`, see the [documentation](https://core.telegram.org/bots/api#deletechatstickerset)
2365
2466
 
2366
- Use this method to delete a group sticker set from a supergroup. The bot must
2367
- be an administrator in the chat for this to work and must have the appropriate
2368
- administrator rights. Use the field can_set_sticker_set optionally
2369
- returned in getChat requests to check if the bot can use this method. Returns
2467
+ Use this method to delete a group sticker set from a supergroup. The bot must
2468
+ be an administrator in the chat for this to work and must have the appropriate
2469
+ administrator rights. Use the field can_set_sticker_set optionally
2470
+ returned in getChat requests to check if the bot can use this method. Returns
2370
2471
  True on success.
2371
2472
 
2372
2473
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2379,9 +2480,7 @@ class APIMethods:
2379
2480
  )
2380
2481
  return full_result(method_response, bool)
2381
2482
 
2382
- async def get_forum_topic_icon_stickers(
2383
- self, **other: typing.Any
2384
- ) -> Result[list[Sticker], APIError]:
2483
+ async def get_forum_topic_icon_stickers(self, **other: typing.Any) -> Result[list[Sticker], APIError]:
2385
2484
  """Method `getForumTopicIconStickers`, see the [documentation](https://core.telegram.org/bots/api#getforumtopiciconstickers)
2386
2485
 
2387
2486
  Use this method to get custom emoji stickers, which can be used as a forum
@@ -2405,9 +2504,9 @@ class APIMethods:
2405
2504
  ) -> Result[ForumTopic, APIError]:
2406
2505
  """Method `createForumTopic`, see the [documentation](https://core.telegram.org/bots/api#createforumtopic)
2407
2506
 
2408
- Use this method to create a topic in a forum supergroup chat. The bot must
2409
- be an administrator in the chat for this to work and must have the can_manage_topics
2410
- administrator rights. Returns information about the created topic as
2507
+ Use this method to create a topic in a forum supergroup chat. The bot must
2508
+ be an administrator in the chat for this to work and must have the can_manage_topics
2509
+ administrator rights. Returns information about the created topic as
2411
2510
  a ForumTopic object.
2412
2511
 
2413
2512
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2439,9 +2538,9 @@ class APIMethods:
2439
2538
  ) -> Result[bool, APIError]:
2440
2539
  """Method `editForumTopic`, see the [documentation](https://core.telegram.org/bots/api#editforumtopic)
2441
2540
 
2442
- Use this method to edit name and icon of a topic in a forum supergroup chat.
2443
- The bot must be an administrator in the chat for this to work and must have
2444
- can_manage_topics administrator rights, unless it is the creator of the
2541
+ Use this method to edit name and icon of a topic in a forum supergroup chat.
2542
+ The bot must be an administrator in the chat for this to work and must have
2543
+ can_manage_topics administrator rights, unless it is the creator of the
2445
2544
  topic. Returns True on success.
2446
2545
 
2447
2546
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2471,9 +2570,9 @@ class APIMethods:
2471
2570
  ) -> Result[bool, APIError]:
2472
2571
  """Method `closeForumTopic`, see the [documentation](https://core.telegram.org/bots/api#closeforumtopic)
2473
2572
 
2474
- Use this method to close an open topic in a forum supergroup chat. The bot
2475
- must be an administrator in the chat for this to work and must have the can_manage_topics
2476
- administrator rights, unless it is the creator of the topic. Returns True
2573
+ Use this method to close an open topic in a forum supergroup chat. The bot
2574
+ must be an administrator in the chat for this to work and must have the can_manage_topics
2575
+ administrator rights, unless it is the creator of the topic. Returns True
2477
2576
  on success.
2478
2577
 
2479
2578
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2496,9 +2595,9 @@ class APIMethods:
2496
2595
  ) -> Result[bool, APIError]:
2497
2596
  """Method `reopenForumTopic`, see the [documentation](https://core.telegram.org/bots/api#reopenforumtopic)
2498
2597
 
2499
- Use this method to reopen a closed topic in a forum supergroup chat. The bot
2500
- must be an administrator in the chat for this to work and must have the can_manage_topics
2501
- administrator rights, unless it is the creator of the topic. Returns True
2598
+ Use this method to reopen a closed topic in a forum supergroup chat. The bot
2599
+ must be an administrator in the chat for this to work and must have the can_manage_topics
2600
+ administrator rights, unless it is the creator of the topic. Returns True
2502
2601
  on success.
2503
2602
 
2504
2603
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2521,9 +2620,9 @@ class APIMethods:
2521
2620
  ) -> Result[bool, APIError]:
2522
2621
  """Method `deleteForumTopic`, see the [documentation](https://core.telegram.org/bots/api#deleteforumtopic)
2523
2622
 
2524
- Use this method to delete a forum topic along with all its messages in a forum
2525
- supergroup chat. The bot must be an administrator in the chat for this to
2526
- work and must have the can_delete_messages administrator rights. Returns
2623
+ Use this method to delete a forum topic along with all its messages in a forum
2624
+ supergroup chat. The bot must be an administrator in the chat for this to
2625
+ work and must have the can_delete_messages administrator rights. Returns
2527
2626
  True on success.
2528
2627
 
2529
2628
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2546,9 +2645,9 @@ class APIMethods:
2546
2645
  ) -> Result[bool, APIError]:
2547
2646
  """Method `unpinAllForumTopicMessages`, see the [documentation](https://core.telegram.org/bots/api#unpinallforumtopicmessages)
2548
2647
 
2549
- Use this method to clear the list of pinned messages in a forum topic. The
2550
- bot must be an administrator in the chat for this to work and must have the
2551
- can_pin_messages administrator right in the supergroup. Returns True
2648
+ Use this method to clear the list of pinned messages in a forum topic. The
2649
+ bot must be an administrator in the chat for this to work and must have the
2650
+ can_pin_messages administrator right in the supergroup. Returns True
2552
2651
  on success.
2553
2652
 
2554
2653
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2571,8 +2670,8 @@ class APIMethods:
2571
2670
  ) -> Result[bool, APIError]:
2572
2671
  """Method `editGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#editgeneralforumtopic)
2573
2672
 
2574
- Use this method to edit the name of the 'General' topic in a forum supergroup
2575
- chat. The bot must be an administrator in the chat for this to work and must
2673
+ Use this method to edit the name of the 'General' topic in a forum supergroup
2674
+ chat. The bot must be an administrator in the chat for this to work and must
2576
2675
  have can_manage_topics administrator rights. Returns True on success.
2577
2676
 
2578
2677
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2594,8 +2693,8 @@ class APIMethods:
2594
2693
  ) -> Result[bool, APIError]:
2595
2694
  """Method `closeGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#closegeneralforumtopic)
2596
2695
 
2597
- Use this method to close an open 'General' topic in a forum supergroup chat.
2598
- The bot must be an administrator in the chat for this to work and must have
2696
+ Use this method to close an open 'General' topic in a forum supergroup chat.
2697
+ The bot must be an administrator in the chat for this to work and must have
2599
2698
  the can_manage_topics administrator rights. Returns True on success.
2600
2699
 
2601
2700
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2615,9 +2714,9 @@ class APIMethods:
2615
2714
  ) -> Result[bool, APIError]:
2616
2715
  """Method `reopenGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#reopengeneralforumtopic)
2617
2716
 
2618
- Use this method to reopen a closed 'General' topic in a forum supergroup
2619
- chat. The bot must be an administrator in the chat for this to work and must
2620
- have the can_manage_topics administrator rights. The topic will be automatically
2717
+ Use this method to reopen a closed 'General' topic in a forum supergroup
2718
+ chat. The bot must be an administrator in the chat for this to work and must
2719
+ have the can_manage_topics administrator rights. The topic will be automatically
2621
2720
  unhidden if it was hidden. Returns True on success.
2622
2721
 
2623
2722
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2637,9 +2736,9 @@ class APIMethods:
2637
2736
  ) -> Result[bool, APIError]:
2638
2737
  """Method `hideGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#hidegeneralforumtopic)
2639
2738
 
2640
- Use this method to hide the 'General' topic in a forum supergroup chat. The
2641
- bot must be an administrator in the chat for this to work and must have the
2642
- can_manage_topics administrator rights. The topic will be automatically
2739
+ Use this method to hide the 'General' topic in a forum supergroup chat. The
2740
+ bot must be an administrator in the chat for this to work and must have the
2741
+ can_manage_topics administrator rights. The topic will be automatically
2643
2742
  closed if it was open. Returns True on success.
2644
2743
 
2645
2744
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2659,8 +2758,8 @@ class APIMethods:
2659
2758
  ) -> Result[bool, APIError]:
2660
2759
  """Method `unhideGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#unhidegeneralforumtopic)
2661
2760
 
2662
- Use this method to unhide the 'General' topic in a forum supergroup chat.
2663
- The bot must be an administrator in the chat for this to work and must have
2761
+ Use this method to unhide the 'General' topic in a forum supergroup chat.
2762
+ The bot must be an administrator in the chat for this to work and must have
2664
2763
  the can_manage_topics administrator rights. Returns True on success.
2665
2764
 
2666
2765
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2680,9 +2779,9 @@ class APIMethods:
2680
2779
  ) -> Result[bool, APIError]:
2681
2780
  """Method `unpinAllGeneralForumTopicMessages`, see the [documentation](https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages)
2682
2781
 
2683
- Use this method to clear the list of pinned messages in a General forum topic.
2684
- The bot must be an administrator in the chat for this to work and must have
2685
- the can_pin_messages administrator right in the supergroup. Returns
2782
+ Use this method to clear the list of pinned messages in a General forum topic.
2783
+ The bot must be an administrator in the chat for this to work and must have
2784
+ the can_pin_messages administrator right in the supergroup. Returns
2686
2785
  True on success.
2687
2786
 
2688
2787
  :param chat_id: Unique identifier for the target chat or username of the target supergroup \
@@ -2706,8 +2805,8 @@ class APIMethods:
2706
2805
  ) -> Result[bool, APIError]:
2707
2806
  """Method `answerCallbackQuery`, see the [documentation](https://core.telegram.org/bots/api#answercallbackquery)
2708
2807
 
2709
- Use this method to send answers to callback queries sent from inline keyboards.
2710
- The answer will be displayed to the user as a notification at the top of the
2808
+ Use this method to send answers to callback queries sent from inline keyboards.
2809
+ The answer will be displayed to the user as a notification at the top of the
2711
2810
  chat screen or as an alert. On success, True is returned.
2712
2811
 
2713
2812
  :param callback_query_id: Unique identifier for the query to be answered.
@@ -2743,7 +2842,7 @@ class APIMethods:
2743
2842
  ) -> Result[UserChatBoosts, APIError]:
2744
2843
  """Method `getUserChatBoosts`, see the [documentation](https://core.telegram.org/bots/api#getuserchatboosts)
2745
2844
 
2746
- Use this method to get the list of boosts added to a chat by a user. Requires
2845
+ Use this method to get the list of boosts added to a chat by a user. Requires
2747
2846
  administrator rights in the chat. Returns a UserChatBoosts object.
2748
2847
 
2749
2848
  :param chat_id: Unique identifier for the chat or username of the channel (in the format \
@@ -2786,7 +2885,7 @@ class APIMethods:
2786
2885
  ) -> Result[bool, APIError]:
2787
2886
  """Method `setMyCommands`, see the [documentation](https://core.telegram.org/bots/api#setmycommands)
2788
2887
 
2789
- Use this method to change the list of the bot's commands. See this manual
2888
+ Use this method to change the list of the bot's commands. See this manual
2790
2889
  for more details about bot commands. Returns True on success.
2791
2890
 
2792
2891
  :param commands: A JSON-serialized list of bot commands to be set as the list of the bot's commands. \
@@ -2814,8 +2913,8 @@ class APIMethods:
2814
2913
  ) -> Result[bool, APIError]:
2815
2914
  """Method `deleteMyCommands`, see the [documentation](https://core.telegram.org/bots/api#deletemycommands)
2816
2915
 
2817
- Use this method to delete the list of the bot's commands for the given scope
2818
- and user language. After deletion, higher level commands will be shown
2916
+ Use this method to delete the list of the bot's commands for the given scope
2917
+ and user language. After deletion, higher level commands will be shown
2819
2918
  to affected users. Returns True on success.
2820
2919
 
2821
2920
  :param scope: A JSON-serialized object, describing scope of users for which the commands \
@@ -2840,8 +2939,8 @@ class APIMethods:
2840
2939
  ) -> Result[list[BotCommand], APIError]:
2841
2940
  """Method `getMyCommands`, see the [documentation](https://core.telegram.org/bots/api#getmycommands)
2842
2941
 
2843
- Use this method to get the current list of the bot's commands for the given
2844
- scope and user language. Returns an Array of BotCommand objects. If commands
2942
+ Use this method to get the current list of the bot's commands for the given
2943
+ scope and user language. Returns an Array of BotCommand objects. If commands
2845
2944
  aren't set, an empty list is returned.
2846
2945
 
2847
2946
  :param scope: A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault. \
@@ -2905,7 +3004,7 @@ class APIMethods:
2905
3004
  ) -> Result[bool, APIError]:
2906
3005
  """Method `setMyDescription`, see the [documentation](https://core.telegram.org/bots/api#setmydescription)
2907
3006
 
2908
- Use this method to change the bot's description, which is shown in the chat
3007
+ Use this method to change the bot's description, which is shown in the chat
2909
3008
  with the bot if the chat is empty. Returns True on success.
2910
3009
 
2911
3010
  :param description: New bot description; 0-512 characters. Pass an empty string to remove the \
@@ -2948,8 +3047,8 @@ class APIMethods:
2948
3047
  ) -> Result[bool, APIError]:
2949
3048
  """Method `setMyShortDescription`, see the [documentation](https://core.telegram.org/bots/api#setmyshortdescription)
2950
3049
 
2951
- Use this method to change the bot's short description, which is shown on
2952
- the bot's profile page and is sent together with the link when users share
3050
+ Use this method to change the bot's short description, which is shown on
3051
+ the bot's profile page and is sent together with the link when users share
2953
3052
  the bot. Returns True on success.
2954
3053
 
2955
3054
  :param short_description: New short description for the bot; 0-120 characters. Pass an empty string \
@@ -2992,7 +3091,7 @@ class APIMethods:
2992
3091
  ) -> Result[bool, APIError]:
2993
3092
  """Method `setChatMenuButton`, see the [documentation](https://core.telegram.org/bots/api#setchatmenubutton)
2994
3093
 
2995
- Use this method to change the bot's menu button in a private chat, or the default
3094
+ Use this method to change the bot's menu button in a private chat, or the default
2996
3095
  menu button. Returns True on success.
2997
3096
 
2998
3097
  :param chat_id: Unique identifier for the target private chat. If not specified, default \
@@ -3011,12 +3110,10 @@ class APIMethods:
3011
3110
  self,
3012
3111
  chat_id: int | None = None,
3013
3112
  **other: typing.Any,
3014
- ) -> Result[
3015
- Variative[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault], APIError
3016
- ]:
3113
+ ) -> Result[Variative[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault], APIError]:
3017
3114
  """Method `getChatMenuButton`, see the [documentation](https://core.telegram.org/bots/api#getchatmenubutton)
3018
3115
 
3019
- Use this method to get the current value of the bot's menu button in a private
3116
+ Use this method to get the current value of the bot's menu button in a private
3020
3117
  chat, or the default menu button. Returns MenuButton on success.
3021
3118
 
3022
3119
  :param chat_id: Unique identifier for the target private chat. If not specified, default \
@@ -3028,8 +3125,7 @@ class APIMethods:
3028
3125
  get_params(locals()),
3029
3126
  )
3030
3127
  return full_result(
3031
- method_response,
3032
- Variative[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault],
3128
+ method_response, Variative[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault]
3033
3129
  )
3034
3130
 
3035
3131
  async def set_my_default_administrator_rights(
@@ -3040,9 +3136,9 @@ class APIMethods:
3040
3136
  ) -> Result[bool, APIError]:
3041
3137
  """Method `setMyDefaultAdministratorRights`, see the [documentation](https://core.telegram.org/bots/api#setmydefaultadministratorrights)
3042
3138
 
3043
- Use this method to change the default administrator rights requested by
3044
- the bot when it's added as an administrator to groups or channels. These
3045
- rights will be suggested to users, but they are free to modify the list before
3139
+ Use this method to change the default administrator rights requested by
3140
+ the bot when it's added as an administrator to groups or channels. These
3141
+ rights will be suggested to users, but they are free to modify the list before
3046
3142
  adding the bot. Returns True on success.
3047
3143
 
3048
3144
  :param rights: A JSON-serialized object describing new default administrator rights. \
@@ -3066,7 +3162,7 @@ class APIMethods:
3066
3162
  ) -> Result[ChatAdministratorRights, APIError]:
3067
3163
  """Method `getMyDefaultAdministratorRights`, see the [documentation](https://core.telegram.org/bots/api#getmydefaultadministratorrights)
3068
3164
 
3069
- Use this method to get the current default administrator rights of the bot.
3165
+ Use this method to get the current default administrator rights of the bot.
3070
3166
  Returns ChatAdministratorRights on success.
3071
3167
 
3072
3168
  :param for_channels: Pass True to get default administrator rights of the bot in channels. Otherwise, \
@@ -3083,10 +3179,11 @@ class APIMethods:
3083
3179
  async def edit_message_text(
3084
3180
  self,
3085
3181
  text: str,
3182
+ business_connection_id: str | None = None,
3086
3183
  chat_id: int | str | None = None,
3087
3184
  message_id: int | None = None,
3088
3185
  inline_message_id: str | None = None,
3089
- parse_mode: str | None = None,
3186
+ parse_mode: str | None = default_params["parse_mode"],
3090
3187
  entities: list[MessageEntity] | None = None,
3091
3188
  link_preview_options: LinkPreviewOptions | None = None,
3092
3189
  reply_markup: InlineKeyboardMarkup | None = None,
@@ -3094,9 +3191,14 @@ class APIMethods:
3094
3191
  ) -> Result[Variative[Message, bool], APIError]:
3095
3192
  """Method `editMessageText`, see the [documentation](https://core.telegram.org/bots/api#editmessagetext)
3096
3193
 
3097
- Use this method to edit text and game messages. On success, if the edited
3098
- message is not an inline message, the edited Message is returned, otherwise
3099
- True is returned.
3194
+ Use this method to edit text and game messages. On success, if the edited
3195
+ message is not an inline message, the edited Message is returned, otherwise
3196
+ True is returned. Note that business messages that were not sent by the bot
3197
+ and do not contain an inline keyboard can only be edited within 48 hours from
3198
+ the time they were sent.
3199
+
3200
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
3201
+ to be edited was sent.
3100
3202
 
3101
3203
  :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
3102
3204
  the target chat or username of the target channel (in the format @channelusername). \
@@ -3128,20 +3230,27 @@ class APIMethods:
3128
3230
 
3129
3231
  async def edit_message_caption(
3130
3232
  self,
3233
+ business_connection_id: str | None = None,
3131
3234
  chat_id: int | str | None = None,
3132
3235
  message_id: int | None = None,
3133
3236
  inline_message_id: str | None = None,
3134
3237
  caption: str | None = None,
3135
- parse_mode: str | None = None,
3238
+ parse_mode: str | None = default_params["parse_mode"],
3136
3239
  caption_entities: list[MessageEntity] | None = None,
3240
+ show_caption_above_media: bool | None = None,
3137
3241
  reply_markup: InlineKeyboardMarkup | None = None,
3138
3242
  **other: typing.Any,
3139
3243
  ) -> Result[Variative[Message, bool], APIError]:
3140
3244
  """Method `editMessageCaption`, see the [documentation](https://core.telegram.org/bots/api#editmessagecaption)
3141
3245
 
3142
- Use this method to edit captions of messages. On success, if the edited message
3143
- is not an inline message, the edited Message is returned, otherwise True
3144
- is returned.
3246
+ Use this method to edit captions of messages. On success, if the edited message
3247
+ is not an inline message, the edited Message is returned, otherwise True
3248
+ is returned. Note that business messages that were not sent by the bot and
3249
+ do not contain an inline keyboard can only be edited within 48 hours from
3250
+ the time they were sent.
3251
+
3252
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
3253
+ to be edited was sent.
3145
3254
 
3146
3255
  :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
3147
3256
  the target chat or username of the target channel (in the format @channelusername). \
@@ -3160,6 +3269,9 @@ class APIMethods:
3160
3269
  :param caption_entities: A JSON-serialized list of special entities that appear in the caption, \
3161
3270
  which can be specified instead of parse_mode.
3162
3271
 
3272
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported \
3273
+ only for animation, photo and video messages.
3274
+
3163
3275
  :param reply_markup: A JSON-serialized object for an inline keyboard.
3164
3276
  """
3165
3277
 
@@ -3172,6 +3284,7 @@ class APIMethods:
3172
3284
  async def edit_message_media(
3173
3285
  self,
3174
3286
  media: InputMedia,
3287
+ business_connection_id: str | None = None,
3175
3288
  chat_id: int | str | None = None,
3176
3289
  message_id: int | None = None,
3177
3290
  inline_message_id: str | None = None,
@@ -3180,13 +3293,18 @@ class APIMethods:
3180
3293
  ) -> Result[Variative[Message, bool], APIError]:
3181
3294
  """Method `editMessageMedia`, see the [documentation](https://core.telegram.org/bots/api#editmessagemedia)
3182
3295
 
3183
- Use this method to edit animation, audio, document, photo, or video messages.
3184
- If a message is part of a message album, then it can be edited only to an audio
3185
- for audio albums, only to a document for document albums and to a photo or
3186
- a video otherwise. When an inline message is edited, a new file can't be uploaded;
3187
- use a previously uploaded file via its file_id or specify a URL. On success,
3188
- if the edited message is not an inline message, the edited Message is returned,
3189
- otherwise True is returned.
3296
+ Use this method to edit animation, audio, document, photo, or video messages.
3297
+ If a message is part of a message album, then it can be edited only to an audio
3298
+ for audio albums, only to a document for document albums and to a photo or
3299
+ a video otherwise. When an inline message is edited, a new file can't be uploaded;
3300
+ use a previously uploaded file via its file_id or specify a URL. On success,
3301
+ if the edited message is not an inline message, the edited Message is returned,
3302
+ otherwise True is returned. Note that business messages that were not sent
3303
+ by the bot and do not contain an inline keyboard can only be edited within
3304
+ 48 hours from the time they were sent.
3305
+
3306
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
3307
+ to be edited was sent.
3190
3308
 
3191
3309
  :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
3192
3310
  the target chat or username of the target channel (in the format @channelusername). \
@@ -3212,6 +3330,7 @@ class APIMethods:
3212
3330
  self,
3213
3331
  latitude: float,
3214
3332
  longitude: float,
3333
+ business_connection_id: str | None = None,
3215
3334
  chat_id: int | str | None = None,
3216
3335
  message_id: int | None = None,
3217
3336
  inline_message_id: str | None = None,
@@ -3224,11 +3343,14 @@ class APIMethods:
3224
3343
  ) -> Result[Variative[Message, bool], APIError]:
3225
3344
  """Method `editMessageLiveLocation`, see the [documentation](https://core.telegram.org/bots/api#editmessagelivelocation)
3226
3345
 
3227
- Use this method to edit live location messages. A location can be edited
3228
- until its live_period expires or editing is explicitly disabled by a call
3229
- to stopMessageLiveLocation. On success, if the edited message is not an
3346
+ Use this method to edit live location messages. A location can be edited
3347
+ until its live_period expires or editing is explicitly disabled by a call
3348
+ to stopMessageLiveLocation. On success, if the edited message is not an
3230
3349
  inline message, the edited Message is returned, otherwise True is returned.
3231
3350
 
3351
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
3352
+ to be edited was sent.
3353
+
3232
3354
  :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
3233
3355
  the target chat or username of the target channel (in the format @channelusername). \
3234
3356
 
@@ -3268,6 +3390,7 @@ class APIMethods:
3268
3390
 
3269
3391
  async def stop_message_live_location(
3270
3392
  self,
3393
+ business_connection_id: str | None = None,
3271
3394
  chat_id: int | str | None = None,
3272
3395
  message_id: int | None = None,
3273
3396
  inline_message_id: str | None = None,
@@ -3276,10 +3399,13 @@ class APIMethods:
3276
3399
  ) -> Result[Variative[Message, bool], APIError]:
3277
3400
  """Method `stopMessageLiveLocation`, see the [documentation](https://core.telegram.org/bots/api#stopmessagelivelocation)
3278
3401
 
3279
- Use this method to stop updating a live location message before live_period
3280
- expires. On success, if the message is not an inline message, the edited
3402
+ Use this method to stop updating a live location message before live_period
3403
+ expires. On success, if the message is not an inline message, the edited
3281
3404
  Message is returned, otherwise True is returned.
3282
3405
 
3406
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
3407
+ to be edited was sent.
3408
+
3283
3409
  :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
3284
3410
  the target chat or username of the target channel (in the format @channelusername). \
3285
3411
 
@@ -3300,6 +3426,7 @@ class APIMethods:
3300
3426
 
3301
3427
  async def edit_message_reply_markup(
3302
3428
  self,
3429
+ business_connection_id: str | None = None,
3303
3430
  chat_id: int | str | None = None,
3304
3431
  message_id: int | None = None,
3305
3432
  inline_message_id: str | None = None,
@@ -3308,9 +3435,14 @@ class APIMethods:
3308
3435
  ) -> Result[Variative[Message, bool], APIError]:
3309
3436
  """Method `editMessageReplyMarkup`, see the [documentation](https://core.telegram.org/bots/api#editmessagereplymarkup)
3310
3437
 
3311
- Use this method to edit only the reply markup of messages. On success, if
3312
- the edited message is not an inline message, the edited Message is returned,
3313
- otherwise True is returned.
3438
+ Use this method to edit only the reply markup of messages. On success, if
3439
+ the edited message is not an inline message, the edited Message is returned,
3440
+ otherwise True is returned. Note that business messages that were not sent
3441
+ by the bot and do not contain an inline keyboard can only be edited within
3442
+ 48 hours from the time they were sent.
3443
+
3444
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
3445
+ to be edited was sent.
3314
3446
 
3315
3447
  :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
3316
3448
  the target chat or username of the target channel (in the format @channelusername). \
@@ -3334,14 +3466,18 @@ class APIMethods:
3334
3466
  self,
3335
3467
  chat_id: int | str,
3336
3468
  message_id: int,
3469
+ business_connection_id: str | None = None,
3337
3470
  reply_markup: InlineKeyboardMarkup | None = None,
3338
3471
  **other: typing.Any,
3339
3472
  ) -> Result[Poll, APIError]:
3340
3473
  """Method `stopPoll`, see the [documentation](https://core.telegram.org/bots/api#stoppoll)
3341
3474
 
3342
- Use this method to stop a poll which was sent by the bot. On success, the stopped
3475
+ Use this method to stop a poll which was sent by the bot. On success, the stopped
3343
3476
  Poll is returned.
3344
3477
 
3478
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
3479
+ to be edited was sent.
3480
+
3345
3481
  :param chat_id: Unique identifier for the target chat or username of the target channel \
3346
3482
  (in the format @channelusername).
3347
3483
 
@@ -3364,16 +3500,16 @@ class APIMethods:
3364
3500
  ) -> Result[bool, APIError]:
3365
3501
  """Method `deleteMessage`, see the [documentation](https://core.telegram.org/bots/api#deletemessage)
3366
3502
 
3367
- Use this method to delete a message, including service messages, with the
3368
- following limitations: - A message can only be deleted if it was sent less
3369
- than 48 hours ago. - Service messages about a supergroup, channel, or forum
3370
- topic creation can't be deleted. - A dice message in a private chat can only
3371
- be deleted if it was sent more than 24 hours ago. - Bots can delete outgoing
3372
- messages in private chats, groups, and supergroups. - Bots can delete incoming
3373
- messages in private chats. - Bots granted can_post_messages permissions
3374
- can delete outgoing messages in channels. - If the bot is an administrator
3375
- of a group, it can delete any message there. - If the bot has can_delete_messages
3376
- permission in a supergroup or a channel, it can delete any message there.
3503
+ Use this method to delete a message, including service messages, with the
3504
+ following limitations: - A message can only be deleted if it was sent less
3505
+ than 48 hours ago. - Service messages about a supergroup, channel, or forum
3506
+ topic creation can't be deleted. - A dice message in a private chat can only
3507
+ be deleted if it was sent more than 24 hours ago. - Bots can delete outgoing
3508
+ messages in private chats, groups, and supergroups. - Bots can delete incoming
3509
+ messages in private chats. - Bots granted can_post_messages permissions
3510
+ can delete outgoing messages in channels. - If the bot is an administrator
3511
+ of a group, it can delete any message there. - If the bot has can_delete_messages
3512
+ permission in a supergroup or a channel, it can delete any message there.
3377
3513
  Returns True on success.
3378
3514
 
3379
3515
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -3396,8 +3532,8 @@ class APIMethods:
3396
3532
  ) -> Result[bool, APIError]:
3397
3533
  """Method `deleteMessages`, see the [documentation](https://core.telegram.org/bots/api#deletemessages)
3398
3534
 
3399
- Use this method to delete multiple messages simultaneously. If some of
3400
- the specified messages can't be found, they are skipped. Returns True on
3535
+ Use this method to delete multiple messages simultaneously. If some of
3536
+ the specified messages can't be found, they are skipped. Returns True on
3401
3537
  success.
3402
3538
 
3403
3539
  :param chat_id: Unique identifier for the target chat or username of the target channel \
@@ -3422,19 +3558,18 @@ class APIMethods:
3422
3558
  emoji: str | None = None,
3423
3559
  disable_notification: bool | None = None,
3424
3560
  protect_content: bool | None = None,
3561
+ message_effect_id: str | None = None,
3425
3562
  reply_parameters: ReplyParameters | None = None,
3426
- reply_markup: (
3427
- InlineKeyboardMarkup
3428
- | ReplyKeyboardMarkup
3429
- | ReplyKeyboardRemove
3430
- | ForceReply
3431
- | None
3432
- ) = None,
3563
+ reply_markup: InlineKeyboardMarkup
3564
+ | ReplyKeyboardMarkup
3565
+ | ReplyKeyboardRemove
3566
+ | ForceReply
3567
+ | None = None,
3433
3568
  **other: typing.Any,
3434
3569
  ) -> Result[Message, APIError]:
3435
3570
  """Method `sendSticker`, see the [documentation](https://core.telegram.org/bots/api#sendsticker)
3436
3571
 
3437
- Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers.
3572
+ Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers.
3438
3573
  On success, the sent Message is returned.
3439
3574
 
3440
3575
  :param business_connection_id: Unique identifier of the business connection on behalf of which the message \
@@ -3459,6 +3594,9 @@ class APIMethods:
3459
3594
 
3460
3595
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
3461
3596
 
3597
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
3598
+ chats only.
3599
+
3462
3600
  :param reply_parameters: Description of the message to reply to.
3463
3601
 
3464
3602
  :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
@@ -3497,7 +3635,7 @@ class APIMethods:
3497
3635
  ) -> Result[list[Sticker], APIError]:
3498
3636
  """Method `getCustomEmojiStickers`, see the [documentation](https://core.telegram.org/bots/api#getcustomemojistickers)
3499
3637
 
3500
- Use this method to get information about custom emoji stickers by their
3638
+ Use this method to get information about custom emoji stickers by their
3501
3639
  identifiers. Returns an Array of Sticker objects.
3502
3640
 
3503
3641
  :param custom_emoji_ids: A JSON-serialized list of custom emoji identifiers. At most 200 custom \
@@ -3519,8 +3657,8 @@ class APIMethods:
3519
3657
  ) -> Result[File, APIError]:
3520
3658
  """Method `uploadStickerFile`, see the [documentation](https://core.telegram.org/bots/api#uploadstickerfile)
3521
3659
 
3522
- Use this method to upload a file with a sticker for later use in the createNewStickerSet,
3523
- addStickerToSet, or replaceStickerInSet methods (the file can be used
3660
+ Use this method to upload a file with a sticker for later use in the createNewStickerSet,
3661
+ addStickerToSet, or replaceStickerInSet methods (the file can be used
3524
3662
  multiple times). Returns the uploaded File on success.
3525
3663
 
3526
3664
  :param user_id: User identifier of sticker file owner.
@@ -3549,7 +3687,7 @@ class APIMethods:
3549
3687
  ) -> Result[bool, APIError]:
3550
3688
  """Method `createNewStickerSet`, see the [documentation](https://core.telegram.org/bots/api#createnewstickerset)
3551
3689
 
3552
- Use this method to create a new sticker set owned by a user. The bot will be
3690
+ Use this method to create a new sticker set owned by a user. The bot will be
3553
3691
  able to edit the sticker set thus created. Returns True on success.
3554
3692
 
3555
3693
  :param user_id: User identifier of created sticker set owner.
@@ -3588,8 +3726,8 @@ class APIMethods:
3588
3726
  ) -> Result[bool, APIError]:
3589
3727
  """Method `addStickerToSet`, see the [documentation](https://core.telegram.org/bots/api#addstickertoset)
3590
3728
 
3591
- Use this method to add a new sticker to a set created by the bot. Emoji sticker
3592
- sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers.
3729
+ Use this method to add a new sticker to a set created by the bot. Emoji sticker
3730
+ sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers.
3593
3731
  Returns True on success.
3594
3732
 
3595
3733
  :param user_id: User identifier of sticker set owner.
@@ -3658,8 +3796,8 @@ class APIMethods:
3658
3796
  ) -> Result[bool, APIError]:
3659
3797
  """Method `replaceStickerInSet`, see the [documentation](https://core.telegram.org/bots/api#replacestickerinset)
3660
3798
 
3661
- Use this method to replace an existing sticker in a sticker set with a new
3662
- one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet,
3799
+ Use this method to replace an existing sticker in a sticker set with a new
3800
+ one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet,
3663
3801
  then setStickerPositionInSet. Returns True on success.
3664
3802
 
3665
3803
  :param user_id: User identifier of the sticker set owner.
@@ -3710,8 +3848,8 @@ class APIMethods:
3710
3848
  ) -> Result[bool, APIError]:
3711
3849
  """Method `setStickerKeywords`, see the [documentation](https://core.telegram.org/bots/api#setstickerkeywords)
3712
3850
 
3713
- Use this method to change search keywords assigned to a regular or custom
3714
- emoji sticker. The sticker must belong to a sticker set created by the bot.
3851
+ Use this method to change search keywords assigned to a regular or custom
3852
+ emoji sticker. The sticker must belong to a sticker set created by the bot.
3715
3853
  Returns True on success.
3716
3854
 
3717
3855
  :param sticker: File identifier of the sticker.
@@ -3734,7 +3872,7 @@ class APIMethods:
3734
3872
  ) -> Result[bool, APIError]:
3735
3873
  """Method `setStickerMaskPosition`, see the [documentation](https://core.telegram.org/bots/api#setstickermaskposition)
3736
3874
 
3737
- Use this method to change the mask position of a mask sticker. The sticker
3875
+ Use this method to change the mask position of a mask sticker. The sticker
3738
3876
  must belong to a sticker set that was created by the bot. Returns True on success.
3739
3877
 
3740
3878
  :param sticker: File identifier of the sticker.
@@ -3781,8 +3919,8 @@ class APIMethods:
3781
3919
  ) -> Result[bool, APIError]:
3782
3920
  """Method `setStickerSetThumbnail`, see the [documentation](https://core.telegram.org/bots/api#setstickersetthumbnail)
3783
3921
 
3784
- Use this method to set the thumbnail of a regular or mask sticker set. The
3785
- format of the thumbnail file must match the format of the stickers in the
3922
+ Use this method to set the thumbnail of a regular or mask sticker set. The
3923
+ format of the thumbnail file must match the format of the stickers in the
3786
3924
  set. Returns True on success.
3787
3925
 
3788
3926
  :param name: Sticker set name.
@@ -3820,7 +3958,7 @@ class APIMethods:
3820
3958
  ) -> Result[bool, APIError]:
3821
3959
  """Method `setCustomEmojiStickerSetThumbnail`, see the [documentation](https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail)
3822
3960
 
3823
- Use this method to set the thumbnail of a custom emoji sticker set. Returns
3961
+ Use this method to set the thumbnail of a custom emoji sticker set. Returns
3824
3962
  True on success.
3825
3963
 
3826
3964
  :param name: Sticker set name.
@@ -3866,7 +4004,7 @@ class APIMethods:
3866
4004
  ) -> Result[bool, APIError]:
3867
4005
  """Method `answerInlineQuery`, see the [documentation](https://core.telegram.org/bots/api#answerinlinequery)
3868
4006
 
3869
- Use this method to send answers to an inline query. On success, True is returned.
4007
+ Use this method to send answers to an inline query. On success, True is returned.
3870
4008
  No more than 50 results per query are allowed.
3871
4009
 
3872
4010
  :param inline_query_id: Unique identifier for the answered query.
@@ -3923,10 +4061,10 @@ class APIMethods:
3923
4061
  title: str,
3924
4062
  description: str,
3925
4063
  payload: str,
3926
- provider_token: str,
3927
4064
  currency: str,
3928
4065
  prices: list[LabeledPrice],
3929
4066
  message_thread_id: int | None = None,
4067
+ provider_token: str | None = None,
3930
4068
  max_tip_amount: int | None = None,
3931
4069
  suggested_tip_amounts: list[int] | None = None,
3932
4070
  start_parameter: str | None = None,
@@ -3944,6 +4082,7 @@ class APIMethods:
3944
4082
  is_flexible: bool | None = None,
3945
4083
  disable_notification: bool | None = None,
3946
4084
  protect_content: bool | None = None,
4085
+ message_effect_id: str | None = None,
3947
4086
  reply_parameters: ReplyParameters | None = None,
3948
4087
  reply_markup: InlineKeyboardMarkup | None = None,
3949
4088
  **other: typing.Any,
@@ -3965,18 +4104,22 @@ class APIMethods:
3965
4104
  :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to \
3966
4105
  the user, use for your internal processes.
3967
4106
 
3968
- :param provider_token: Payment provider token, obtained via @BotFather.
4107
+ :param provider_token: Payment provider token, obtained via @BotFather. Pass an empty string \
4108
+ for payments in Telegram Stars.
3969
4109
 
3970
- :param currency: Three-letter ISO 4217 currency code, see more on currencies.
4110
+ :param currency: Three-letter ISO 4217 currency code, see more on currencies. Pass `XTR` \
4111
+ for payments in Telegram Stars.
3971
4112
 
3972
4113
  :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, \
3973
- tax, discount, delivery cost, delivery tax, bonus, etc.).
4114
+ tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain \
4115
+ exactly one item for payments in Telegram Stars.
3974
4116
 
3975
4117
  :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency \
3976
4118
  (integer, not float/double). For example, for a maximum tip of US$ 1.45 \
3977
4119
  pass max_tip_amount = 145. See the exp parameter in currencies.json, it \
3978
4120
  shows the number of digits past the decimal point for each currency (2 for \
3979
- the majority of currencies). Defaults to 0.
4121
+ the majority of currencies). Defaults to 0. Not supported for payments \
4122
+ in Telegram Stars.
3980
4123
 
3981
4124
  :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the smallest units \
3982
4125
  of the currency (integer, not float/double). At most 4 suggested tip amounts \
@@ -4003,24 +4146,34 @@ class APIMethods:
4003
4146
 
4004
4147
  :param photo_height: Photo height.
4005
4148
 
4006
- :param need_name: Pass True if you require the user's full name to complete the order.
4149
+ :param need_name: Pass True if you require the user's full name to complete the order. Ignored \
4150
+ for payments in Telegram Stars.
4007
4151
 
4008
- :param need_phone_number: Pass True if you require the user's phone number to complete the order.
4152
+ :param need_phone_number: Pass True if you require the user's phone number to complete the order. Ignored \
4153
+ for payments in Telegram Stars.
4009
4154
 
4010
4155
  :param need_email: Pass True if you require the user's email address to complete the order. \
4156
+ Ignored for payments in Telegram Stars.
4011
4157
 
4012
4158
  :param need_shipping_address: Pass True if you require the user's shipping address to complete the order. \
4159
+ Ignored for payments in Telegram Stars.
4013
4160
 
4014
- :param send_phone_number_to_provider: Pass True if the user's phone number should be sent to provider.
4161
+ :param send_phone_number_to_provider: Pass True if the user's phone number should be sent to the provider. Ignored \
4162
+ for payments in Telegram Stars.
4015
4163
 
4016
- :param send_email_to_provider: Pass True if the user's email address should be sent to provider.
4164
+ :param send_email_to_provider: Pass True if the user's email address should be sent to the provider. Ignored \
4165
+ for payments in Telegram Stars.
4017
4166
 
4018
- :param is_flexible: Pass True if the final price depends on the shipping method.
4167
+ :param is_flexible: Pass True if the final price depends on the shipping method. Ignored for \
4168
+ payments in Telegram Stars.
4019
4169
 
4020
4170
  :param disable_notification: Sends the message silently. Users will receive a notification with no sound. \
4021
4171
 
4022
4172
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
4023
4173
 
4174
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
4175
+ chats only.
4176
+
4024
4177
  :param reply_parameters: Description of the message to reply to.
4025
4178
 
4026
4179
  :param reply_markup: A JSON-serialized object for an inline keyboard. If empty, one 'Pay total \
@@ -4038,9 +4191,9 @@ class APIMethods:
4038
4191
  title: str,
4039
4192
  description: str,
4040
4193
  payload: str,
4041
- provider_token: str,
4042
4194
  currency: str,
4043
4195
  prices: list[LabeledPrice],
4196
+ provider_token: str | None = None,
4044
4197
  max_tip_amount: int | None = None,
4045
4198
  suggested_tip_amounts: list[int] | None = None,
4046
4199
  provider_data: str | None = None,
@@ -4059,7 +4212,7 @@ class APIMethods:
4059
4212
  ) -> Result[str, APIError]:
4060
4213
  """Method `createInvoiceLink`, see the [documentation](https://core.telegram.org/bots/api#createinvoicelink)
4061
4214
 
4062
- Use this method to create a link for an invoice. Returns the created invoice
4215
+ Use this method to create a link for an invoice. Returns the created invoice
4063
4216
  link as String on success.
4064
4217
 
4065
4218
  :param title: Product name, 1-32 characters.
@@ -4069,18 +4222,22 @@ class APIMethods:
4069
4222
  :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to \
4070
4223
  the user, use for your internal processes.
4071
4224
 
4072
- :param provider_token: Payment provider token, obtained via BotFather.
4225
+ :param provider_token: Payment provider token, obtained via @BotFather. Pass an empty string \
4226
+ for payments in Telegram Stars.
4073
4227
 
4074
- :param currency: Three-letter ISO 4217 currency code, see more on currencies.
4228
+ :param currency: Three-letter ISO 4217 currency code, see more on currencies. Pass `XTR` \
4229
+ for payments in Telegram Stars.
4075
4230
 
4076
4231
  :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, \
4077
- tax, discount, delivery cost, delivery tax, bonus, etc.).
4232
+ tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain \
4233
+ exactly one item for payments in Telegram Stars.
4078
4234
 
4079
4235
  :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency \
4080
4236
  (integer, not float/double). For example, for a maximum tip of US$ 1.45 \
4081
4237
  pass max_tip_amount = 145. See the exp parameter in currencies.json, it \
4082
4238
  shows the number of digits past the decimal point for each currency (2 for \
4083
- the majority of currencies). Defaults to 0.
4239
+ the majority of currencies). Defaults to 0. Not supported for payments \
4240
+ in Telegram Stars.
4084
4241
 
4085
4242
  :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the smallest units \
4086
4243
  of the currency (integer, not float/double). At most 4 suggested tip amounts \
@@ -4100,19 +4257,26 @@ class APIMethods:
4100
4257
 
4101
4258
  :param photo_height: Photo height.
4102
4259
 
4103
- :param need_name: Pass True if you require the user's full name to complete the order.
4260
+ :param need_name: Pass True if you require the user's full name to complete the order. Ignored \
4261
+ for payments in Telegram Stars.
4104
4262
 
4105
- :param need_phone_number: Pass True if you require the user's phone number to complete the order.
4263
+ :param need_phone_number: Pass True if you require the user's phone number to complete the order. Ignored \
4264
+ for payments in Telegram Stars.
4106
4265
 
4107
4266
  :param need_email: Pass True if you require the user's email address to complete the order. \
4267
+ Ignored for payments in Telegram Stars.
4108
4268
 
4109
4269
  :param need_shipping_address: Pass True if you require the user's shipping address to complete the order. \
4270
+ Ignored for payments in Telegram Stars.
4110
4271
 
4111
- :param send_phone_number_to_provider: Pass True if the user's phone number should be sent to the provider.
4272
+ :param send_phone_number_to_provider: Pass True if the user's phone number should be sent to the provider. Ignored \
4273
+ for payments in Telegram Stars.
4112
4274
 
4113
- :param send_email_to_provider: Pass True if the user's email address should be sent to the provider.
4275
+ :param send_email_to_provider: Pass True if the user's email address should be sent to the provider. Ignored \
4276
+ for payments in Telegram Stars.
4114
4277
 
4115
- :param is_flexible: Pass True if the final price depends on the shipping method.
4278
+ :param is_flexible: Pass True if the final price depends on the shipping method. Ignored for \
4279
+ payments in Telegram Stars.
4116
4280
  """
4117
4281
 
4118
4282
  method_response = await self.api.request_raw(
@@ -4131,9 +4295,9 @@ class APIMethods:
4131
4295
  ) -> Result[bool, APIError]:
4132
4296
  """Method `answerShippingQuery`, see the [documentation](https://core.telegram.org/bots/api#answershippingquery)
4133
4297
 
4134
- If you sent an invoice requesting a shipping address and the parameter is_flexible
4135
- was specified, the Bot API will send an Update with a shipping_query field
4136
- to the bot. Use this method to reply to shipping queries. On success, True
4298
+ If you sent an invoice requesting a shipping address and the parameter is_flexible
4299
+ was specified, the Bot API will send an Update with a shipping_query field
4300
+ to the bot. Use this method to reply to shipping queries. On success, True
4137
4301
  is returned.
4138
4302
 
4139
4303
  :param shipping_query_id: Unique identifier for the query to be answered.
@@ -4165,10 +4329,10 @@ class APIMethods:
4165
4329
  ) -> Result[bool, APIError]:
4166
4330
  """Method `answerPreCheckoutQuery`, see the [documentation](https://core.telegram.org/bots/api#answerprecheckoutquery)
4167
4331
 
4168
- Once the user has confirmed their payment and shipping details, the Bot
4169
- API sends the final confirmation in the form of an Update with the field pre_checkout_query.
4170
- Use this method to respond to such pre-checkout queries. On success, True
4171
- is returned. Note: The Bot API must receive an answer within 10 seconds after
4332
+ Once the user has confirmed their payment and shipping details, the Bot
4333
+ API sends the final confirmation in the form of an Update with the field pre_checkout_query.
4334
+ Use this method to respond to such pre-checkout queries. On success, True
4335
+ is returned. Note: The Bot API must receive an answer within 10 seconds after
4172
4336
  the pre-checkout query was sent.
4173
4337
 
4174
4338
  :param pre_checkout_query_id: Unique identifier for the query to be answered.
@@ -4189,6 +4353,50 @@ class APIMethods:
4189
4353
  )
4190
4354
  return full_result(method_response, bool)
4191
4355
 
4356
+ async def get_star_transactions(
4357
+ self,
4358
+ offset: int | None = None,
4359
+ limit: int | None = None,
4360
+ **other: typing.Any,
4361
+ ) -> Result[StarTransactions, APIError]:
4362
+ """Method `getStarTransactions`, see the [documentation](https://core.telegram.org/bots/api#getstartransactions)
4363
+
4364
+ Returns the bot's Telegram Star transactions in chronological order.
4365
+ On success, returns a StarTransactions object.
4366
+
4367
+ :param offset: Number of transactions to skip in the response.
4368
+
4369
+ :param limit: The maximum number of transactions to be retrieved. Values between 1-100 \
4370
+ are accepted. Defaults to 100.
4371
+ """
4372
+
4373
+ method_response = await self.api.request_raw(
4374
+ "getStarTransactions",
4375
+ get_params(locals()),
4376
+ )
4377
+ return full_result(method_response, StarTransactions)
4378
+
4379
+ async def refund_star_payment(
4380
+ self,
4381
+ user_id: int,
4382
+ telegram_payment_charge_id: str,
4383
+ **other: typing.Any,
4384
+ ) -> Result[bool, APIError]:
4385
+ """Method `refundStarPayment`, see the [documentation](https://core.telegram.org/bots/api#refundstarpayment)
4386
+
4387
+ Refunds a successful payment in Telegram Stars. Returns True on success.
4388
+
4389
+ :param user_id: Identifier of the user whose payment will be refunded.
4390
+
4391
+ :param telegram_payment_charge_id: Telegram payment identifier.
4392
+ """
4393
+
4394
+ method_response = await self.api.request_raw(
4395
+ "refundStarPayment",
4396
+ get_params(locals()),
4397
+ )
4398
+ return full_result(method_response, bool)
4399
+
4192
4400
  async def set_passport_data_errors(
4193
4401
  self,
4194
4402
  user_id: int,
@@ -4225,6 +4433,7 @@ class APIMethods:
4225
4433
  message_thread_id: int | None = None,
4226
4434
  disable_notification: bool | None = None,
4227
4435
  protect_content: bool | None = None,
4436
+ message_effect_id: str | None = None,
4228
4437
  reply_parameters: ReplyParameters | None = None,
4229
4438
  reply_markup: InlineKeyboardMarkup | None = None,
4230
4439
  **other: typing.Any,
@@ -4248,6 +4457,9 @@ class APIMethods:
4248
4457
 
4249
4458
  :param protect_content: Protects the contents of the sent message from forwarding and saving.
4250
4459
 
4460
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private \
4461
+ chats only.
4462
+
4251
4463
  :param reply_parameters: Description of the message to reply to.
4252
4464
 
4253
4465
  :param reply_markup: A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' \
@@ -4273,9 +4485,9 @@ class APIMethods:
4273
4485
  ) -> Result[Variative[Message, bool], APIError]:
4274
4486
  """Method `setGameScore`, see the [documentation](https://core.telegram.org/bots/api#setgamescore)
4275
4487
 
4276
- Use this method to set the score of the specified user in a game message. On
4277
- success, if the message is not an inline message, the Message is returned,
4278
- otherwise True is returned. Returns an error, if the new score is not greater
4488
+ Use this method to set the score of the specified user in a game message. On
4489
+ success, if the message is not an inline message, the Message is returned,
4490
+ otherwise True is returned. Returns an error, if the new score is not greater
4279
4491
  than the user's current score in the chat and force is False.
4280
4492
 
4281
4493
  :param user_id: User identifier.
@@ -4314,8 +4526,8 @@ class APIMethods:
4314
4526
  ) -> Result[list[GameHighScore], APIError]:
4315
4527
  """Method `getGameHighScores`, see the [documentation](https://core.telegram.org/bots/api#getgamehighscores)
4316
4528
 
4317
- Use this method to get data for high score tables. Will return the score of
4318
- the specified user and several of their neighbors in a game. Returns an Array
4529
+ Use this method to get data for high score tables. Will return the score of
4530
+ the specified user and several of their neighbors in a game. Returns an Array
4319
4531
  of GameHighScore objects.
4320
4532
 
4321
4533
  :param user_id: Target user id.