telegrinder 0.1.dev159__py3-none-any.whl → 0.1.dev161__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (127) hide show
  1. telegrinder/__init__.py +4 -2
  2. telegrinder/api/__init__.py +0 -0
  3. telegrinder/api/abc.py +5 -0
  4. telegrinder/api/api.py +4 -4
  5. telegrinder/api/error.py +0 -0
  6. telegrinder/api/response.py +0 -0
  7. telegrinder/bot/__init__.py +0 -0
  8. telegrinder/bot/bot.py +0 -0
  9. telegrinder/bot/cute_types/__init__.py +0 -0
  10. telegrinder/bot/cute_types/base.py +0 -0
  11. telegrinder/bot/cute_types/callback_query.py +81 -85
  12. telegrinder/bot/cute_types/inline_query.py +36 -9
  13. telegrinder/bot/cute_types/message.py +524 -568
  14. telegrinder/bot/cute_types/update.py +0 -0
  15. telegrinder/bot/cute_types/utils.py +201 -453
  16. telegrinder/bot/dispatch/__init__.py +0 -0
  17. telegrinder/bot/dispatch/abc.py +0 -0
  18. telegrinder/bot/dispatch/composition.py +0 -0
  19. telegrinder/bot/dispatch/context.py +0 -0
  20. telegrinder/bot/dispatch/dispatch.py +0 -0
  21. telegrinder/bot/dispatch/handler/__init__.py +0 -0
  22. telegrinder/bot/dispatch/handler/abc.py +0 -0
  23. telegrinder/bot/dispatch/handler/func.py +1 -1
  24. telegrinder/bot/dispatch/handler/message_reply.py +0 -0
  25. telegrinder/bot/dispatch/middleware/__init__.py +0 -0
  26. telegrinder/bot/dispatch/middleware/abc.py +0 -0
  27. telegrinder/bot/dispatch/process.py +0 -0
  28. telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
  29. telegrinder/bot/dispatch/return_manager/abc.py +0 -0
  30. telegrinder/bot/dispatch/return_manager/callback_query.py +0 -0
  31. telegrinder/bot/dispatch/return_manager/inline_query.py +0 -0
  32. telegrinder/bot/dispatch/return_manager/message.py +0 -0
  33. telegrinder/bot/dispatch/view/__init__.py +0 -0
  34. telegrinder/bot/dispatch/view/abc.py +20 -16
  35. telegrinder/bot/dispatch/view/box.py +0 -0
  36. telegrinder/bot/dispatch/view/callback_query.py +0 -0
  37. telegrinder/bot/dispatch/view/inline_query.py +0 -0
  38. telegrinder/bot/dispatch/view/message.py +0 -0
  39. telegrinder/bot/dispatch/waiter_machine/__init__.py +0 -0
  40. telegrinder/bot/dispatch/waiter_machine/machine.py +0 -0
  41. telegrinder/bot/dispatch/waiter_machine/middleware.py +0 -0
  42. telegrinder/bot/dispatch/waiter_machine/short_state.py +0 -0
  43. telegrinder/bot/polling/__init__.py +0 -0
  44. telegrinder/bot/polling/abc.py +0 -0
  45. telegrinder/bot/polling/polling.py +7 -11
  46. telegrinder/bot/rules/__init__.py +0 -0
  47. telegrinder/bot/rules/abc.py +1 -1
  48. telegrinder/bot/rules/adapter/__init__.py +0 -0
  49. telegrinder/bot/rules/adapter/abc.py +0 -0
  50. telegrinder/bot/rules/adapter/errors.py +0 -0
  51. telegrinder/bot/rules/adapter/event.py +0 -0
  52. telegrinder/bot/rules/adapter/raw_update.py +0 -0
  53. telegrinder/bot/rules/callback_data.py +3 -11
  54. telegrinder/bot/rules/command.py +0 -0
  55. telegrinder/bot/rules/enum_text.py +0 -0
  56. telegrinder/bot/rules/func.py +0 -0
  57. telegrinder/bot/rules/fuzzy.py +0 -0
  58. telegrinder/bot/rules/inline.py +2 -1
  59. telegrinder/bot/rules/integer.py +0 -0
  60. telegrinder/bot/rules/is_from.py +0 -0
  61. telegrinder/bot/rules/markup.py +3 -1
  62. telegrinder/bot/rules/mention.py +0 -0
  63. telegrinder/bot/rules/message_entities.py +3 -1
  64. telegrinder/bot/rules/regex.py +1 -1
  65. telegrinder/bot/rules/rule_enum.py +0 -0
  66. telegrinder/bot/rules/start.py +0 -0
  67. telegrinder/bot/rules/text.py +0 -0
  68. telegrinder/bot/scenario/__init__.py +2 -2
  69. telegrinder/bot/scenario/abc.py +0 -0
  70. telegrinder/bot/scenario/checkbox.py +9 -13
  71. telegrinder/bot/scenario/choice.py +2 -2
  72. telegrinder/client/__init__.py +0 -0
  73. telegrinder/client/abc.py +0 -0
  74. telegrinder/client/aiohttp.py +0 -0
  75. telegrinder/model.py +35 -36
  76. telegrinder/modules.py +21 -11
  77. telegrinder/msgspec_json.py +0 -0
  78. telegrinder/msgspec_utils.py +2 -2
  79. telegrinder/node/__init__.py +0 -0
  80. telegrinder/node/attachment.py +0 -0
  81. telegrinder/node/base.py +0 -0
  82. telegrinder/node/composer.py +0 -0
  83. telegrinder/node/container.py +0 -0
  84. telegrinder/node/message.py +0 -0
  85. telegrinder/node/rule.py +0 -0
  86. telegrinder/node/source.py +0 -0
  87. telegrinder/node/text.py +0 -0
  88. telegrinder/node/tools/__init__.py +0 -0
  89. telegrinder/node/tools/generator.py +0 -0
  90. telegrinder/node/update.py +0 -0
  91. telegrinder/rules.py +0 -0
  92. telegrinder/tools/__init__.py +2 -3
  93. telegrinder/tools/buttons.py +0 -0
  94. telegrinder/tools/error_handler/__init__.py +2 -0
  95. telegrinder/tools/error_handler/abc.py +5 -1
  96. telegrinder/tools/error_handler/error.py +10 -0
  97. telegrinder/tools/error_handler/error_handler.py +100 -81
  98. telegrinder/tools/formatting/__init__.py +0 -0
  99. telegrinder/tools/formatting/html.py +0 -0
  100. telegrinder/tools/formatting/links.py +0 -0
  101. telegrinder/tools/formatting/spec_html_formats.py +0 -0
  102. telegrinder/tools/global_context/__init__.py +0 -0
  103. telegrinder/tools/global_context/abc.py +0 -0
  104. telegrinder/tools/global_context/global_context.py +65 -67
  105. telegrinder/tools/global_context/telegrinder_ctx.py +0 -0
  106. telegrinder/tools/i18n/__init__.py +0 -0
  107. telegrinder/tools/i18n/base.py +0 -0
  108. telegrinder/tools/i18n/middleware/__init__.py +0 -0
  109. telegrinder/tools/i18n/middleware/base.py +0 -0
  110. telegrinder/tools/i18n/simple.py +0 -0
  111. telegrinder/tools/kb_set/__init__.py +0 -0
  112. telegrinder/tools/kb_set/base.py +0 -0
  113. telegrinder/tools/kb_set/yaml.py +3 -3
  114. telegrinder/tools/keyboard.py +17 -26
  115. telegrinder/tools/loop_wrapper/__init__.py +0 -0
  116. telegrinder/tools/loop_wrapper/abc.py +0 -0
  117. telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -0
  118. telegrinder/tools/magic.py +1 -1
  119. telegrinder/tools/parse_mode.py +0 -0
  120. telegrinder/types/__init__.py +0 -0
  121. telegrinder/types/enums.py +2 -0
  122. telegrinder/types/methods.py +477 -526
  123. telegrinder/types/objects.py +209 -97
  124. {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/LICENSE +0 -0
  125. {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/METADATA +9 -8
  126. {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/RECORD +38 -37
  127. {telegrinder-0.1.dev159.dist-info → telegrinder-0.1.dev161.dist-info}/WHEEL +1 -1
@@ -77,14 +77,21 @@ async def execute_method_answer(
77
77
  params["reply_parameters"] = compose_reply_params(**reply_parameters)
78
78
 
79
79
  if link_preview_options is not None and isinstance(link_preview_options, dict):
80
- params["link_preview_options"] = compose_link_preview_options(**link_preview_options)
81
-
80
+ params["link_preview_options"] = compose_link_preview_options(
81
+ **link_preview_options
82
+ )
83
+
82
84
  result = await getattr(message.ctx_api, method_name)(**params)
83
85
  return result.map(
84
- lambda x: x if isinstance(x, bool)
85
- else MessageCute.from_update(x, bound_api=message.api)
86
- if not isinstance(x, list)
87
- else [MessageCute.from_update(m, bound_api=message.api) for m in x]
86
+ lambda x: (
87
+ x
88
+ if isinstance(x, bool)
89
+ else (
90
+ MessageCute.from_update(x, bound_api=message.api)
91
+ if not isinstance(x, list)
92
+ else [MessageCute.from_update(m, bound_api=message.api) for m in x]
93
+ )
94
+ )
88
95
  )
89
96
 
90
97
 
@@ -93,7 +100,7 @@ async def execute_method_reply(
93
100
  method_name: str,
94
101
  params: dict[str, typing.Any],
95
102
  ) -> Result[typing.Any, APIError]:
96
- params.setdefault("reply_params", {})
103
+ params.setdefault("reply_parameters", {})
97
104
  return await execute_method_answer(message, method_name, params)
98
105
 
99
106
 
@@ -105,12 +112,19 @@ async def execute_method_edit(
105
112
  params = compose_method_params(
106
113
  params=params,
107
114
  update=update,
108
- default_params={"chat_id", "message_id", "message_thread_id", "inline_message_id"},
115
+ default_params={
116
+ "chat_id",
117
+ "message_id",
118
+ "message_thread_id",
119
+ "inline_message_id",
120
+ },
109
121
  validators={
110
122
  "inline_message_id": lambda x: not x.message_id,
111
- "message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)
112
- if isinstance(x, MessageCute) else bool(x.message) and getattr(
113
- x.message.unwrap().v, "is_topic_message", False
123
+ "message_thread_id": lambda x: (
124
+ x.is_topic_message.unwrap_or(False)
125
+ if isinstance(x, MessageCute)
126
+ else bool(x.message)
127
+ and getattr(x.message.unwrap().v, "is_topic_message", False)
114
128
  ),
115
129
  },
116
130
  )
@@ -120,9 +134,11 @@ async def execute_method_edit(
120
134
  result = await getattr(update.ctx_api, method_name)(**params)
121
135
  return result.map(
122
136
  lambda v: Variative[MessageCute, bool](
123
- v.only().map(
137
+ v.only()
138
+ .map(
124
139
  lambda x: MessageCute.from_update(x, bound_api=update.api),
125
- ).unwrap_or(typing.cast(bool, v.v))
140
+ )
141
+ .unwrap_or(typing.cast(bool, v.v))
126
142
  )
127
143
  )
128
144
 
@@ -175,20 +191,16 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
175
191
  )
176
192
  async def answer(
177
193
  self,
178
- text: str | Option[str] = Nothing,
179
- chat_id: int | str | Option[int | str] = Nothing,
180
- message_thread_id: int | Option[int] = Nothing,
181
- parse_mode: str | Option[str] = Nothing,
182
- entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
183
- disable_notification: bool | Option[bool] = Nothing,
184
- protect_content: bool | Option[bool] = Nothing,
185
- link_preview_options: Option[LinkPreviewOptions | dict[str, typing.Any]]
186
- | LinkPreviewOptions
187
- | dict[str, typing.Any] = Nothing,
188
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
189
- | ReplyParameters
190
- | dict[str, typing.Any] = Nothing,
191
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
194
+ text: str | None = None,
195
+ chat_id: int | str | None = None,
196
+ message_thread_id: int | None = None,
197
+ parse_mode: str | None = None,
198
+ entities: list[MessageEntity] | None = None,
199
+ disable_notification: bool | None = None,
200
+ protect_content: bool | None = None,
201
+ link_preview_options: LinkPreviewOptions | dict[str, typing.Any] | None = None,
202
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
203
+ reply_markup: ReplyMarkup | None = None,
192
204
  **other: typing.Any,
193
205
  ) -> Result[MessageCute, APIError]:
194
206
  """Shortcut `API.send_message()`, see the [documentation](https://core.telegram.org/bots/api#sendmessage)
@@ -230,21 +242,17 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
230
242
  )
231
243
  async def reply(
232
244
  self,
233
- text: str | Option[str] = Nothing,
234
- chat_id: int | str | Option[int | str] = Nothing,
235
- message_id: int | Option[int] = Nothing,
236
- message_thread_id: int | Option[int] = Nothing,
237
- parse_mode: str | Option[str] = Nothing,
238
- entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
239
- disable_notification: bool | Option[bool] = Nothing,
240
- protect_content: bool | Option[bool] = Nothing,
241
- link_preview_options: Option[LinkPreviewOptions | dict[str, typing.Any]]
242
- | LinkPreviewOptions
243
- | dict[str, typing.Any] = Nothing,
244
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
245
- | ReplyParameters
246
- | dict[str, typing.Any] = Nothing,
247
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
245
+ text: str | None = None,
246
+ chat_id: int | str | None = None,
247
+ message_id: int | None = None,
248
+ message_thread_id: int | None = None,
249
+ parse_mode: str | None = None,
250
+ entities: list[MessageEntity] | None = None,
251
+ disable_notification: bool | None = None,
252
+ protect_content: bool | None = None,
253
+ link_preview_options: LinkPreviewOptions | dict[str, typing.Any] | None = None,
254
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
255
+ reply_markup: ReplyMarkup | None = None,
248
256
  **other: typing.Any,
249
257
  ) -> Result[MessageCute, APIError]:
250
258
  """Shortcut `API.send_message()`, see the [documentation](https://core.telegram.org/bots/api#sendmessage)
@@ -282,9 +290,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
282
290
  @shortcut("delete_message", custom_params={"message_thread_id"})
283
291
  async def delete(
284
292
  self,
285
- chat_id: int | Option[int] = Nothing,
286
- message_id: int | Option[int] = Nothing,
287
- message_thread_id: int | Option[int] = Nothing,
293
+ chat_id: int | None = None,
294
+ message_id: int | None = None,
295
+ message_thread_id: int | None = None,
288
296
  **other: typing.Any,
289
297
  ) -> Result[bool, APIError]:
290
298
  """Shortcut `API.delete_message()`, see the [documentation](https://core.telegram.org/bots/api#deletemessage)
@@ -313,7 +321,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
313
321
  params=get_params(locals()),
314
322
  update=self,
315
323
  default_params={"chat_id", "message_id", "message_thread_id"},
316
- validators={"message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)},
324
+ validators={
325
+ "message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)
326
+ },
317
327
  )
318
328
  return await self.ctx_api.delete_message(**params)
319
329
 
@@ -324,16 +334,14 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
324
334
  )
325
335
  async def edit(
326
336
  self,
327
- text: str | Option[str] = Nothing,
328
- chat_id: int | Option[int] = Nothing,
329
- message_id: int | Option[int] = Nothing,
330
- message_thread_id: int | Option[int] = Nothing,
331
- parse_mode: str | Option[str] = Nothing,
332
- entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
333
- link_preview_options: Option[LinkPreviewOptions | dict[str, typing.Any]]
334
- | LinkPreviewOptions
335
- | dict[str, typing.Any] = Nothing,
336
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
337
+ text: str | None = None,
338
+ chat_id: int | None = None,
339
+ message_id: int | None = None,
340
+ message_thread_id: int | None = None,
341
+ parse_mode: str | None = None,
342
+ entities: list[MessageEntity] | None = None,
343
+ link_preview_options: LinkPreviewOptions | dict[str, typing.Any] | None = None,
344
+ reply_markup: InlineKeyboardMarkup | None = None,
337
345
  **other: typing.Any,
338
346
  ) -> Result[Variative[MessageCute, bool], APIError]:
339
347
  """Shortcut `API.edit_message_text()`, see the [documentation](https://core.telegram.org/bots/api#editmessagetext)
@@ -371,19 +379,17 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
371
379
  )
372
380
  async def copy(
373
381
  self,
374
- chat_id: int | str | Option[int | str] = Nothing,
375
- from_chat_id: int | str | Option[int | str] = Nothing,
376
- message_id: int | Option[int] = Nothing,
377
- message_thread_id: Option[int] | int = Nothing,
378
- caption: Option[str] | str = Nothing,
379
- parse_mode: Option[str] | str = Nothing,
380
- caption_entities: Option[list[MessageEntity]] | list[MessageEntity] = Nothing,
381
- disable_notification: Option[bool] | bool = Nothing,
382
- protect_content: Option[bool] | bool = Nothing,
383
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
384
- | ReplyParameters
385
- | dict[str, typing.Any] = Nothing,
386
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
382
+ chat_id: int | str | None = None,
383
+ from_chat_id: int | str | None = None,
384
+ message_id: int | None = None,
385
+ message_thread_id: int | None = None,
386
+ caption: str | None = None,
387
+ parse_mode: str | None = None,
388
+ caption_entities: list[MessageEntity] | None = None,
389
+ disable_notification: bool | None = None,
390
+ protect_content: bool | None = None,
391
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
392
+ reply_markup: ReplyMarkup | None = None,
387
393
  **other: typing.Any,
388
394
  ) -> Result[MessageId, APIError]:
389
395
  """Shortcut `API.copy_message()`, see the [documentation](https://core.telegram.org/bots/api#copymessage)
@@ -435,7 +441,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
435
441
  ("from_chat_id", "chat_id"),
436
442
  "message_thread_id",
437
443
  },
438
- validators={"message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)},
444
+ validators={
445
+ "message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)
446
+ },
439
447
  )
440
448
  if isinstance(reply_parameters, dict):
441
449
  reply_parameters.setdefault("message_id", params.get("message_id"))
@@ -449,20 +457,17 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
449
457
  )
450
458
  async def react(
451
459
  self,
452
- reaction: str
453
- | ReactionEmoji
454
- | ReactionType
455
- | list[str | ReactionEmoji | ReactionType]
456
- | Option[
460
+ reaction: (
457
461
  str
458
462
  | ReactionEmoji
459
463
  | ReactionType
460
464
  | list[str | ReactionEmoji | ReactionType]
461
- ] = Nothing,
462
- chat_id: int | str | Option[int | str] = Nothing,
463
- message_thread_id: Option[int] | int = Nothing,
464
- message_id: int | Option[int] = Nothing,
465
- is_big: bool | Option[bool] = Nothing,
465
+ | None
466
+ ) = None,
467
+ chat_id: int | str | None = None,
468
+ message_thread_id: int | None = None,
469
+ message_id: int | None = None,
470
+ is_big: bool | None = None,
466
471
  **other: typing.Any,
467
472
  ) -> Result[bool, APIError]:
468
473
  """Shortcut `API.set_message_reaction()`, see the [documentation](https://core.telegram.org/bots/api#setmessagereaction)
@@ -493,23 +498,25 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
493
498
  params=get_params(locals()),
494
499
  update=self,
495
500
  default_params={"chat_id", "message_id", "message_thread_id"},
496
- validators={"message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)},
501
+ validators={
502
+ "message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)
503
+ },
497
504
  )
498
505
  if reaction:
499
506
  params["reaction"] = compose_reactions(
500
507
  reaction.unwrap() if isinstance(reaction, Some) else reaction,
501
508
  )
502
509
  return await self.ctx_api.set_message_reaction(**params)
503
-
510
+
504
511
  @shortcut("forward_message", custom_params={"message_thread_id"})
505
512
  async def forward(
506
513
  self,
507
514
  chat_id: int | str,
508
- message_id: int | Option[int] = Nothing,
509
- from_chat_id: int | str | Option[int | str] = Nothing,
510
- message_thread_id: int | Option[int] = Nothing,
511
- disable_notification: bool | Option[bool] = Nothing,
512
- protect_content: bool | Option[bool] = Nothing,
515
+ message_id: int | None = None,
516
+ from_chat_id: int | str | None = None,
517
+ message_thread_id: int | None = None,
518
+ disable_notification: bool | None = None,
519
+ protect_content: bool | None = None,
513
520
  **other: typing.Any,
514
521
  ) -> Result[MessageCute, APIError]:
515
522
  """Shortcut `API.forward_message()`, see the [documentation](https://core.telegram.org/bots/api#forwardmessage)
@@ -536,20 +543,26 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
536
543
  params = compose_method_params(
537
544
  params=get_params(locals()),
538
545
  update=self,
539
- default_params={("from_chat_id", "chat_id"), "message_id", "message_thread_id"},
540
- validators={"message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)},
546
+ default_params={
547
+ ("from_chat_id", "chat_id"),
548
+ "message_id",
549
+ "message_thread_id",
550
+ },
551
+ validators={
552
+ "message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)
553
+ },
541
554
  )
542
555
  return (await self.ctx_api.forward_message(**params)).map(
543
556
  lambda message: MessageCute.from_update(message, bound_api=self.api),
544
557
  )
545
-
558
+
546
559
  @shortcut("pin_chat_message", custom_params={"message_thread_id"})
547
560
  async def pin(
548
561
  self,
549
- chat_id: Option[int | str] | int | str = Nothing,
550
- message_id: Option[int] | int = Nothing,
551
- message_thread_id: Option[int] | int = Nothing,
552
- disable_notification: bool | Option[bool] = Nothing,
562
+ chat_id: int | str | None = None,
563
+ message_id: int | None = None,
564
+ message_thread_id: int | None = None,
565
+ disable_notification: bool | None = None,
553
566
  **other: typing.Any,
554
567
  ) -> Result[bool, "APIError"]:
555
568
  """Shortcut `API.pin_chat_message()`, see the [documentation](https://core.telegram.org/bots/api#pinchatmessage)
@@ -577,16 +590,18 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
577
590
  params=get_params(locals()),
578
591
  update=self,
579
592
  default_params={"chat_id", "message_id", "message_thread_id"},
580
- validators={"message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)},
593
+ validators={
594
+ "message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)
595
+ },
581
596
  )
582
597
  return await self.ctx_api.pin_chat_message(**params)
583
598
 
584
599
  @shortcut("unpin_chat_message", custom_params={"message_thread_id"})
585
600
  async def unpin(
586
601
  self,
587
- chat_id: Option[int | str] | int | str = Nothing,
588
- message_id: Option[int] | int = Nothing,
589
- message_thread_id: Option[int] | int = Nothing,
602
+ chat_id: int | str | None = None,
603
+ message_id: int | None = None,
604
+ message_thread_id: int | None = None,
590
605
  **other: typing.Any,
591
606
  ) -> Result[bool, "APIError"]:
592
607
  """Shortcut `API.unpin_chat_message()`, see the [documentation](https://core.telegram.org/bots/api#unpinchatmessage)
@@ -608,7 +623,9 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
608
623
  params=get_params(locals()),
609
624
  update=self,
610
625
  default_params={"chat_id", "message_id", "message_thread_id"},
611
- validators={"message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)},
626
+ validators={
627
+ "message_thread_id": lambda x: x.is_topic_message.unwrap_or(False)
628
+ },
612
629
  )
613
630
  return await self.ctx_api.pin_chat_message(**params)
614
631
 
@@ -619,22 +636,20 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
619
636
  )
620
637
  async def answer_audio(
621
638
  self,
622
- audio: str | InputFile,
623
- chat_id: int | str | Option[int | str] = Nothing,
624
- message_thread_id: int | Option[int] = Nothing,
625
- caption: str | Option[str] = Nothing,
626
- parse_mode: str | Option[str] = Nothing,
627
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
628
- duration: int | Option[int] = Nothing,
629
- performer: str | Option[str] = Nothing,
630
- title: str | Option[str] = Nothing,
631
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
632
- disable_notification: Option[bool] | bool = Nothing,
633
- protect_content: bool | Option[bool] = Nothing,
634
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
635
- | ReplyParameters
636
- | dict[str, typing.Any] = Nothing,
637
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
639
+ audio: InputFile | str,
640
+ chat_id: int | str | None = None,
641
+ message_thread_id: int | None = None,
642
+ caption: str | None = None,
643
+ parse_mode: str | None = None,
644
+ caption_entities: list[MessageEntity] | None = None,
645
+ duration: int | None = None,
646
+ performer: str | None = None,
647
+ title: str | None = None,
648
+ thumbnail: InputFile | str | None = None,
649
+ disable_notification: bool | None = None,
650
+ protect_content: bool | None = None,
651
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
652
+ reply_markup: ReplyMarkup | None = None,
638
653
  **other: typing.Any,
639
654
  ) -> Result[MessageCute, APIError]:
640
655
  """Shortcut `API.send_audio()`, see the [documentation](https://core.telegram.org/bots/api#sendaudio)
@@ -697,23 +712,21 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
697
712
  )
698
713
  async def answer_animation(
699
714
  self,
700
- animation: str | InputFile,
701
- chat_id: int | str | Option[int | str] = Nothing,
702
- message_thread_id: int | Option[int] = Nothing,
703
- caption: str | Option[str] = Nothing,
704
- parse_mode: str | Option[str] = Nothing,
705
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
706
- duration: int | Option[int] = Nothing,
707
- width: int | Option[int] = Nothing,
708
- height: int | Option[int] = Nothing,
709
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
710
- has_spoiler: bool | Option[bool] = Nothing,
711
- disable_notification: Option[bool] | bool = Nothing,
712
- protect_content: bool | Option[bool] = Nothing,
713
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
714
- | ReplyParameters
715
- | dict[str, typing.Any] = Nothing,
716
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
715
+ animation: InputFile | str,
716
+ chat_id: int | str | None = None,
717
+ message_thread_id: int | None = None,
718
+ caption: str | None = None,
719
+ parse_mode: str | None = None,
720
+ caption_entities: list[MessageEntity] | None = None,
721
+ duration: int | None = None,
722
+ width: int | None = None,
723
+ height: int | None = None,
724
+ thumbnail: InputFile | str | None = None,
725
+ has_spoiler: bool | None = None,
726
+ disable_notification: bool | None = None,
727
+ protect_content: bool | None = None,
728
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
729
+ reply_markup: ReplyMarkup | None = None,
717
730
  **other: typing.Any,
718
731
  ) -> Result[MessageCute, APIError]:
719
732
  """Shortcut `API.send_animation()`, see the [documentation](https://core.telegram.org/bots/api#sendanimation)
@@ -777,20 +790,18 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
777
790
  )
778
791
  async def answer_document(
779
792
  self,
780
- document: str | InputFile,
781
- chat_id: int | str | Option[int | str] = Nothing,
782
- message_thread_id: int | Option[int] = Nothing,
783
- caption: str | Option[str] = Nothing,
784
- parse_mode: str | Option[str] = Nothing,
785
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
786
- disable_content_type_detection: Option[bool] | bool = Nothing,
787
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
788
- disable_notification: Option[bool] | bool = Nothing,
789
- protect_content: bool | Option[bool] = Nothing,
790
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
791
- | ReplyParameters
792
- | dict[str, typing.Any] = Nothing,
793
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
793
+ document: InputFile | str,
794
+ chat_id: int | str | None = None,
795
+ message_thread_id: int | None = None,
796
+ caption: str | None = None,
797
+ parse_mode: str | None = None,
798
+ caption_entities: list[MessageEntity] | None = None,
799
+ disable_content_type_detection: bool | None = None,
800
+ thumbnail: InputFile | str | None = None,
801
+ disable_notification: bool | None = None,
802
+ protect_content: bool | None = None,
803
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
804
+ reply_markup: ReplyMarkup | None = None,
794
805
  **other: typing.Any,
795
806
  ) -> Result[MessageCute, APIError]:
796
807
  """Shortcut `API.send_document()`, see the [documentation](https://core.telegram.org/bots/api#senddocument)
@@ -849,19 +860,17 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
849
860
  )
850
861
  async def answer_photo(
851
862
  self,
852
- photo: str | InputFile,
853
- chat_id: int | str | Option[int | str] = Nothing,
854
- message_thread_id: int | Option[int] = Nothing,
855
- caption: str | Option[str] = Nothing,
856
- parse_mode: str | Option[str] = Nothing,
857
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
858
- has_spoiler: bool | Option[bool] = Nothing,
859
- disable_notification: Option[bool] | bool = Nothing,
860
- protect_content: bool | Option[bool] = Nothing,
861
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
862
- | ReplyParameters
863
- | dict[str, typing.Any] = Nothing,
864
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
863
+ photo: InputFile | str,
864
+ chat_id: int | str | None = None,
865
+ message_thread_id: int | None = None,
866
+ caption: str | None = None,
867
+ parse_mode: str | None = None,
868
+ caption_entities: list[MessageEntity] | None = None,
869
+ has_spoiler: bool | None = None,
870
+ disable_notification: bool | None = None,
871
+ protect_content: bool | None = None,
872
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
873
+ reply_markup: ReplyMarkup | None = None,
865
874
  **other: typing.Any,
866
875
  ) -> Result[MessageCute, APIError]:
867
876
  """Shortcut `API.send_photo()`, see the [documentation](https://core.telegram.org/bots/api#sendphoto)
@@ -911,16 +920,14 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
911
920
  )
912
921
  async def answer_sticker(
913
922
  self,
914
- sticker: str | InputFile,
915
- chat_id: int | str | Option[int | str] = Nothing,
916
- emoji: str | Option[str] = Nothing,
917
- message_thread_id: int | Option[int] = Nothing,
918
- disable_notification: Option[bool] | bool = Nothing,
919
- protect_content: bool | Option[bool] = Nothing,
920
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
921
- | ReplyParameters
922
- | dict[str, typing.Any] = Nothing,
923
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
923
+ sticker: InputFile | str,
924
+ chat_id: int | str | None = None,
925
+ emoji: str | None = None,
926
+ message_thread_id: int | None = None,
927
+ disable_notification: bool | None = None,
928
+ protect_content: bool | None = None,
929
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
930
+ reply_markup: ReplyMarkup | None = None,
924
931
  **other: typing.Any,
925
932
  ) -> Result[MessageCute, APIError]:
926
933
  """Shortcut `API.send_sticker()`, see the [documentation](https://core.telegram.org/bots/api#sendsticker)
@@ -962,24 +969,22 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
962
969
  )
963
970
  async def answer_video(
964
971
  self,
965
- video: str | InputFile,
966
- chat_id: int | str | Option[int | str] = Nothing,
967
- message_thread_id: int | Option[int] = Nothing,
968
- caption: str | Option[str] = Nothing,
969
- parse_mode: str | Option[str] = Nothing,
970
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
971
- duration: int | Option[int] = Nothing,
972
- width: int | Option[int] = Nothing,
973
- height: int | Option[int] = Nothing,
974
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
975
- has_spoiler: bool | Option[bool] = Nothing,
976
- supports_streaming: bool | Option[bool] = Nothing,
977
- disable_notification: Option[bool] | bool = Nothing,
978
- protect_content: bool | Option[bool] = Nothing,
979
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
980
- | ReplyParameters
981
- | dict[str, typing.Any] = Nothing,
982
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
972
+ video: InputFile | str,
973
+ chat_id: int | str | None = None,
974
+ message_thread_id: int | None = None,
975
+ caption: str | None = None,
976
+ parse_mode: str | None = None,
977
+ caption_entities: list[MessageEntity] | None = None,
978
+ duration: int | None = None,
979
+ width: int | None = None,
980
+ height: int | None = None,
981
+ thumbnail: InputFile | str | None = None,
982
+ has_spoiler: bool | None = None,
983
+ supports_streaming: bool | None = None,
984
+ disable_notification: bool | None = None,
985
+ protect_content: bool | None = None,
986
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
987
+ reply_markup: ReplyMarkup | None = None,
983
988
  **other: typing.Any,
984
989
  ) -> Result[MessageCute, APIError]:
985
990
  """Shortcut `API.send_video()`, see the [documentation](https://core.telegram.org/bots/api#sendvideo)
@@ -1046,18 +1051,16 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1046
1051
  )
1047
1052
  async def answer_video_note(
1048
1053
  self,
1049
- video_note: str | InputFile,
1050
- chat_id: int | str | Option[int | str] = Nothing,
1051
- duration: int | Option[int] = Nothing,
1052
- length: int | Option[int] = Nothing,
1053
- message_thread_id: int | Option[int] = Nothing,
1054
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
1055
- disable_notification: Option[bool] | bool = Nothing,
1056
- protect_content: bool | Option[bool] = Nothing,
1057
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1058
- | ReplyParameters
1059
- | dict[str, typing.Any] = Nothing,
1060
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
1054
+ video_note: InputFile | str,
1055
+ chat_id: int | str | None = None,
1056
+ duration: int | None = None,
1057
+ length: int | None = None,
1058
+ message_thread_id: int | None = None,
1059
+ thumbnail: InputFile | str | None = None,
1060
+ disable_notification: bool | None = None,
1061
+ protect_content: bool | None = None,
1062
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1063
+ reply_markup: ReplyMarkup | None = None,
1061
1064
  **other: typing.Any,
1062
1065
  ) -> Result[MessageCute, APIError]:
1063
1066
  """Shortcut `API.send_video_note()`, see the [documentation](https://core.telegram.org/bots/api#sendvideonote)
@@ -1108,19 +1111,17 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1108
1111
  )
1109
1112
  async def answer_voice(
1110
1113
  self,
1111
- voice: str | InputFile,
1112
- chat_id: int | str | Option[int | str] = Nothing,
1113
- message_thread_id: int | Option[int] = Nothing,
1114
- caption: str | Option[str] = Nothing,
1115
- parse_mode: str | Option[str] = Nothing,
1116
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
1117
- duration: int | Option[int] = Nothing,
1118
- disable_notification: Option[bool] | bool = Nothing,
1119
- protect_content: bool | Option[bool] = Nothing,
1120
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1121
- | ReplyParameters
1122
- | dict[str, typing.Any] = Nothing,
1123
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
1114
+ voice: InputFile | str,
1115
+ chat_id: int | str | None = None,
1116
+ message_thread_id: int | None = None,
1117
+ caption: str | None = None,
1118
+ parse_mode: str | None = None,
1119
+ caption_entities: list[MessageEntity] | None = None,
1120
+ duration: int | None = None,
1121
+ disable_notification: bool | None = None,
1122
+ protect_content: bool | None = None,
1123
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1124
+ reply_markup: ReplyMarkup | None = None,
1124
1125
  **other: typing.Any,
1125
1126
  ) -> Result[MessageCute, APIError]:
1126
1127
  """Shortcut `API.send_voice()`, see the [documentation](https://core.telegram.org/bots/api#sendvoice)
@@ -1173,26 +1174,22 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1173
1174
  self,
1174
1175
  question: str,
1175
1176
  options: list[str],
1176
- chat_id: int | str | Option[int | str] = Nothing,
1177
- message_thread_id: Option[int] | int = Nothing,
1178
- is_anonymous: Option[bool] | bool = Nothing,
1179
- type: Option[typing.Literal["quiz", "regular"]]
1180
- | typing.Literal["quiz", "regular"] = Nothing,
1181
- allows_multiple_answers: Option[bool] | bool = Nothing,
1182
- correct_option_id: Option[int] | int = Nothing,
1183
- explanation: Option[str] | str = Nothing,
1184
- explanation_parse_mode: Option[str] | str = Nothing,
1185
- explanation_entities: Option[list[MessageEntity]]
1186
- | list[MessageEntity] = Nothing,
1187
- open_period: Option[int] | int = Nothing,
1188
- close_date: Option[datetime | int] | datetime | int = Nothing,
1189
- is_closed: Option[bool] | bool = Nothing,
1190
- disable_notification: Option[bool] | bool = Nothing,
1191
- protect_content: Option[bool] | bool = Nothing,
1192
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1193
- | ReplyParameters
1194
- | dict[str, typing.Any] = Nothing,
1195
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
1177
+ chat_id: int | str | None = None,
1178
+ message_thread_id: int | None = None,
1179
+ is_anonymous: bool | None = None,
1180
+ type: typing.Literal["quiz", "regular"] | None = None,
1181
+ allows_multiple_answers: bool | None = None,
1182
+ correct_option_id: int | None = None,
1183
+ explanation: str | None = None,
1184
+ explanation_parse_mode: str | None = None,
1185
+ explanation_entities: list[MessageEntity] | None = None,
1186
+ open_period: int | None = None,
1187
+ close_date: datetime | int | None = None,
1188
+ is_closed: bool | None = None,
1189
+ disable_notification: bool | None = None,
1190
+ protect_content: bool | None = None,
1191
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1192
+ reply_markup: ReplyMarkup | None = None,
1196
1193
  **other: typing.Any,
1197
1194
  ) -> Result[MessageCute, APIError]:
1198
1195
  """Shortcut `API.send_poll()`, see the [documentation](https://core.telegram.org/bots/api#sendpoll)
@@ -1263,18 +1260,16 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1263
1260
  longitude: float,
1264
1261
  title: str,
1265
1262
  address: str,
1266
- chat_id: int | str | Option[int | str] = Nothing,
1267
- message_thread_id: Option[int] | int = Nothing,
1268
- foursquare_id: Option[str] | str = Nothing,
1269
- foursquare_type: Option[str] | str = Nothing,
1270
- google_place_id: Option[str] | str = Nothing,
1271
- google_place_type: Option[str] | str = Nothing,
1272
- disable_notification: Option[bool] | bool = Nothing,
1273
- protect_content: Option[bool] | bool = Nothing,
1274
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1275
- | ReplyParameters
1276
- | dict[str, typing.Any] = Nothing,
1277
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
1263
+ chat_id: int | str | None = None,
1264
+ message_thread_id: int | None = None,
1265
+ foursquare_id: str | None = None,
1266
+ foursquare_type: str | None = None,
1267
+ google_place_id: str | None = None,
1268
+ google_place_type: str | None = None,
1269
+ disable_notification: bool | None = None,
1270
+ protect_content: bool | None = None,
1271
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1272
+ reply_markup: ReplyMarkup | None = None,
1278
1273
  **other: typing.Any,
1279
1274
  ) -> Result[MessageCute, APIError]:
1280
1275
  """Shortcut `API.send_venue()`, see the [documentation](https://core.telegram.org/bots/api#sendvenue)
@@ -1324,15 +1319,13 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1324
1319
  )
1325
1320
  async def answer_dice(
1326
1321
  self,
1327
- emoji: Option[DiceEmoji] | DiceEmoji = Nothing,
1328
- chat_id: int | str | Option[int | str] = Nothing,
1329
- message_thread_id: Option[int] | int = Nothing,
1330
- disable_notification: Option[bool] | bool = Nothing,
1331
- protect_content: Option[bool] | bool = Nothing,
1332
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1333
- | ReplyParameters
1334
- | dict[str, typing.Any] = Nothing,
1335
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
1322
+ emoji: DiceEmoji | None = None,
1323
+ chat_id: int | str | None = None,
1324
+ message_thread_id: int | None = None,
1325
+ disable_notification: bool | None = None,
1326
+ protect_content: bool | None = None,
1327
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1328
+ reply_markup: ReplyMarkup | None = None,
1336
1329
  **other: typing.Any,
1337
1330
  ) -> Result[MessageCute, APIError]:
1338
1331
  """Shortcut `API.send_dice()`, see the [documentation](https://core.telegram.org/bots/api#senddice)
@@ -1369,15 +1362,13 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1369
1362
  )
1370
1363
  async def answer_game(
1371
1364
  self,
1372
- chat_id: int | str | Option[int | str] = Nothing,
1373
- message_thread_id: Option[int] | int = Nothing,
1374
- game_short_name: Option[str] | str = Nothing,
1375
- disable_notification: Option[bool] | bool = Nothing,
1376
- protect_content: Option[bool] | bool = Nothing,
1377
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1378
- | ReplyParameters
1379
- | dict[str, typing.Any] = Nothing,
1380
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
1365
+ chat_id: int | str | None = None,
1366
+ message_thread_id: int | None = None,
1367
+ game_short_name: str | None = None,
1368
+ disable_notification: bool | None = None,
1369
+ protect_content: bool | None = None,
1370
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1371
+ reply_markup: ReplyMarkup | None = None,
1381
1372
  **other: typing.Any,
1382
1373
  ) -> Result[MessageCute, APIError]:
1383
1374
  """Shortcut `API.send_game()`, see the [documentation](https://core.telegram.org/bots/api#sendgame)
@@ -1416,29 +1407,27 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1416
1407
  provider_token: str,
1417
1408
  currency: str,
1418
1409
  prices: list[LabeledPrice],
1419
- chat_id: Option[int | str] | int | str = Nothing,
1420
- message_thread_id: Option[int] | int = Nothing,
1421
- max_tip_amount: Option[int] | int = Nothing,
1422
- suggested_tip_amounts: Option[list[int]] | list[int] = Nothing,
1423
- start_parameter: Option[str] | str = Nothing,
1424
- provider_data: Option[str] | str = Nothing,
1425
- photo_url: Option[str] | str = Nothing,
1426
- photo_size: Option[int] | int = Nothing,
1427
- photo_width: Option[int] | int = Nothing,
1428
- photo_height: Option[int] | int = Nothing,
1429
- need_name: Option[bool] | bool = Nothing,
1430
- need_phone_number: Option[bool] | bool = Nothing,
1431
- need_email: Option[bool] | bool = Nothing,
1432
- need_shipping_address: Option[bool] | bool = Nothing,
1433
- send_phone_number_to_provider: Option[bool] | bool = Nothing,
1434
- send_email_to_provider: Option[bool] | bool = Nothing,
1435
- is_flexible: Option[bool] | bool = Nothing,
1436
- disable_notification: Option[bool] | bool = Nothing,
1437
- protect_content: Option[bool] | bool = Nothing,
1438
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1439
- | ReplyParameters
1440
- | dict[str, typing.Any] = Nothing,
1441
- reply_markup: Option[InlineKeyboardMarkup] | InlineKeyboardMarkup = Nothing,
1410
+ chat_id: int | str | None = None,
1411
+ message_thread_id: int | None = None,
1412
+ max_tip_amount: int | None = None,
1413
+ suggested_tip_amounts: list[int] | None = None,
1414
+ start_parameter: str | None = None,
1415
+ provider_data: str | None = None,
1416
+ photo_url: str | None = None,
1417
+ photo_size: int | None = None,
1418
+ photo_width: int | None = None,
1419
+ photo_height: int | None = None,
1420
+ need_name: bool | None = None,
1421
+ need_phone_number: bool | None = None,
1422
+ need_email: bool | None = None,
1423
+ need_shipping_address: bool | None = None,
1424
+ send_phone_number_to_provider: bool | None = None,
1425
+ send_email_to_provider: bool | None = None,
1426
+ is_flexible: bool | None = None,
1427
+ disable_notification: bool | None = None,
1428
+ protect_content: bool | None = None,
1429
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1430
+ reply_markup: InlineKeyboardMarkup | None = None,
1442
1431
  **other: typing.Any,
1443
1432
  ) -> Result[MessageCute, APIError]:
1444
1433
  """Shortcut `API.send_invoice()`, see the [documentation](https://core.telegram.org/bots/api#sendinvoice)
@@ -1529,8 +1518,8 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1529
1518
  async def answer_chat_action(
1530
1519
  self,
1531
1520
  action: ChatAction,
1532
- chat_id: Option[int | str] | int | str = Nothing,
1533
- message_thread_id: Option[int] | int = Nothing,
1521
+ chat_id: int | str | None = None,
1522
+ message_thread_id: int | None = None,
1534
1523
  **other: typing.Any,
1535
1524
  ) -> Result[bool, APIError]:
1536
1525
  """Shortcut `API.send_chat_action()`, see the [documentation](https://core.telegram.org/bots/api#sendchataction)
@@ -1562,16 +1551,14 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1562
1551
  async def answer_media_group(
1563
1552
  self,
1564
1553
  media: list[InputMedia | tuple[MediaType, InputFile | str]],
1565
- chat_id: Option[int | str] | int | str = Nothing,
1566
- message_thread_id: Option[int] | int = Nothing,
1567
- caption: str | Option[str] = Nothing,
1568
- parse_mode: str | Option[str] = Nothing,
1569
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
1570
- disable_notification: Option[bool] | bool = Nothing,
1571
- protect_content: Option[bool] | bool = Nothing,
1572
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1573
- | ReplyParameters
1574
- | dict[str, typing.Any] = Nothing,
1554
+ chat_id: int | str | None = None,
1555
+ message_thread_id: int | None = None,
1556
+ caption: str | None = None,
1557
+ parse_mode: str | None = None,
1558
+ caption_entities: list[MessageEntity] | None = None,
1559
+ disable_notification: bool | None = None,
1560
+ protect_content: bool | None = None,
1561
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1575
1562
  **other: typing.Any,
1576
1563
  ) -> Result[list[MessageCute], APIError]:
1577
1564
  """Shortcut `API.send_media_group()`, see the [documentation](https://core.telegram.org/bots/api#sendmediagroup)
@@ -1602,7 +1589,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1602
1589
  :param protect_content: Protects the contents of the sent messages from forwarding and saving. \
1603
1590
 
1604
1591
  :param reply_parameters: Description of the message to reply to."""
1605
-
1592
+
1606
1593
  params = get_params(locals())
1607
1594
 
1608
1595
  for i, m in enumerate(media[:]):
@@ -1616,7 +1603,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1616
1603
  parse_mode=parse_mode,
1617
1604
  ),
1618
1605
  )
1619
-
1606
+
1620
1607
  return await execute_method_answer(self, "send_media_group", params)
1621
1608
 
1622
1609
  @shortcut(
@@ -1628,18 +1615,16 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1628
1615
  self,
1629
1616
  latitude: float,
1630
1617
  longitude: float,
1631
- chat_id: Option[int | str] | int | str = Nothing,
1632
- message_thread_id: Option[int] | int = Nothing,
1633
- horizontal_accuracy: Option[float] | float = Nothing,
1634
- heading: Option[int] | int = Nothing,
1635
- live_period: Option[int] | int = Nothing,
1636
- proximity_alert_radius: Option[int] | int = Nothing,
1637
- disable_notification: Option[bool] | bool = Nothing,
1638
- protect_content: Option[bool] | bool = Nothing,
1639
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1640
- | ReplyParameters
1641
- | dict[str, typing.Any] = Nothing,
1642
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
1618
+ chat_id: int | str | None = None,
1619
+ message_thread_id: int | None = None,
1620
+ horizontal_accuracy: float | None = None,
1621
+ heading: int | None = None,
1622
+ live_period: int | None = None,
1623
+ proximity_alert_radius: int | None = None,
1624
+ disable_notification: bool | None = None,
1625
+ protect_content: bool | None = None,
1626
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1627
+ reply_markup: ReplyMarkup | None = None,
1643
1628
  **other: typing.Any,
1644
1629
  ) -> Result[MessageCute, APIError]:
1645
1630
  """Shortcut `API.send_location()`, see the [documentation](https://core.telegram.org/bots/api#sendlocation)
@@ -1688,16 +1673,14 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1688
1673
  self,
1689
1674
  phone_number: str,
1690
1675
  first_name: str,
1691
- last_name: Option[str] | str = Nothing,
1692
- vcard: Option[str] | str = Nothing,
1693
- chat_id: Option[int | str] | int | str = Nothing,
1694
- message_thread_id: Option[int] | int = Nothing,
1695
- disable_notification: Option[bool] | bool = Nothing,
1696
- protect_content: Option[bool] | bool = Nothing,
1697
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1698
- | ReplyParameters
1699
- | dict[str, typing.Any] = Nothing,
1700
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
1676
+ last_name: str | None = None,
1677
+ vcard: str | None = None,
1678
+ chat_id: int | str | None = None,
1679
+ message_thread_id: int | None = None,
1680
+ disable_notification: bool | None = None,
1681
+ protect_content: bool | None = None,
1682
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1683
+ reply_markup: ReplyMarkup | None = None,
1701
1684
  **other: typing.Any,
1702
1685
  ) -> Result[MessageCute, APIError]:
1703
1686
  """Shortcut `API.send_contact()`, see the [documentation](https://core.telegram.org/bots/api#sendcontact)
@@ -1737,22 +1720,20 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1737
1720
  )
1738
1721
  async def reply_audio(
1739
1722
  self,
1740
- audio: str | InputFile,
1741
- chat_id: int | str | Option[int | str] = Nothing,
1742
- message_thread_id: int | Option[int] = Nothing,
1743
- caption: str | Option[str] = Nothing,
1744
- parse_mode: str | Option[str] = Nothing,
1745
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
1746
- duration: int | Option[int] = Nothing,
1747
- performer: str | Option[str] = Nothing,
1748
- title: str | Option[str] = Nothing,
1749
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
1750
- disable_notification: Option[bool] | bool = Nothing,
1751
- protect_content: bool | Option[bool] = Nothing,
1752
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1753
- | ReplyParameters
1754
- | dict[str, typing.Any] = Nothing,
1755
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
1723
+ audio: InputFile | str,
1724
+ chat_id: int | str | None = None,
1725
+ message_thread_id: int | None = None,
1726
+ caption: str | None = None,
1727
+ parse_mode: str | None = None,
1728
+ caption_entities: list[MessageEntity] | None = None,
1729
+ duration: int | None = None,
1730
+ performer: str | None = None,
1731
+ title: str | None = None,
1732
+ thumbnail: InputFile | str | None = None,
1733
+ disable_notification: bool | None = None,
1734
+ protect_content: bool | None = None,
1735
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1736
+ reply_markup: ReplyMarkup | None = None,
1756
1737
  **other: typing.Any,
1757
1738
  ) -> Result[MessageCute, APIError]:
1758
1739
  """Shortcut `API.send_audio()`, see the [documentation](https://core.telegram.org/bots/api#sendaudio)
@@ -1815,23 +1796,21 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1815
1796
  )
1816
1797
  async def reply_animation(
1817
1798
  self,
1818
- animation: str | InputFile,
1819
- chat_id: int | str | Option[int | str] = Nothing,
1820
- message_thread_id: int | Option[int] = Nothing,
1821
- caption: str | Option[str] = Nothing,
1822
- parse_mode: str | Option[str] = Nothing,
1823
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
1824
- duration: int | Option[int] = Nothing,
1825
- width: int | Option[int] = Nothing,
1826
- height: int | Option[int] = Nothing,
1827
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
1828
- has_spoiler: bool | Option[bool] = Nothing,
1829
- disable_notification: Option[bool] | bool = Nothing,
1830
- protect_content: bool | Option[bool] = Nothing,
1831
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1832
- | ReplyParameters
1833
- | dict[str, typing.Any] = Nothing,
1834
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
1799
+ animation: InputFile | str,
1800
+ chat_id: int | str | None = None,
1801
+ message_thread_id: int | None = None,
1802
+ caption: str | None = None,
1803
+ parse_mode: str | None = None,
1804
+ caption_entities: list[MessageEntity] | None = None,
1805
+ duration: int | None = None,
1806
+ width: int | None = None,
1807
+ height: int | None = None,
1808
+ thumbnail: InputFile | str | None = None,
1809
+ has_spoiler: bool | None = None,
1810
+ disable_notification: bool | None = None,
1811
+ protect_content: bool | None = None,
1812
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1813
+ reply_markup: ReplyMarkup | None = None,
1835
1814
  **other: typing.Any,
1836
1815
  ) -> Result[MessageCute, APIError]:
1837
1816
  """Shortcut `API.send_animation()`, see the [documentation](https://core.telegram.org/bots/api#sendanimation)
@@ -1895,20 +1874,18 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1895
1874
  )
1896
1875
  async def reply_document(
1897
1876
  self,
1898
- document: str | InputFile,
1899
- chat_id: int | str | Option[int | str] = Nothing,
1900
- message_thread_id: int | Option[int] = Nothing,
1901
- caption: str | Option[str] = Nothing,
1902
- parse_mode: str | Option[str] = Nothing,
1903
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
1904
- disable_content_type_detection: Option[bool] | bool = Nothing,
1905
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
1906
- disable_notification: Option[bool] | bool = Nothing,
1907
- protect_content: bool | Option[bool] = Nothing,
1908
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1909
- | ReplyParameters
1910
- | dict[str, typing.Any] = Nothing,
1911
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
1877
+ document: InputFile | str,
1878
+ chat_id: int | str | None = None,
1879
+ message_thread_id: int | None = None,
1880
+ caption: str | None = None,
1881
+ parse_mode: str | None = None,
1882
+ caption_entities: list[MessageEntity] | None = None,
1883
+ disable_content_type_detection: bool | None = None,
1884
+ thumbnail: InputFile | str | None = None,
1885
+ disable_notification: bool | None = None,
1886
+ protect_content: bool | None = None,
1887
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1888
+ reply_markup: ReplyMarkup | None = None,
1912
1889
  **other: typing.Any,
1913
1890
  ) -> Result[MessageCute, APIError]:
1914
1891
  """Shortcut `API.send_document()`, see the [documentation](https://core.telegram.org/bots/api#senddocument)
@@ -1967,19 +1944,17 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
1967
1944
  )
1968
1945
  async def reply_photo(
1969
1946
  self,
1970
- photo: str | InputFile,
1971
- chat_id: int | str | Option[int | str] = Nothing,
1972
- message_thread_id: int | Option[int] = Nothing,
1973
- caption: str | Option[str] = Nothing,
1974
- parse_mode: str | Option[str] = Nothing,
1975
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
1976
- has_spoiler: bool | Option[bool] = Nothing,
1977
- disable_notification: Option[bool] | bool = Nothing,
1978
- protect_content: bool | Option[bool] = Nothing,
1979
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
1980
- | ReplyParameters
1981
- | dict[str, typing.Any] = Nothing,
1982
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
1947
+ photo: InputFile | str,
1948
+ chat_id: int | str | None = None,
1949
+ message_thread_id: int | None = None,
1950
+ caption: str | None = None,
1951
+ parse_mode: str | None = None,
1952
+ caption_entities: list[MessageEntity] | None = None,
1953
+ has_spoiler: bool | None = None,
1954
+ disable_notification: bool | None = None,
1955
+ protect_content: bool | None = None,
1956
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
1957
+ reply_markup: ReplyMarkup | None = None,
1983
1958
  **other: typing.Any,
1984
1959
  ) -> Result[MessageCute, APIError]:
1985
1960
  """Shortcut `API.send_photo()`, see the [documentation](https://core.telegram.org/bots/api#sendphoto)
@@ -2029,16 +2004,14 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2029
2004
  )
2030
2005
  async def reply_sticker(
2031
2006
  self,
2032
- sticker: str | InputFile,
2033
- chat_id: int | str | Option[int | str] = Nothing,
2034
- emoji: str | Option[str] = Nothing,
2035
- message_thread_id: int | Option[int] = Nothing,
2036
- disable_notification: Option[bool] | bool = Nothing,
2037
- protect_content: bool | Option[bool] = Nothing,
2038
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2039
- | ReplyParameters
2040
- | dict[str, typing.Any] = Nothing,
2041
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
2007
+ sticker: InputFile | str,
2008
+ chat_id: int | str | None = None,
2009
+ emoji: str | None = None,
2010
+ message_thread_id: int | None = None,
2011
+ disable_notification: bool | None = None,
2012
+ protect_content: bool | None = None,
2013
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2014
+ reply_markup: ReplyMarkup | None = None,
2042
2015
  **other: typing.Any,
2043
2016
  ) -> Result[MessageCute, APIError]:
2044
2017
  """Shortcut `API.send_sticker()`, see the [documentation](https://core.telegram.org/bots/api#sendsticker)
@@ -2080,24 +2053,22 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2080
2053
  )
2081
2054
  async def reply_video(
2082
2055
  self,
2083
- video: str | InputFile,
2084
- chat_id: int | str | Option[int | str] = Nothing,
2085
- message_thread_id: int | Option[int] = Nothing,
2086
- caption: str | Option[str] = Nothing,
2087
- parse_mode: str | Option[str] = Nothing,
2088
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
2089
- duration: int | Option[int] = Nothing,
2090
- width: int | Option[int] = Nothing,
2091
- height: int | Option[int] = Nothing,
2092
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
2093
- has_spoiler: bool | Option[bool] = Nothing,
2094
- supports_streaming: bool | Option[bool] = Nothing,
2095
- disable_notification: Option[bool] | bool = Nothing,
2096
- protect_content: bool | Option[bool] = Nothing,
2097
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2098
- | ReplyParameters
2099
- | dict[str, typing.Any] = Nothing,
2100
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
2056
+ video: InputFile | str,
2057
+ chat_id: int | str | None = None,
2058
+ message_thread_id: int | None = None,
2059
+ caption: str | None = None,
2060
+ parse_mode: str | None = None,
2061
+ caption_entities: list[MessageEntity] | None = None,
2062
+ duration: int | None = None,
2063
+ width: int | None = None,
2064
+ height: int | None = None,
2065
+ thumbnail: InputFile | str | None = None,
2066
+ has_spoiler: bool | None = None,
2067
+ supports_streaming: bool | None = None,
2068
+ disable_notification: bool | None = None,
2069
+ protect_content: bool | None = None,
2070
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2071
+ reply_markup: ReplyMarkup | None = None,
2101
2072
  **other: typing.Any,
2102
2073
  ) -> Result[MessageCute, APIError]:
2103
2074
  """Shortcut `API.send_video()`, see the [documentation](https://core.telegram.org/bots/api#sendvideo)
@@ -2164,18 +2135,16 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2164
2135
  )
2165
2136
  async def reply_video_note(
2166
2137
  self,
2167
- video_note: str | InputFile,
2168
- chat_id: int | str | Option[int | str] = Nothing,
2169
- duration: int | Option[int] = Nothing,
2170
- length: int | Option[int] = Nothing,
2171
- message_thread_id: int | Option[int] = Nothing,
2172
- thumbnail: Option[InputFile | str] | InputFile | str = Nothing,
2173
- disable_notification: Option[bool] | bool = Nothing,
2174
- protect_content: bool | Option[bool] = Nothing,
2175
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2176
- | ReplyParameters
2177
- | dict[str, typing.Any] = Nothing,
2178
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
2138
+ video_note: InputFile | str,
2139
+ chat_id: int | str | None = None,
2140
+ duration: int | None = None,
2141
+ length: int | None = None,
2142
+ message_thread_id: int | None = None,
2143
+ thumbnail: InputFile | str | None = None,
2144
+ disable_notification: bool | None = None,
2145
+ protect_content: bool | None = None,
2146
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2147
+ reply_markup: ReplyMarkup | None = None,
2179
2148
  **other: typing.Any,
2180
2149
  ) -> Result[MessageCute, APIError]:
2181
2150
  """Shortcut `API.send_video_note()`, see the [documentation](https://core.telegram.org/bots/api#sendvideonote)
@@ -2226,19 +2195,17 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2226
2195
  )
2227
2196
  async def reply_voice(
2228
2197
  self,
2229
- voice: str | InputFile,
2230
- chat_id: int | str | Option[int | str] = Nothing,
2231
- message_thread_id: int | Option[int] = Nothing,
2232
- caption: str | Option[str] = Nothing,
2233
- parse_mode: str | Option[str] = Nothing,
2234
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
2235
- duration: int | Option[int] = Nothing,
2236
- disable_notification: Option[bool] | bool = Nothing,
2237
- protect_content: bool | Option[bool] = Nothing,
2238
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2239
- | ReplyParameters
2240
- | dict[str, typing.Any] = Nothing,
2241
- reply_markup: ReplyMarkup | Option[ReplyMarkup] = Nothing,
2198
+ voice: InputFile | str,
2199
+ chat_id: int | str | None = None,
2200
+ message_thread_id: int | None = None,
2201
+ caption: str | None = None,
2202
+ parse_mode: str | None = None,
2203
+ caption_entities: list[MessageEntity] | None = None,
2204
+ duration: int | None = None,
2205
+ disable_notification: bool | None = None,
2206
+ protect_content: bool | None = None,
2207
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2208
+ reply_markup: ReplyMarkup | None = None,
2242
2209
  **other: typing.Any,
2243
2210
  ) -> Result[MessageCute, APIError]:
2244
2211
  """Shortcut `API.send_voice()`, see the [documentation](https://core.telegram.org/bots/api#sendvoice)
@@ -2291,26 +2258,22 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2291
2258
  self,
2292
2259
  question: str,
2293
2260
  options: list[str],
2294
- chat_id: int | str | Option[int | str] = Nothing,
2295
- message_thread_id: Option[int] | int = Nothing,
2296
- is_anonymous: Option[bool] | bool = Nothing,
2297
- type: Option[typing.Literal["quiz", "regular"]]
2298
- | typing.Literal["quiz", "regular"] = Nothing,
2299
- allows_multiple_answers: Option[bool] | bool = Nothing,
2300
- correct_option_id: Option[int] | int = Nothing,
2301
- explanation: Option[str] | str = Nothing,
2302
- explanation_parse_mode: Option[str] | str = Nothing,
2303
- explanation_entities: Option[list[MessageEntity]]
2304
- | list[MessageEntity] = Nothing,
2305
- open_period: Option[int] | int = Nothing,
2306
- close_date: Option[datetime | int] | datetime | int = Nothing,
2307
- is_closed: Option[bool] | bool = Nothing,
2308
- disable_notification: Option[bool] | bool = Nothing,
2309
- protect_content: Option[bool] | bool = Nothing,
2310
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2311
- | ReplyParameters
2312
- | dict[str, typing.Any] = Nothing,
2313
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
2261
+ chat_id: int | str | None = None,
2262
+ message_thread_id: int | None = None,
2263
+ is_anonymous: bool | None = None,
2264
+ type: typing.Literal["quiz", "regular"] | None = None,
2265
+ allows_multiple_answers: bool | None = None,
2266
+ correct_option_id: int | None = None,
2267
+ explanation: str | None = None,
2268
+ explanation_parse_mode: str | None = None,
2269
+ explanation_entities: list[MessageEntity] | None = None,
2270
+ open_period: int | None = None,
2271
+ close_date: datetime | int | None = None,
2272
+ is_closed: bool | None = None,
2273
+ disable_notification: bool | None = None,
2274
+ protect_content: bool | None = None,
2275
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2276
+ reply_markup: ReplyMarkup | None = None,
2314
2277
  **other: typing.Any,
2315
2278
  ) -> Result[MessageCute, APIError]:
2316
2279
  """Shortcut `API.send_poll()`, see the [documentation](https://core.telegram.org/bots/api#sendpoll)
@@ -2381,18 +2344,16 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2381
2344
  longitude: float,
2382
2345
  title: str,
2383
2346
  address: str,
2384
- chat_id: int | str | Option[int | str] = Nothing,
2385
- message_thread_id: Option[int] | int = Nothing,
2386
- foursquare_id: Option[str] | str = Nothing,
2387
- foursquare_type: Option[str] | str = Nothing,
2388
- google_place_id: Option[str] | str = Nothing,
2389
- google_place_type: Option[str] | str = Nothing,
2390
- disable_notification: Option[bool] | bool = Nothing,
2391
- protect_content: Option[bool] | bool = Nothing,
2392
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2393
- | ReplyParameters
2394
- | dict[str, typing.Any] = Nothing,
2395
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
2347
+ chat_id: int | str | None = None,
2348
+ message_thread_id: int | None = None,
2349
+ foursquare_id: str | None = None,
2350
+ foursquare_type: str | None = None,
2351
+ google_place_id: str | None = None,
2352
+ google_place_type: str | None = None,
2353
+ disable_notification: bool | None = None,
2354
+ protect_content: bool | None = None,
2355
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2356
+ reply_markup: ReplyMarkup | None = None,
2396
2357
  **other: typing.Any,
2397
2358
  ) -> Result[MessageCute, APIError]:
2398
2359
  """Shortcut `API.send_venue()`, see the [documentation](https://core.telegram.org/bots/api#sendvenue)
@@ -2442,15 +2403,13 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2442
2403
  )
2443
2404
  async def reply_dice(
2444
2405
  self,
2445
- chat_id: int | str | Option[int | str] = Nothing,
2446
- message_thread_id: Option[int] | int = Nothing,
2447
- emoji: Option[DiceEmoji] | DiceEmoji = Nothing,
2448
- disable_notification: Option[bool] | bool = Nothing,
2449
- protect_content: Option[bool] | bool = Nothing,
2450
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2451
- | ReplyParameters
2452
- | dict[str, typing.Any] = Nothing,
2453
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
2406
+ chat_id: int | str | None = None,
2407
+ message_thread_id: int | None = None,
2408
+ emoji: DiceEmoji | None = None,
2409
+ disable_notification: bool | None = None,
2410
+ protect_content: bool | None = None,
2411
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2412
+ reply_markup: ReplyMarkup | None = None,
2454
2413
  **other: typing.Any,
2455
2414
  ) -> Result[MessageCute, APIError]:
2456
2415
  """Shortcut `API.send_dice()`, see the [documentation](https://core.telegram.org/bots/api#senddice)
@@ -2487,15 +2446,13 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2487
2446
  )
2488
2447
  async def reply_game(
2489
2448
  self,
2490
- chat_id: int | str | Option[int | str] = Nothing,
2491
- message_thread_id: Option[int] | int = Nothing,
2492
- game_short_name: Option[str] | str = Nothing,
2493
- disable_notification: Option[bool] | bool = Nothing,
2494
- protect_content: Option[bool] | bool = Nothing,
2495
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2496
- | ReplyParameters
2497
- | dict[str, typing.Any] = Nothing,
2498
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
2449
+ chat_id: int | str | None = None,
2450
+ message_thread_id: int | None = None,
2451
+ game_short_name: str | None = None,
2452
+ disable_notification: bool | None = None,
2453
+ protect_content: bool | None = None,
2454
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2455
+ reply_markup: ReplyMarkup | None = None,
2499
2456
  **other: typing.Any,
2500
2457
  ) -> Result[MessageCute, APIError]:
2501
2458
  """Shortcut `API.send_game()`, see the [documentation](https://core.telegram.org/bots/api#sendgame)
@@ -2534,29 +2491,27 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2534
2491
  provider_token: str,
2535
2492
  currency: str,
2536
2493
  prices: list[LabeledPrice],
2537
- chat_id: Option[int | str] | int | str = Nothing,
2538
- message_thread_id: Option[int] | int = Nothing,
2539
- max_tip_amount: Option[int] | int = Nothing,
2540
- suggested_tip_amounts: Option[list[int]] | list[int] = Nothing,
2541
- start_parameter: Option[str] | str = Nothing,
2542
- provider_data: Option[str] | str = Nothing,
2543
- photo_url: Option[str] | str = Nothing,
2544
- photo_size: Option[int] | int = Nothing,
2545
- photo_width: Option[int] | int = Nothing,
2546
- photo_height: Option[int] | int = Nothing,
2547
- need_name: Option[bool] | bool = Nothing,
2548
- need_phone_number: Option[bool] | bool = Nothing,
2549
- need_email: Option[bool] | bool = Nothing,
2550
- need_shipping_address: Option[bool] | bool = Nothing,
2551
- send_phone_number_to_provider: Option[bool] | bool = Nothing,
2552
- send_email_to_provider: Option[bool] | bool = Nothing,
2553
- is_flexible: Option[bool] | bool = Nothing,
2554
- disable_notification: Option[bool] | bool = Nothing,
2555
- protect_content: Option[bool] | bool = Nothing,
2556
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2557
- | ReplyParameters
2558
- | dict[str, typing.Any] = Nothing,
2559
- reply_markup: Option[InlineKeyboardMarkup] | InlineKeyboardMarkup = Nothing,
2494
+ chat_id: int | str | None = None,
2495
+ message_thread_id: int | None = None,
2496
+ max_tip_amount: int | None = None,
2497
+ suggested_tip_amounts: list[int] | None = None,
2498
+ start_parameter: str | None = None,
2499
+ provider_data: str | None = None,
2500
+ photo_url: str | None = None,
2501
+ photo_size: int | None = None,
2502
+ photo_width: int | None = None,
2503
+ photo_height: int | None = None,
2504
+ need_name: bool | None = None,
2505
+ need_phone_number: bool | None = None,
2506
+ need_email: bool | None = None,
2507
+ need_shipping_address: bool | None = None,
2508
+ send_phone_number_to_provider: bool | None = None,
2509
+ send_email_to_provider: bool | None = None,
2510
+ is_flexible: bool | None = None,
2511
+ disable_notification: bool | None = None,
2512
+ protect_content: bool | None = None,
2513
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2514
+ reply_markup: InlineKeyboardMarkup | None = None,
2560
2515
  **other: typing.Any,
2561
2516
  ) -> Result[MessageCute, APIError]:
2562
2517
  """Shortcut `API.send_invoice()`, see the [documentation](https://core.telegram.org/bots/api#sendinvoice)
@@ -2653,16 +2608,14 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2653
2608
  async def reply_media_group(
2654
2609
  self,
2655
2610
  media: list[InputMedia | tuple[MediaType, InputFile | str]],
2656
- chat_id: Option[int | str] | int | str = Nothing,
2657
- message_thread_id: Option[int] | int = Nothing,
2658
- caption: str | Option[str] = Nothing,
2659
- parse_mode: str | Option[str] = Nothing,
2660
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
2661
- disable_notification: Option[bool] | bool = Nothing,
2662
- protect_content: Option[bool] | bool = Nothing,
2663
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2664
- | ReplyParameters
2665
- | dict[str, typing.Any] = Nothing,
2611
+ chat_id: int | str | None = None,
2612
+ message_thread_id: int | None = None,
2613
+ caption: str | None = None,
2614
+ parse_mode: str | None = None,
2615
+ caption_entities: list[MessageEntity] | None = None,
2616
+ disable_notification: bool | None = None,
2617
+ protect_content: bool | None = None,
2618
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2666
2619
  **other: typing.Any,
2667
2620
  ) -> Result[list[MessageCute], APIError]:
2668
2621
  """Shortcut `API.send_media_group()`, see the [documentation](https://core.telegram.org/bots/api#sendmediagroup)
@@ -2707,18 +2660,16 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2707
2660
  self,
2708
2661
  latitude: float,
2709
2662
  longitude: float,
2710
- chat_id: Option[int | str] | int | str = Nothing,
2711
- message_thread_id: Option[int] | int = Nothing,
2712
- horizontal_accuracy: Option[float] | float = Nothing,
2713
- heading: Option[int] | int = Nothing,
2714
- live_period: Option[int] | int = Nothing,
2715
- proximity_alert_radius: Option[int] | int = Nothing,
2716
- disable_notification: Option[bool] | bool = Nothing,
2717
- protect_content: Option[bool] | bool = Nothing,
2718
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2719
- | ReplyParameters
2720
- | dict[str, typing.Any] = Nothing,
2721
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
2663
+ chat_id: int | str | None = None,
2664
+ message_thread_id: int | None = None,
2665
+ horizontal_accuracy: float | None = None,
2666
+ heading: int | None = None,
2667
+ live_period: int | None = None,
2668
+ proximity_alert_radius: int | None = None,
2669
+ disable_notification: bool | None = None,
2670
+ protect_content: bool | None = None,
2671
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2672
+ reply_markup: ReplyMarkup | None = None,
2722
2673
  **other: typing.Any,
2723
2674
  ) -> Result[MessageCute, APIError]:
2724
2675
  """Shortcut `API.send_location()`, see the [documentation](https://core.telegram.org/bots/api#sendlocation)
@@ -2767,16 +2718,14 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2767
2718
  self,
2768
2719
  phone_number: str,
2769
2720
  first_name: str,
2770
- last_name: Option[str] | str = Nothing,
2771
- vcard: Option[str] | str = Nothing,
2772
- chat_id: Option[int | str] | int | str = Nothing,
2773
- message_thread_id: Option[int] | int = Nothing,
2774
- disable_notification: Option[bool] | bool = Nothing,
2775
- protect_content: Option[bool] | bool = Nothing,
2776
- reply_parameters: Option[ReplyParameters | dict[str, typing.Any]]
2777
- | ReplyParameters
2778
- | dict[str, typing.Any] = Nothing,
2779
- reply_markup: Option[ReplyMarkup] | ReplyMarkup = Nothing,
2721
+ last_name: str | None = None,
2722
+ vcard: str | None = None,
2723
+ chat_id: int | str | None = None,
2724
+ message_thread_id: int | None = None,
2725
+ disable_notification: bool | None = None,
2726
+ protect_content: bool | None = None,
2727
+ reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
2728
+ reply_markup: ReplyMarkup | None = None,
2780
2729
  **other: typing.Any,
2781
2730
  ) -> Result[MessageCute, APIError]:
2782
2731
  """Shortcut `API.send_contact()`, see the [documentation](https://core.telegram.org/bots/api#sendcontact)
@@ -2818,13 +2767,13 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2818
2767
  self,
2819
2768
  latitude: float,
2820
2769
  longitude: float,
2821
- chat_id: Option[int | str] | int | str = Nothing,
2822
- message_id: Option[int] | int = Nothing,
2823
- message_thread_id: Option[int] | int = Nothing,
2824
- horizontal_accuracy: Option[float] | float = Nothing,
2825
- heading: Option[int] | int = Nothing,
2826
- proximity_alert_radius: Option[int] | int = Nothing,
2827
- reply_markup: Option[InlineKeyboardMarkup] | InlineKeyboardMarkup = Nothing,
2770
+ chat_id: int | str | None = None,
2771
+ message_id: int | None = None,
2772
+ message_thread_id: int | None = None,
2773
+ horizontal_accuracy: float | None = None,
2774
+ heading: int | None = None,
2775
+ proximity_alert_radius: int | None = None,
2776
+ reply_markup: InlineKeyboardMarkup | None = None,
2828
2777
  **other: typing.Any,
2829
2778
  ) -> Result[Variative[MessageCute, bool], APIError]:
2830
2779
  """Shortcut `API.edit_message_live_location()`, see the [documentation](https://core.telegram.org/bots/api#editmessagelivelocation)
@@ -2866,13 +2815,13 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2866
2815
  )
2867
2816
  async def edit_caption(
2868
2817
  self,
2869
- caption: Option[str] | str,
2870
- chat_id: Option[int | str] | int | str = Nothing,
2871
- message_id: Option[int] | int = Nothing,
2872
- message_thread_id: int | Option[int] = Nothing,
2873
- parse_mode: Option[str] | str = Nothing,
2874
- caption_entities: Option[list[MessageEntity]] | list[MessageEntity] = Nothing,
2875
- reply_markup: Option[InlineKeyboardMarkup] | InlineKeyboardMarkup = Nothing,
2818
+ caption: str,
2819
+ chat_id: int | str | None = None,
2820
+ message_id: int | None = None,
2821
+ message_thread_id: int | None = None,
2822
+ parse_mode: str | None = None,
2823
+ caption_entities: list[MessageEntity] | None = None,
2824
+ reply_markup: InlineKeyboardMarkup | None = None,
2876
2825
  **other: typing.Any,
2877
2826
  ) -> Result[Variative[MessageCute, bool], APIError]:
2878
2827
  """Shortcut `API.edit_message_caption()`, see the [documentation](https://core.telegram.org/bots/api#editmessagecaption)
@@ -2904,19 +2853,26 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2904
2853
 
2905
2854
  @shortcut(
2906
2855
  "edit_message_media",
2907
- custom_params={"media", "type", "message_thread_id", "caption", "parse_mode", "caption_entities"},
2856
+ custom_params={
2857
+ "media",
2858
+ "type",
2859
+ "message_thread_id",
2860
+ "caption",
2861
+ "parse_mode",
2862
+ "caption_entities",
2863
+ },
2908
2864
  )
2909
2865
  async def edit_media(
2910
2866
  self,
2911
- media: str | InputFile | InputMedia,
2912
- type: MediaType | Option[MediaType] = Nothing,
2913
- caption: Option[str] | str = Nothing,
2914
- parse_mode: Option[str] | str = Nothing,
2915
- caption_entities: Option[list[MessageEntity]] | list[MessageEntity] = Nothing,
2916
- chat_id: Option[int | str] | int | str = Nothing,
2917
- message_id: Option[int] | int = Nothing,
2918
- message_thread_id: Option[int] | int = Nothing,
2919
- reply_markup: Option[InlineKeyboardMarkup] | InlineKeyboardMarkup = Nothing,
2867
+ media: InputFile | InputMedia | str,
2868
+ type: MediaType | None = None,
2869
+ caption: str | None = None,
2870
+ parse_mode: str | None = None,
2871
+ caption_entities: list[MessageEntity] | None = None,
2872
+ chat_id: int | str | None = None,
2873
+ message_id: int | None = None,
2874
+ message_thread_id: int | None = None,
2875
+ reply_markup: InlineKeyboardMarkup | None = None,
2920
2876
  **other: typing.Any,
2921
2877
  ) -> Result[Variative[MessageCute, bool], APIError]:
2922
2878
  """Shortcut `API.edit_message_media()`, see the [documentation](https://core.telegram.org/bots/api#editmessagemedia)
@@ -2966,7 +2922,7 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2966
2922
  caption_entities=caption_entities,
2967
2923
  parse_mode=parse_mode,
2968
2924
  )
2969
-
2925
+
2970
2926
  return await execute_method_edit(self, "edit_message_media", params)
2971
2927
 
2972
2928
  @shortcut(
@@ -2976,10 +2932,10 @@ class MessageCute(BaseCute[Message], Message, kw_only=True):
2976
2932
  )
2977
2933
  async def edit_reply_markup(
2978
2934
  self,
2979
- chat_id: Option[int | str] | int | str = Nothing,
2980
- message_id: Option[int] | int = Nothing,
2981
- message_thread_id: Option[int] | int = Nothing,
2982
- reply_markup: Option[InlineKeyboardMarkup] | InlineKeyboardMarkup = Nothing,
2935
+ chat_id: int | str | None = None,
2936
+ message_id: int | None = None,
2937
+ message_thread_id: int | None = None,
2938
+ reply_markup: InlineKeyboardMarkup | None = None,
2983
2939
  **other: typing.Any,
2984
2940
  ) -> Result[Variative[MessageCute, bool], APIError]:
2985
2941
  """Shortcut `API.edit_message_reply_markup()`, see the [documentation](https://core.telegram.org/bots/api#editmessagereplymarkup)