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
@@ -4,7 +4,6 @@ from fntypes.co import Result, Variative
4
4
 
5
5
  from telegrinder.api.error import APIError
6
6
  from telegrinder.model import full_result, get_params
7
- from telegrinder.msgspec_utils import Nothing, Option
8
7
  from telegrinder.types.objects import * # noqa: F403
9
8
 
10
9
  if typing.TYPE_CHECKING:
@@ -17,12 +16,12 @@ class APIMethods:
17
16
 
18
17
  async def get_updates(
19
18
  self,
20
- offset: int | Option[int] = Nothing,
21
- limit: int | Option[int] = Nothing,
22
- timeout: int | Option[int] = Nothing,
23
- allowed_updates: list[str] | Option[list[str]] = Nothing,
19
+ offset: int | None = None,
20
+ limit: int | None = None,
21
+ timeout: int | None = None,
22
+ allowed_updates: list[str] | None = None,
24
23
  **other: typing.Any,
25
- ) -> Result[list[Update], "APIError"]:
24
+ ) -> Result[list[Update], APIError]:
26
25
  """Method `getUpdates`, see the [documentation](https://core.telegram.org/bots/api#getupdates)
27
26
 
28
27
  Use this method to receive incoming updates using long polling (wiki).
@@ -62,14 +61,14 @@ class APIMethods:
62
61
  async def set_webhook(
63
62
  self,
64
63
  url: str,
65
- certificate: InputFile | Option[InputFile] = Nothing,
66
- ip_address: str | Option[str] = Nothing,
67
- max_connections: int | Option[int] = Nothing,
68
- allowed_updates: list[str] | Option[list[str]] = Nothing,
69
- drop_pending_updates: bool | Option[bool] = Nothing,
70
- secret_token: str | Option[str] = Nothing,
64
+ certificate: InputFile | None = None,
65
+ ip_address: str | None = None,
66
+ max_connections: int | None = None,
67
+ allowed_updates: list[str] | None = None,
68
+ drop_pending_updates: bool | None = None,
69
+ secret_token: str | None = None,
71
70
  **other: typing.Any,
72
- ) -> Result[bool, "APIError"]:
71
+ ) -> Result[bool, APIError]:
73
72
  """Method `setWebhook`, see the [documentation](https://core.telegram.org/bots/api#setwebhook)
74
73
 
75
74
  Use this method to specify a URL and receive incoming updates via an outgoing
@@ -119,9 +118,9 @@ class APIMethods:
119
118
 
120
119
  async def delete_webhook(
121
120
  self,
122
- drop_pending_updates: bool | Option[bool] = Nothing,
121
+ drop_pending_updates: bool | None = None,
123
122
  **other: typing.Any,
124
- ) -> Result[bool, "APIError"]:
123
+ ) -> Result[bool, APIError]:
125
124
  """Method `deleteWebhook`, see the [documentation](https://core.telegram.org/bots/api#deletewebhook)
126
125
 
127
126
  Use this method to remove webhook integration if you decide to switch back
@@ -138,7 +137,7 @@ class APIMethods:
138
137
 
139
138
  async def get_webhook_info(
140
139
  self, **other: typing.Any
141
- ) -> Result[WebhookInfo, "APIError"]:
140
+ ) -> Result[WebhookInfo, APIError]:
142
141
  """Method `getWebhookInfo`, see the [documentation](https://core.telegram.org/bots/api#getwebhookinfo)
143
142
 
144
143
  Use this method to get current webhook status. Requires no parameters.
@@ -152,7 +151,7 @@ class APIMethods:
152
151
  )
153
152
  return full_result(method_response, WebhookInfo)
154
153
 
155
- async def get_me(self, **other: typing.Any) -> Result[User, "APIError"]:
154
+ async def get_me(self, **other: typing.Any) -> Result[User, APIError]:
156
155
  """Method `getMe`, see the [documentation](https://core.telegram.org/bots/api#getme)
157
156
 
158
157
  A simple method for testing your bot's authentication token. Requires
@@ -166,7 +165,7 @@ class APIMethods:
166
165
  )
167
166
  return full_result(method_response, User)
168
167
 
169
- async def log_out(self, **other: typing.Any) -> Result[bool, "APIError"]:
168
+ async def log_out(self, **other: typing.Any) -> Result[bool, APIError]:
170
169
  """Method `logOut`, see the [documentation](https://core.telegram.org/bots/api#logout)
171
170
 
172
171
  Use this method to log out from the cloud Bot API server before launching
@@ -183,7 +182,7 @@ class APIMethods:
183
182
  )
184
183
  return full_result(method_response, bool)
185
184
 
186
- async def close(self, **other: typing.Any) -> Result[bool, "APIError"]:
185
+ async def close(self, **other: typing.Any) -> Result[bool, APIError]:
187
186
  """Method `close`, see the [documentation](https://core.telegram.org/bots/api#close)
188
187
 
189
188
  Use this method to close the bot instance before moving it from one local
@@ -203,25 +202,22 @@ class APIMethods:
203
202
  self,
204
203
  chat_id: int | str,
205
204
  text: str,
206
- message_thread_id: int | Option[int] = Nothing,
207
- parse_mode: str | Option[str] = Nothing,
208
- entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
209
- link_preview_options: LinkPreviewOptions | Option[LinkPreviewOptions] = Nothing,
210
- disable_notification: bool | Option[bool] = Nothing,
211
- protect_content: bool | Option[bool] = Nothing,
212
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
213
- reply_markup: InlineKeyboardMarkup
214
- | ReplyKeyboardMarkup
215
- | ReplyKeyboardRemove
216
- | ForceReply
217
- | Option[
205
+ message_thread_id: int | None = None,
206
+ parse_mode: str | None = None,
207
+ entities: list[MessageEntity] | None = None,
208
+ link_preview_options: LinkPreviewOptions | None = None,
209
+ disable_notification: bool | None = None,
210
+ protect_content: bool | None = None,
211
+ reply_parameters: ReplyParameters | None = None,
212
+ reply_markup: (
218
213
  InlineKeyboardMarkup
219
214
  | ReplyKeyboardMarkup
220
215
  | ReplyKeyboardRemove
221
216
  | ForceReply
222
- ] = Nothing,
217
+ | None
218
+ ) = None,
223
219
  **other: typing.Any,
224
- ) -> Result[Message, "APIError"]:
220
+ ) -> Result[Message, APIError]:
225
221
  """Method `sendMessage`, see the [documentation](https://core.telegram.org/bots/api#sendmessage)
226
222
 
227
223
  Use this method to send text messages. On success, the sent Message is returned.
@@ -264,11 +260,11 @@ class APIMethods:
264
260
  chat_id: int | str,
265
261
  from_chat_id: int | str,
266
262
  message_id: int,
267
- message_thread_id: int | Option[int] = Nothing,
268
- disable_notification: bool | Option[bool] = Nothing,
269
- protect_content: bool | Option[bool] = Nothing,
263
+ message_thread_id: int | None = None,
264
+ disable_notification: bool | None = None,
265
+ protect_content: bool | None = None,
270
266
  **other: typing.Any,
271
- ) -> Result[Message, "APIError"]:
267
+ ) -> Result[Message, APIError]:
272
268
  """Method `forwardMessage`, see the [documentation](https://core.telegram.org/bots/api#forwardmessage)
273
269
 
274
270
  Use this method to forward messages of any kind. Service messages and messages
@@ -302,11 +298,11 @@ class APIMethods:
302
298
  chat_id: int | str,
303
299
  from_chat_id: int | str,
304
300
  message_ids: list[int],
305
- message_thread_id: int | Option[int] = Nothing,
306
- disable_notification: bool | Option[bool] = Nothing,
307
- protect_content: bool | Option[bool] = Nothing,
301
+ message_thread_id: int | None = None,
302
+ disable_notification: bool | None = None,
303
+ protect_content: bool | None = None,
308
304
  **other: typing.Any,
309
- ) -> Result[list[MessageId], "APIError"]:
305
+ ) -> Result[list[MessageId], APIError]:
310
306
  """Method `forwardMessages`, see the [documentation](https://core.telegram.org/bots/api#forwardmessages)
311
307
 
312
308
  Use this method to forward multiple messages of any kind. If some of the specified
@@ -345,25 +341,22 @@ class APIMethods:
345
341
  chat_id: int | str,
346
342
  from_chat_id: int | str,
347
343
  message_id: int,
348
- message_thread_id: int | Option[int] = Nothing,
349
- caption: str | Option[str] = Nothing,
350
- parse_mode: str | Option[str] = Nothing,
351
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
352
- disable_notification: bool | Option[bool] = Nothing,
353
- protect_content: bool | Option[bool] = Nothing,
354
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
355
- reply_markup: InlineKeyboardMarkup
356
- | ReplyKeyboardMarkup
357
- | ReplyKeyboardRemove
358
- | ForceReply
359
- | Option[
344
+ message_thread_id: int | None = None,
345
+ caption: str | None = None,
346
+ parse_mode: str | None = None,
347
+ caption_entities: list[MessageEntity] | None = None,
348
+ disable_notification: bool | None = None,
349
+ protect_content: bool | None = None,
350
+ reply_parameters: ReplyParameters | None = None,
351
+ reply_markup: (
360
352
  InlineKeyboardMarkup
361
353
  | ReplyKeyboardMarkup
362
354
  | ReplyKeyboardRemove
363
355
  | ForceReply
364
- ] = Nothing,
356
+ | None
357
+ ) = None,
365
358
  **other: typing.Any,
366
- ) -> Result[MessageId, "APIError"]:
359
+ ) -> Result[MessageId, APIError]:
367
360
  """Method `copyMessage`, see the [documentation](https://core.telegram.org/bots/api#copymessage)
368
361
 
369
362
  Use this method to copy messages of any kind. Service messages, giveaway
@@ -415,12 +408,12 @@ class APIMethods:
415
408
  chat_id: int | str,
416
409
  from_chat_id: int | str,
417
410
  message_ids: list[int],
418
- message_thread_id: int | Option[int] = Nothing,
419
- disable_notification: bool | Option[bool] = Nothing,
420
- protect_content: bool | Option[bool] = Nothing,
421
- remove_caption: bool | Option[bool] = Nothing,
411
+ message_thread_id: int | None = None,
412
+ disable_notification: bool | None = None,
413
+ protect_content: bool | None = None,
414
+ remove_caption: bool | None = None,
422
415
  **other: typing.Any,
423
- ) -> Result[list[MessageId], "APIError"]:
416
+ ) -> Result[list[MessageId], APIError]:
424
417
  """Method `copyMessages`, see the [documentation](https://core.telegram.org/bots/api#copymessages)
425
418
 
426
419
  Use this method to copy messages of any kind. If some of the specified messages
@@ -462,26 +455,23 @@ class APIMethods:
462
455
  self,
463
456
  chat_id: int | str,
464
457
  photo: InputFile | str,
465
- message_thread_id: int | Option[int] = Nothing,
466
- caption: str | Option[str] = Nothing,
467
- parse_mode: str | Option[str] = Nothing,
468
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
469
- has_spoiler: bool | Option[bool] = Nothing,
470
- disable_notification: bool | Option[bool] = Nothing,
471
- protect_content: bool | Option[bool] = Nothing,
472
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
473
- reply_markup: InlineKeyboardMarkup
474
- | ReplyKeyboardMarkup
475
- | ReplyKeyboardRemove
476
- | ForceReply
477
- | Option[
458
+ message_thread_id: int | None = None,
459
+ caption: str | None = None,
460
+ parse_mode: str | None = None,
461
+ caption_entities: list[MessageEntity] | None = None,
462
+ has_spoiler: bool | None = None,
463
+ disable_notification: bool | None = None,
464
+ protect_content: bool | None = None,
465
+ reply_parameters: ReplyParameters | None = None,
466
+ reply_markup: (
478
467
  InlineKeyboardMarkup
479
468
  | ReplyKeyboardMarkup
480
469
  | ReplyKeyboardRemove
481
470
  | ForceReply
482
- ] = Nothing,
471
+ | None
472
+ ) = None,
483
473
  **other: typing.Any,
484
- ) -> Result[Message, "APIError"]:
474
+ ) -> Result[Message, APIError]:
485
475
  """Method `sendPhoto`, see the [documentation](https://core.telegram.org/bots/api#sendphoto)
486
476
 
487
477
  Use this method to send photos. On success, the sent Message is returned.
@@ -531,29 +521,26 @@ class APIMethods:
531
521
  self,
532
522
  chat_id: int | str,
533
523
  audio: InputFile | str,
534
- message_thread_id: int | Option[int] = Nothing,
535
- caption: str | Option[str] = Nothing,
536
- parse_mode: str | Option[str] = Nothing,
537
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
538
- duration: int | Option[int] = Nothing,
539
- performer: str | Option[str] = Nothing,
540
- title: str | Option[str] = Nothing,
541
- thumbnail: InputFile | str | Option[InputFile | str] = Nothing,
542
- disable_notification: bool | Option[bool] = Nothing,
543
- protect_content: bool | Option[bool] = Nothing,
544
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
545
- reply_markup: InlineKeyboardMarkup
546
- | ReplyKeyboardMarkup
547
- | ReplyKeyboardRemove
548
- | ForceReply
549
- | Option[
524
+ message_thread_id: int | None = None,
525
+ caption: str | None = None,
526
+ parse_mode: str | None = None,
527
+ caption_entities: list[MessageEntity] | None = None,
528
+ duration: int | None = None,
529
+ performer: str | None = None,
530
+ title: str | None = None,
531
+ thumbnail: InputFile | str | None = None,
532
+ disable_notification: bool | None = None,
533
+ protect_content: bool | None = None,
534
+ reply_parameters: ReplyParameters | None = None,
535
+ reply_markup: (
550
536
  InlineKeyboardMarkup
551
537
  | ReplyKeyboardMarkup
552
538
  | ReplyKeyboardRemove
553
539
  | ForceReply
554
- ] = Nothing,
540
+ | None
541
+ ) = None,
555
542
  **other: typing.Any,
556
- ) -> Result[Message, "APIError"]:
543
+ ) -> Result[Message, APIError]:
557
544
  """Method `sendAudio`, see the [documentation](https://core.telegram.org/bots/api#sendaudio)
558
545
 
559
546
  Use this method to send audio files, if you want Telegram clients to display
@@ -616,27 +603,24 @@ class APIMethods:
616
603
  self,
617
604
  chat_id: int | str,
618
605
  document: InputFile | str,
619
- message_thread_id: int | Option[int] = Nothing,
620
- thumbnail: InputFile | str | Option[InputFile | str] = Nothing,
621
- caption: str | Option[str] = Nothing,
622
- parse_mode: str | Option[str] = Nothing,
623
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
624
- disable_content_type_detection: bool | Option[bool] = Nothing,
625
- disable_notification: bool | Option[bool] = Nothing,
626
- protect_content: bool | Option[bool] = Nothing,
627
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
628
- reply_markup: InlineKeyboardMarkup
629
- | ReplyKeyboardMarkup
630
- | ReplyKeyboardRemove
631
- | ForceReply
632
- | Option[
606
+ message_thread_id: int | None = None,
607
+ thumbnail: InputFile | str | None = None,
608
+ caption: str | None = None,
609
+ parse_mode: str | None = None,
610
+ caption_entities: list[MessageEntity] | None = None,
611
+ disable_content_type_detection: bool | None = None,
612
+ disable_notification: bool | None = None,
613
+ protect_content: bool | None = None,
614
+ reply_parameters: ReplyParameters | None = None,
615
+ reply_markup: (
633
616
  InlineKeyboardMarkup
634
617
  | ReplyKeyboardMarkup
635
618
  | ReplyKeyboardRemove
636
619
  | ForceReply
637
- ] = Nothing,
620
+ | None
621
+ ) = None,
638
622
  **other: typing.Any,
639
- ) -> Result[Message, "APIError"]:
623
+ ) -> Result[Message, APIError]:
640
624
  """Method `sendDocument`, see the [documentation](https://core.telegram.org/bots/api#senddocument)
641
625
 
642
626
  Use this method to send general files. On success, the sent Message is returned.
@@ -695,31 +679,28 @@ class APIMethods:
695
679
  self,
696
680
  chat_id: int | str,
697
681
  video: InputFile | str,
698
- message_thread_id: int | Option[int] = Nothing,
699
- duration: int | Option[int] = Nothing,
700
- width: int | Option[int] = Nothing,
701
- height: int | Option[int] = Nothing,
702
- thumbnail: InputFile | str | Option[InputFile | str] = Nothing,
703
- caption: str | Option[str] = Nothing,
704
- parse_mode: str | Option[str] = Nothing,
705
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
706
- has_spoiler: bool | Option[bool] = Nothing,
707
- supports_streaming: bool | Option[bool] = Nothing,
708
- disable_notification: bool | Option[bool] = Nothing,
709
- protect_content: bool | Option[bool] = Nothing,
710
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
711
- reply_markup: InlineKeyboardMarkup
712
- | ReplyKeyboardMarkup
713
- | ReplyKeyboardRemove
714
- | ForceReply
715
- | Option[
682
+ message_thread_id: int | None = None,
683
+ duration: int | None = None,
684
+ width: int | None = None,
685
+ height: int | None = None,
686
+ thumbnail: InputFile | str | None = None,
687
+ caption: str | None = None,
688
+ parse_mode: str | None = None,
689
+ caption_entities: list[MessageEntity] | None = None,
690
+ has_spoiler: bool | None = None,
691
+ supports_streaming: bool | None = None,
692
+ disable_notification: bool | None = None,
693
+ protect_content: bool | None = None,
694
+ reply_parameters: ReplyParameters | None = None,
695
+ reply_markup: (
716
696
  InlineKeyboardMarkup
717
697
  | ReplyKeyboardMarkup
718
698
  | ReplyKeyboardRemove
719
699
  | ForceReply
720
- ] = Nothing,
700
+ | None
701
+ ) = None,
721
702
  **other: typing.Any,
722
- ) -> Result[Message, "APIError"]:
703
+ ) -> Result[Message, APIError]:
723
704
  """Method `sendVideo`, see the [documentation](https://core.telegram.org/bots/api#sendvideo)
724
705
 
725
706
  Use this method to send video files, Telegram clients support MPEG4 videos
@@ -786,30 +767,27 @@ class APIMethods:
786
767
  self,
787
768
  chat_id: int | str,
788
769
  animation: InputFile | str,
789
- message_thread_id: int | Option[int] = Nothing,
790
- duration: int | Option[int] = Nothing,
791
- width: int | Option[int] = Nothing,
792
- height: int | Option[int] = Nothing,
793
- thumbnail: InputFile | str | Option[InputFile | str] = Nothing,
794
- caption: str | Option[str] = Nothing,
795
- parse_mode: str | Option[str] = Nothing,
796
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
797
- has_spoiler: bool | Option[bool] = Nothing,
798
- disable_notification: bool | Option[bool] = Nothing,
799
- protect_content: bool | Option[bool] = Nothing,
800
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
801
- reply_markup: InlineKeyboardMarkup
802
- | ReplyKeyboardMarkup
803
- | ReplyKeyboardRemove
804
- | ForceReply
805
- | Option[
770
+ message_thread_id: int | None = None,
771
+ duration: int | None = None,
772
+ width: int | None = None,
773
+ height: int | None = None,
774
+ thumbnail: InputFile | str | None = None,
775
+ caption: str | None = None,
776
+ parse_mode: str | None = None,
777
+ caption_entities: list[MessageEntity] | None = None,
778
+ has_spoiler: bool | None = None,
779
+ disable_notification: bool | None = None,
780
+ protect_content: bool | None = None,
781
+ reply_parameters: ReplyParameters | None = None,
782
+ reply_markup: (
806
783
  InlineKeyboardMarkup
807
784
  | ReplyKeyboardMarkup
808
785
  | ReplyKeyboardRemove
809
786
  | ForceReply
810
- ] = Nothing,
787
+ | None
788
+ ) = None,
811
789
  **other: typing.Any,
812
- ) -> Result[Message, "APIError"]:
790
+ ) -> Result[Message, APIError]:
813
791
  """Method `sendAnimation`, see the [documentation](https://core.telegram.org/bots/api#sendanimation)
814
792
 
815
793
  Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without
@@ -873,26 +851,23 @@ class APIMethods:
873
851
  self,
874
852
  chat_id: int | str,
875
853
  voice: InputFile | str,
876
- message_thread_id: int | Option[int] = Nothing,
877
- caption: str | Option[str] = Nothing,
878
- parse_mode: str | Option[str] = Nothing,
879
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
880
- duration: int | Option[int] = Nothing,
881
- disable_notification: bool | Option[bool] = Nothing,
882
- protect_content: bool | Option[bool] = Nothing,
883
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
884
- reply_markup: InlineKeyboardMarkup
885
- | ReplyKeyboardMarkup
886
- | ReplyKeyboardRemove
887
- | ForceReply
888
- | Option[
854
+ message_thread_id: int | None = None,
855
+ caption: str | None = None,
856
+ parse_mode: str | None = None,
857
+ caption_entities: list[MessageEntity] | None = None,
858
+ duration: int | None = None,
859
+ disable_notification: bool | None = None,
860
+ protect_content: bool | None = None,
861
+ reply_parameters: ReplyParameters | None = None,
862
+ reply_markup: (
889
863
  InlineKeyboardMarkup
890
864
  | ReplyKeyboardMarkup
891
865
  | ReplyKeyboardRemove
892
866
  | ForceReply
893
- ] = Nothing,
867
+ | None
868
+ ) = None,
894
869
  **other: typing.Any,
895
- ) -> Result[Message, "APIError"]:
870
+ ) -> Result[Message, APIError]:
896
871
  """Method `sendVoice`, see the [documentation](https://core.telegram.org/bots/api#sendvoice)
897
872
 
898
873
  Use this method to send audio files, if you want Telegram clients to display
@@ -943,25 +918,22 @@ class APIMethods:
943
918
  self,
944
919
  chat_id: int | str,
945
920
  video_note: InputFile | str,
946
- message_thread_id: int | Option[int] = Nothing,
947
- duration: int | Option[int] = Nothing,
948
- length: int | Option[int] = Nothing,
949
- thumbnail: InputFile | str | Option[InputFile | str] = Nothing,
950
- disable_notification: bool | Option[bool] = Nothing,
951
- protect_content: bool | Option[bool] = Nothing,
952
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
953
- reply_markup: InlineKeyboardMarkup
954
- | ReplyKeyboardMarkup
955
- | ReplyKeyboardRemove
956
- | ForceReply
957
- | Option[
921
+ message_thread_id: int | None = None,
922
+ duration: int | None = None,
923
+ length: int | None = None,
924
+ thumbnail: InputFile | str | None = None,
925
+ disable_notification: bool | None = None,
926
+ protect_content: bool | None = None,
927
+ reply_parameters: ReplyParameters | None = None,
928
+ reply_markup: (
958
929
  InlineKeyboardMarkup
959
930
  | ReplyKeyboardMarkup
960
931
  | ReplyKeyboardRemove
961
932
  | ForceReply
962
- ] = Nothing,
933
+ | None
934
+ ) = None,
963
935
  **other: typing.Any,
964
- ) -> Result[Message, "APIError"]:
936
+ ) -> Result[Message, APIError]:
965
937
  """Method `sendVideoNote`, see the [documentation](https://core.telegram.org/bots/api#sendvideonote)
966
938
 
967
939
  As of v.4.0, Telegram clients support rounded square MPEG4 videos of up
@@ -1014,12 +986,12 @@ class APIMethods:
1014
986
  media: list[
1015
987
  InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo
1016
988
  ],
1017
- message_thread_id: int | Option[int] = Nothing,
1018
- disable_notification: bool | Option[bool] = Nothing,
1019
- protect_content: bool | Option[bool] = Nothing,
1020
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
989
+ message_thread_id: int | None = None,
990
+ disable_notification: bool | None = None,
991
+ protect_content: bool | None = None,
992
+ reply_parameters: ReplyParameters | None = None,
1021
993
  **other: typing.Any,
1022
- ) -> Result[list[Message], "APIError"]:
994
+ ) -> Result[list[Message], APIError]:
1023
995
  """Method `sendMediaGroup`, see the [documentation](https://core.telegram.org/bots/api#sendmediagroup)
1024
996
 
1025
997
  Use this method to send a group of photos, videos, documents or audios as
@@ -1053,26 +1025,23 @@ class APIMethods:
1053
1025
  chat_id: int | str,
1054
1026
  latitude: float,
1055
1027
  longitude: float,
1056
- message_thread_id: int | Option[int] = Nothing,
1057
- horizontal_accuracy: float | Option[float] = Nothing,
1058
- live_period: int | Option[int] = Nothing,
1059
- heading: int | Option[int] = Nothing,
1060
- proximity_alert_radius: int | Option[int] = Nothing,
1061
- disable_notification: bool | Option[bool] = Nothing,
1062
- protect_content: bool | Option[bool] = Nothing,
1063
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
1064
- reply_markup: InlineKeyboardMarkup
1065
- | ReplyKeyboardMarkup
1066
- | ReplyKeyboardRemove
1067
- | ForceReply
1068
- | Option[
1028
+ message_thread_id: int | None = None,
1029
+ horizontal_accuracy: float | None = None,
1030
+ live_period: int | None = None,
1031
+ heading: int | None = None,
1032
+ proximity_alert_radius: int | None = None,
1033
+ disable_notification: bool | None = None,
1034
+ protect_content: bool | None = None,
1035
+ reply_parameters: ReplyParameters | None = None,
1036
+ reply_markup: (
1069
1037
  InlineKeyboardMarkup
1070
1038
  | ReplyKeyboardMarkup
1071
1039
  | ReplyKeyboardRemove
1072
1040
  | ForceReply
1073
- ] = Nothing,
1041
+ | None
1042
+ ) = None,
1074
1043
  **other: typing.Any,
1075
- ) -> Result[Message, "APIError"]:
1044
+ ) -> Result[Message, APIError]:
1076
1045
  """Method `sendLocation`, see the [documentation](https://core.telegram.org/bots/api#sendlocation)
1077
1046
 
1078
1047
  Use this method to send point on the map. On success, the sent Message is returned.
@@ -1122,26 +1091,23 @@ class APIMethods:
1122
1091
  longitude: float,
1123
1092
  title: str,
1124
1093
  address: str,
1125
- message_thread_id: int | Option[int] = Nothing,
1126
- foursquare_id: str | Option[str] = Nothing,
1127
- foursquare_type: str | Option[str] = Nothing,
1128
- google_place_id: str | Option[str] = Nothing,
1129
- google_place_type: str | Option[str] = Nothing,
1130
- disable_notification: bool | Option[bool] = Nothing,
1131
- protect_content: bool | Option[bool] = Nothing,
1132
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
1133
- reply_markup: InlineKeyboardMarkup
1134
- | ReplyKeyboardMarkup
1135
- | ReplyKeyboardRemove
1136
- | ForceReply
1137
- | Option[
1094
+ message_thread_id: int | None = None,
1095
+ foursquare_id: str | None = None,
1096
+ foursquare_type: str | None = None,
1097
+ google_place_id: str | None = None,
1098
+ google_place_type: str | None = None,
1099
+ disable_notification: bool | None = None,
1100
+ protect_content: bool | None = None,
1101
+ reply_parameters: ReplyParameters | None = None,
1102
+ reply_markup: (
1138
1103
  InlineKeyboardMarkup
1139
1104
  | ReplyKeyboardMarkup
1140
1105
  | ReplyKeyboardRemove
1141
1106
  | ForceReply
1142
- ] = Nothing,
1107
+ | None
1108
+ ) = None,
1143
1109
  **other: typing.Any,
1144
- ) -> Result[Message, "APIError"]:
1110
+ ) -> Result[Message, APIError]:
1145
1111
  """Method `sendVenue`, see the [documentation](https://core.telegram.org/bots/api#sendvenue)
1146
1112
 
1147
1113
  Use this method to send information about a venue. On success, the sent Message
@@ -1192,24 +1158,21 @@ class APIMethods:
1192
1158
  chat_id: int | str,
1193
1159
  phone_number: str,
1194
1160
  first_name: str,
1195
- message_thread_id: int | Option[int] = Nothing,
1196
- last_name: str | Option[str] = Nothing,
1197
- vcard: str | Option[str] = Nothing,
1198
- disable_notification: bool | Option[bool] = Nothing,
1199
- protect_content: bool | Option[bool] = Nothing,
1200
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
1201
- reply_markup: InlineKeyboardMarkup
1202
- | ReplyKeyboardMarkup
1203
- | ReplyKeyboardRemove
1204
- | ForceReply
1205
- | Option[
1161
+ message_thread_id: int | None = None,
1162
+ last_name: str | None = None,
1163
+ vcard: str | None = None,
1164
+ disable_notification: bool | None = None,
1165
+ protect_content: bool | None = None,
1166
+ reply_parameters: ReplyParameters | None = None,
1167
+ reply_markup: (
1206
1168
  InlineKeyboardMarkup
1207
1169
  | ReplyKeyboardMarkup
1208
1170
  | ReplyKeyboardRemove
1209
1171
  | ForceReply
1210
- ] = Nothing,
1172
+ | None
1173
+ ) = None,
1211
1174
  **other: typing.Any,
1212
- ) -> Result[Message, "APIError"]:
1175
+ ) -> Result[Message, APIError]:
1213
1176
  """Method `sendContact`, see the [documentation](https://core.telegram.org/bots/api#sendcontact)
1214
1177
 
1215
1178
  Use this method to send phone contacts. On success, the sent Message is returned.
@@ -1250,34 +1213,29 @@ class APIMethods:
1250
1213
  chat_id: int | str,
1251
1214
  question: str,
1252
1215
  options: list[str],
1253
- message_thread_id: int | Option[int] = Nothing,
1254
- is_anonymous: bool | Option[bool] = Nothing,
1255
- type: typing.Literal["quiz", "regular"]
1256
- | Option[typing.Literal["quiz", "regular"]] = Nothing,
1257
- allows_multiple_answers: bool | Option[bool] = Nothing,
1258
- correct_option_id: int | Option[int] = Nothing,
1259
- explanation: str | Option[str] = Nothing,
1260
- explanation_parse_mode: str | Option[str] = Nothing,
1261
- explanation_entities: list[MessageEntity]
1262
- | Option[list[MessageEntity]] = Nothing,
1263
- open_period: int | Option[int] = Nothing,
1264
- close_date: datetime | int | Option[datetime | int] = Nothing,
1265
- is_closed: bool | Option[bool] = Nothing,
1266
- disable_notification: bool | Option[bool] = Nothing,
1267
- protect_content: bool | Option[bool] = Nothing,
1268
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
1269
- reply_markup: InlineKeyboardMarkup
1270
- | ReplyKeyboardMarkup
1271
- | ReplyKeyboardRemove
1272
- | ForceReply
1273
- | Option[
1216
+ message_thread_id: int | None = None,
1217
+ is_anonymous: bool | None = None,
1218
+ type: typing.Literal["quiz", "regular"] | None = None,
1219
+ allows_multiple_answers: bool | None = None,
1220
+ correct_option_id: int | None = None,
1221
+ explanation: str | None = None,
1222
+ explanation_parse_mode: str | None = None,
1223
+ explanation_entities: list[MessageEntity] | None = None,
1224
+ open_period: int | None = None,
1225
+ close_date: datetime | int | None = None,
1226
+ is_closed: bool | None = None,
1227
+ disable_notification: bool | None = None,
1228
+ protect_content: bool | None = None,
1229
+ reply_parameters: ReplyParameters | None = None,
1230
+ reply_markup: (
1274
1231
  InlineKeyboardMarkup
1275
1232
  | ReplyKeyboardMarkup
1276
1233
  | ReplyKeyboardRemove
1277
1234
  | ForceReply
1278
- ] = Nothing,
1235
+ | None
1236
+ ) = None,
1279
1237
  **other: typing.Any,
1280
- ) -> Result[Message, "APIError"]:
1238
+ ) -> Result[Message, APIError]:
1281
1239
  """Method `sendPoll`, see the [documentation](https://core.telegram.org/bots/api#sendpoll)
1282
1240
 
1283
1241
  Use this method to send a native poll. On success, the sent Message is returned.
@@ -1343,23 +1301,20 @@ class APIMethods:
1343
1301
  async def send_dice(
1344
1302
  self,
1345
1303
  chat_id: int | str,
1346
- message_thread_id: int | Option[int] = Nothing,
1347
- emoji: DiceEmoji | Option[DiceEmoji] = Nothing,
1348
- disable_notification: bool | Option[bool] = Nothing,
1349
- protect_content: bool | Option[bool] = Nothing,
1350
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
1351
- reply_markup: InlineKeyboardMarkup
1352
- | ReplyKeyboardMarkup
1353
- | ReplyKeyboardRemove
1354
- | ForceReply
1355
- | Option[
1304
+ message_thread_id: int | None = None,
1305
+ emoji: DiceEmoji | None = None,
1306
+ disable_notification: bool | None = None,
1307
+ protect_content: bool | None = None,
1308
+ reply_parameters: ReplyParameters | None = None,
1309
+ reply_markup: (
1356
1310
  InlineKeyboardMarkup
1357
1311
  | ReplyKeyboardMarkup
1358
1312
  | ReplyKeyboardRemove
1359
1313
  | ForceReply
1360
- ] = Nothing,
1314
+ | None
1315
+ ) = None,
1361
1316
  **other: typing.Any,
1362
- ) -> Result[Message, "APIError"]:
1317
+ ) -> Result[Message, APIError]:
1363
1318
  """Method `sendDice`, see the [documentation](https://core.telegram.org/bots/api#senddice)
1364
1319
 
1365
1320
  Use this method to send an animated emoji that will display a random value.
@@ -1396,9 +1351,9 @@ class APIMethods:
1396
1351
  self,
1397
1352
  chat_id: int | str,
1398
1353
  action: ChatAction,
1399
- message_thread_id: int | Option[int] = Nothing,
1354
+ message_thread_id: int | None = None,
1400
1355
  **other: typing.Any,
1401
- ) -> Result[bool, "APIError"]:
1356
+ ) -> Result[bool, APIError]:
1402
1357
  """Method `sendChatAction`, see the [documentation](https://core.telegram.org/bots/api#sendchataction)
1403
1358
 
1404
1359
  Use this method when you need to tell the user that something is happening
@@ -1430,10 +1385,10 @@ class APIMethods:
1430
1385
  self,
1431
1386
  chat_id: int | str,
1432
1387
  message_id: int,
1433
- reaction: list[ReactionType] | Option[list[ReactionType]] = Nothing,
1434
- is_big: bool | Option[bool] = Nothing,
1388
+ reaction: list[ReactionType] | None = None,
1389
+ is_big: bool | None = None,
1435
1390
  **other: typing.Any,
1436
- ) -> Result[bool, "APIError"]:
1391
+ ) -> Result[bool, APIError]:
1437
1392
  """Method `setMessageReaction`, see the [documentation](https://core.telegram.org/bots/api#setmessagereaction)
1438
1393
 
1439
1394
  Use this method to change the chosen reactions on a message. Service messages
@@ -1464,10 +1419,10 @@ class APIMethods:
1464
1419
  async def get_user_profile_photos(
1465
1420
  self,
1466
1421
  user_id: int,
1467
- offset: int | Option[int] = Nothing,
1468
- limit: int | Option[int] = Nothing,
1422
+ offset: int | None = None,
1423
+ limit: int | None = None,
1469
1424
  **other: typing.Any,
1470
- ) -> Result[UserProfilePhotos, "APIError"]:
1425
+ ) -> Result[UserProfilePhotos, APIError]:
1471
1426
  """Method `getUserProfilePhotos`, see the [documentation](https://core.telegram.org/bots/api#getuserprofilephotos)
1472
1427
 
1473
1428
  Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos
@@ -1492,7 +1447,7 @@ class APIMethods:
1492
1447
  self,
1493
1448
  file_id: str,
1494
1449
  **other: typing.Any,
1495
- ) -> Result[File, "APIError"]:
1450
+ ) -> Result[File, APIError]:
1496
1451
  """Method `getFile`, see the [documentation](https://core.telegram.org/bots/api#getfile)
1497
1452
 
1498
1453
  Use this method to get basic information about a file and prepare it for downloading.
@@ -1517,10 +1472,10 @@ class APIMethods:
1517
1472
  self,
1518
1473
  chat_id: int | str,
1519
1474
  user_id: int,
1520
- until_date: datetime | int | Option[datetime | int] = Nothing,
1521
- revoke_messages: bool | Option[bool] = Nothing,
1475
+ until_date: datetime | int | None = None,
1476
+ revoke_messages: bool | None = None,
1522
1477
  **other: typing.Any,
1523
- ) -> Result[bool, "APIError"]:
1478
+ ) -> Result[bool, APIError]:
1524
1479
  """Method `banChatMember`, see the [documentation](https://core.telegram.org/bots/api#banchatmember)
1525
1480
 
1526
1481
  Use this method to ban a user in a group, a supergroup or a channel. In the case
@@ -1553,9 +1508,9 @@ class APIMethods:
1553
1508
  self,
1554
1509
  chat_id: int | str,
1555
1510
  user_id: int,
1556
- only_if_banned: bool | Option[bool] = Nothing,
1511
+ only_if_banned: bool | None = None,
1557
1512
  **other: typing.Any,
1558
- ) -> Result[bool, "APIError"]:
1513
+ ) -> Result[bool, APIError]:
1559
1514
  """Method `unbanChatMember`, see the [documentation](https://core.telegram.org/bots/api#unbanchatmember)
1560
1515
 
1561
1516
  Use this method to unban a previously banned user in a supergroup or channel.
@@ -1585,10 +1540,10 @@ class APIMethods:
1585
1540
  chat_id: int | str,
1586
1541
  user_id: int,
1587
1542
  permissions: ChatPermissions,
1588
- use_independent_chat_permissions: bool | Option[bool] = Nothing,
1589
- until_date: datetime | int | Option[datetime | int] = Nothing,
1543
+ use_independent_chat_permissions: bool | None = None,
1544
+ until_date: datetime | int | None = None,
1590
1545
  **other: typing.Any,
1591
- ) -> Result[bool, "APIError"]:
1546
+ ) -> Result[bool, APIError]:
1592
1547
  """Method `restrictChatMember`, see the [documentation](https://core.telegram.org/bots/api#restrictchatmember)
1593
1548
 
1594
1549
  Use this method to restrict a user in a supergroup. The bot must be an administrator
@@ -1624,23 +1579,23 @@ class APIMethods:
1624
1579
  self,
1625
1580
  chat_id: int | str,
1626
1581
  user_id: int,
1627
- is_anonymous: bool | Option[bool] = Nothing,
1628
- can_manage_chat: bool | Option[bool] = Nothing,
1629
- can_delete_messages: bool | Option[bool] = Nothing,
1630
- can_manage_video_chats: bool | Option[bool] = Nothing,
1631
- can_restrict_members: bool | Option[bool] = Nothing,
1632
- can_promote_members: bool | Option[bool] = Nothing,
1633
- can_change_info: bool | Option[bool] = Nothing,
1634
- can_invite_users: bool | Option[bool] = Nothing,
1635
- can_post_stories: bool | Option[bool] = Nothing,
1636
- can_edit_stories: bool | Option[bool] = Nothing,
1637
- can_delete_stories: bool | Option[bool] = Nothing,
1638
- can_post_messages: bool | Option[bool] = Nothing,
1639
- can_edit_messages: bool | Option[bool] = Nothing,
1640
- can_pin_messages: bool | Option[bool] = Nothing,
1641
- can_manage_topics: bool | Option[bool] = Nothing,
1582
+ is_anonymous: bool | None = None,
1583
+ can_manage_chat: bool | None = None,
1584
+ can_delete_messages: bool | None = None,
1585
+ can_manage_video_chats: bool | None = None,
1586
+ can_restrict_members: bool | None = None,
1587
+ can_promote_members: bool | None = None,
1588
+ can_change_info: bool | None = None,
1589
+ can_invite_users: bool | None = None,
1590
+ can_post_stories: bool | None = None,
1591
+ can_edit_stories: bool | None = None,
1592
+ can_delete_stories: bool | None = None,
1593
+ can_post_messages: bool | None = None,
1594
+ can_edit_messages: bool | None = None,
1595
+ can_pin_messages: bool | None = None,
1596
+ can_manage_topics: bool | None = None,
1642
1597
  **other: typing.Any,
1643
- ) -> Result[bool, "APIError"]:
1598
+ ) -> Result[bool, APIError]:
1644
1599
  """Method `promoteChatMember`, see the [documentation](https://core.telegram.org/bots/api#promotechatmember)
1645
1600
 
1646
1601
  Use this method to promote or demote a user in a supergroup or a channel. The
@@ -1705,7 +1660,7 @@ class APIMethods:
1705
1660
  user_id: int,
1706
1661
  custom_title: str,
1707
1662
  **other: typing.Any,
1708
- ) -> Result[bool, "APIError"]:
1663
+ ) -> Result[bool, APIError]:
1709
1664
  """Method `setChatAdministratorCustomTitle`, see the [documentation](https://core.telegram.org/bots/api#setchatadministratorcustomtitle)
1710
1665
 
1711
1666
  Use this method to set a custom title for an administrator in a supergroup
@@ -1731,7 +1686,7 @@ class APIMethods:
1731
1686
  chat_id: int | str,
1732
1687
  sender_chat_id: int,
1733
1688
  **other: typing.Any,
1734
- ) -> Result[bool, "APIError"]:
1689
+ ) -> Result[bool, APIError]:
1735
1690
  """Method `banChatSenderChat`, see the [documentation](https://core.telegram.org/bots/api#banchatsenderchat)
1736
1691
 
1737
1692
  Use this method to ban a channel chat in a supergroup or a channel. Until the
@@ -1757,7 +1712,7 @@ class APIMethods:
1757
1712
  chat_id: int | str,
1758
1713
  sender_chat_id: int,
1759
1714
  **other: typing.Any,
1760
- ) -> Result[bool, "APIError"]:
1715
+ ) -> Result[bool, APIError]:
1761
1716
  """Method `unbanChatSenderChat`, see the [documentation](https://core.telegram.org/bots/api#unbanchatsenderchat)
1762
1717
 
1763
1718
  Use this method to unban a previously banned channel chat in a supergroup
@@ -1780,9 +1735,9 @@ class APIMethods:
1780
1735
  self,
1781
1736
  chat_id: int | str,
1782
1737
  permissions: ChatPermissions,
1783
- use_independent_chat_permissions: bool | Option[bool] = Nothing,
1738
+ use_independent_chat_permissions: bool | None = None,
1784
1739
  **other: typing.Any,
1785
- ) -> Result[bool, "APIError"]:
1740
+ ) -> Result[bool, APIError]:
1786
1741
  """Method `setChatPermissions`, see the [documentation](https://core.telegram.org/bots/api#setchatpermissions)
1787
1742
 
1788
1743
  Use this method to set default chat permissions for all members. The bot
@@ -1812,7 +1767,7 @@ class APIMethods:
1812
1767
  self,
1813
1768
  chat_id: int | str,
1814
1769
  **other: typing.Any,
1815
- ) -> Result[str, "APIError"]:
1770
+ ) -> Result[str, APIError]:
1816
1771
  """Method `exportChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#exportchatinvitelink)
1817
1772
 
1818
1773
  Use this method to generate a new primary invite link for a chat; any previously
@@ -1833,12 +1788,12 @@ class APIMethods:
1833
1788
  async def create_chat_invite_link(
1834
1789
  self,
1835
1790
  chat_id: int | str,
1836
- name: str | Option[str] = Nothing,
1837
- expire_date: datetime | int | Option[datetime | int] = Nothing,
1838
- member_limit: int | Option[int] = Nothing,
1839
- creates_join_request: bool | Option[bool] = Nothing,
1791
+ name: str | None = None,
1792
+ expire_date: datetime | int | None = None,
1793
+ member_limit: int | None = None,
1794
+ creates_join_request: bool | None = None,
1840
1795
  **other: typing.Any,
1841
- ) -> Result[ChatInviteLink, "APIError"]:
1796
+ ) -> Result[ChatInviteLink, APIError]:
1842
1797
  """Method `createChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#createchatinvitelink)
1843
1798
 
1844
1799
  Use this method to create an additional invite link for a chat. The bot must
@@ -1870,12 +1825,12 @@ class APIMethods:
1870
1825
  self,
1871
1826
  chat_id: int | str,
1872
1827
  invite_link: str,
1873
- name: str | Option[str] = Nothing,
1874
- expire_date: datetime | int | Option[datetime | int] = Nothing,
1875
- member_limit: int | Option[int] = Nothing,
1876
- creates_join_request: bool | Option[bool] = Nothing,
1828
+ name: str | None = None,
1829
+ expire_date: datetime | int | None = None,
1830
+ member_limit: int | None = None,
1831
+ creates_join_request: bool | None = None,
1877
1832
  **other: typing.Any,
1878
- ) -> Result[ChatInviteLink, "APIError"]:
1833
+ ) -> Result[ChatInviteLink, APIError]:
1879
1834
  """Method `editChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#editchatinvitelink)
1880
1835
 
1881
1836
  Use this method to edit a non-primary invite link created by the bot. The
@@ -1910,7 +1865,7 @@ class APIMethods:
1910
1865
  chat_id: int | str,
1911
1866
  invite_link: str,
1912
1867
  **other: typing.Any,
1913
- ) -> Result[ChatInviteLink, "APIError"]:
1868
+ ) -> Result[ChatInviteLink, APIError]:
1914
1869
  """Method `revokeChatInviteLink`, see the [documentation](https://core.telegram.org/bots/api#revokechatinvitelink)
1915
1870
 
1916
1871
  Use this method to revoke an invite link created by the bot. If the primary
@@ -1936,7 +1891,7 @@ class APIMethods:
1936
1891
  chat_id: int | str,
1937
1892
  user_id: int,
1938
1893
  **other: typing.Any,
1939
- ) -> Result[bool, "APIError"]:
1894
+ ) -> Result[bool, APIError]:
1940
1895
  """Method `approveChatJoinRequest`, see the [documentation](https://core.telegram.org/bots/api#approvechatjoinrequest)
1941
1896
 
1942
1897
  Use this method to approve a chat join request. The bot must be an administrator
@@ -1960,7 +1915,7 @@ class APIMethods:
1960
1915
  chat_id: int | str,
1961
1916
  user_id: int,
1962
1917
  **other: typing.Any,
1963
- ) -> Result[bool, "APIError"]:
1918
+ ) -> Result[bool, APIError]:
1964
1919
  """Method `declineChatJoinRequest`, see the [documentation](https://core.telegram.org/bots/api#declinechatjoinrequest)
1965
1920
 
1966
1921
  Use this method to decline a chat join request. The bot must be an administrator
@@ -1984,7 +1939,7 @@ class APIMethods:
1984
1939
  chat_id: int | str,
1985
1940
  photo: InputFile,
1986
1941
  **other: typing.Any,
1987
- ) -> Result[bool, "APIError"]:
1942
+ ) -> Result[bool, APIError]:
1988
1943
  """Method `setChatPhoto`, see the [documentation](https://core.telegram.org/bots/api#setchatphoto)
1989
1944
 
1990
1945
  Use this method to set a new profile photo for the chat. Photos can't be changed
@@ -2008,7 +1963,7 @@ class APIMethods:
2008
1963
  self,
2009
1964
  chat_id: int | str,
2010
1965
  **other: typing.Any,
2011
- ) -> Result[bool, "APIError"]:
1966
+ ) -> Result[bool, APIError]:
2012
1967
  """Method `deleteChatPhoto`, see the [documentation](https://core.telegram.org/bots/api#deletechatphoto)
2013
1968
 
2014
1969
  Use this method to delete a chat photo. Photos can't be changed for private
@@ -2030,7 +1985,7 @@ class APIMethods:
2030
1985
  chat_id: int | str,
2031
1986
  title: str,
2032
1987
  **other: typing.Any,
2033
- ) -> Result[bool, "APIError"]:
1988
+ ) -> Result[bool, APIError]:
2034
1989
  """Method `setChatTitle`, see the [documentation](https://core.telegram.org/bots/api#setchattitle)
2035
1990
 
2036
1991
  Use this method to change the title of a chat. Titles can't be changed for
@@ -2052,9 +2007,9 @@ class APIMethods:
2052
2007
  async def set_chat_description(
2053
2008
  self,
2054
2009
  chat_id: int | str,
2055
- description: str | Option[str] = Nothing,
2010
+ description: str | None = None,
2056
2011
  **other: typing.Any,
2057
- ) -> Result[bool, "APIError"]:
2012
+ ) -> Result[bool, APIError]:
2058
2013
  """Method `setChatDescription`, see the [documentation](https://core.telegram.org/bots/api#setchatdescription)
2059
2014
 
2060
2015
  Use this method to change the description of a group, a supergroup or a channel.
@@ -2077,9 +2032,9 @@ class APIMethods:
2077
2032
  self,
2078
2033
  chat_id: int | str,
2079
2034
  message_id: int,
2080
- disable_notification: bool | Option[bool] = Nothing,
2035
+ disable_notification: bool | None = None,
2081
2036
  **other: typing.Any,
2082
- ) -> Result[bool, "APIError"]:
2037
+ ) -> Result[bool, APIError]:
2083
2038
  """Method `pinChatMessage`, see the [documentation](https://core.telegram.org/bots/api#pinchatmessage)
2084
2039
 
2085
2040
  Use this method to add a message to the list of pinned messages in a chat. If
@@ -2107,9 +2062,9 @@ class APIMethods:
2107
2062
  async def unpin_chat_message(
2108
2063
  self,
2109
2064
  chat_id: int | str,
2110
- message_id: int | Option[int] = Nothing,
2065
+ message_id: int | None = None,
2111
2066
  **other: typing.Any,
2112
- ) -> Result[bool, "APIError"]:
2067
+ ) -> Result[bool, APIError]:
2113
2068
  """Method `unpinChatMessage`, see the [documentation](https://core.telegram.org/bots/api#unpinchatmessage)
2114
2069
 
2115
2070
  Use this method to remove a message from the list of pinned messages in a chat.
@@ -2135,7 +2090,7 @@ class APIMethods:
2135
2090
  self,
2136
2091
  chat_id: int | str,
2137
2092
  **other: typing.Any,
2138
- ) -> Result[bool, "APIError"]:
2093
+ ) -> Result[bool, APIError]:
2139
2094
  """Method `unpinAllChatMessages`, see the [documentation](https://core.telegram.org/bots/api#unpinallchatmessages)
2140
2095
 
2141
2096
  Use this method to clear the list of pinned messages in a chat. If the chat
@@ -2158,7 +2113,7 @@ class APIMethods:
2158
2113
  self,
2159
2114
  chat_id: int | str,
2160
2115
  **other: typing.Any,
2161
- ) -> Result[bool, "APIError"]:
2116
+ ) -> Result[bool, APIError]:
2162
2117
  """Method `leaveChat`, see the [documentation](https://core.telegram.org/bots/api#leavechat)
2163
2118
 
2164
2119
  Use this method for your bot to leave a group, supergroup or channel. Returns
@@ -2178,7 +2133,7 @@ class APIMethods:
2178
2133
  self,
2179
2134
  chat_id: int | str,
2180
2135
  **other: typing.Any,
2181
- ) -> Result[Chat, "APIError"]:
2136
+ ) -> Result[Chat, APIError]:
2182
2137
  """Method `getChat`, see the [documentation](https://core.telegram.org/bots/api#getchat)
2183
2138
 
2184
2139
  Use this method to get up to date information about the chat. Returns a Chat
@@ -2209,7 +2164,7 @@ class APIMethods:
2209
2164
  ChatMemberBanned,
2210
2165
  ]
2211
2166
  ],
2212
- "APIError",
2167
+ APIError,
2213
2168
  ]:
2214
2169
  """Method `getChatAdministrators`, see the [documentation](https://core.telegram.org/bots/api#getchatadministrators)
2215
2170
 
@@ -2242,7 +2197,7 @@ class APIMethods:
2242
2197
  self,
2243
2198
  chat_id: int | str,
2244
2199
  **other: typing.Any,
2245
- ) -> Result[int, "APIError"]:
2200
+ ) -> Result[int, APIError]:
2246
2201
  """Method `getChatMemberCount`, see the [documentation](https://core.telegram.org/bots/api#getchatmembercount)
2247
2202
 
2248
2203
  Use this method to get the number of members in a chat. Returns Int on success.
@@ -2271,7 +2226,7 @@ class APIMethods:
2271
2226
  ChatMemberLeft,
2272
2227
  ChatMemberBanned,
2273
2228
  ],
2274
- "APIError",
2229
+ APIError,
2275
2230
  ]:
2276
2231
  """Method `getChatMember`, see the [documentation](https://core.telegram.org/bots/api#getchatmember)
2277
2232
 
@@ -2306,7 +2261,7 @@ class APIMethods:
2306
2261
  chat_id: int | str,
2307
2262
  sticker_set_name: str,
2308
2263
  **other: typing.Any,
2309
- ) -> Result[bool, "APIError"]:
2264
+ ) -> Result[bool, APIError]:
2310
2265
  """Method `setChatStickerSet`, see the [documentation](https://core.telegram.org/bots/api#setchatstickerset)
2311
2266
 
2312
2267
  Use this method to set a new group sticker set for a supergroup. The bot must
@@ -2331,7 +2286,7 @@ class APIMethods:
2331
2286
  self,
2332
2287
  chat_id: int | str,
2333
2288
  **other: typing.Any,
2334
- ) -> Result[bool, "APIError"]:
2289
+ ) -> Result[bool, APIError]:
2335
2290
  """Method `deleteChatStickerSet`, see the [documentation](https://core.telegram.org/bots/api#deletechatstickerset)
2336
2291
 
2337
2292
  Use this method to delete a group sticker set from a supergroup. The bot must
@@ -2352,7 +2307,7 @@ class APIMethods:
2352
2307
 
2353
2308
  async def get_forum_topic_icon_stickers(
2354
2309
  self, **other: typing.Any
2355
- ) -> Result[list[Sticker], "APIError"]:
2310
+ ) -> Result[list[Sticker], APIError]:
2356
2311
  """Method `getForumTopicIconStickers`, see the [documentation](https://core.telegram.org/bots/api#getforumtopiciconstickers)
2357
2312
 
2358
2313
  Use this method to get custom emoji stickers, which can be used as a forum
@@ -2370,10 +2325,10 @@ class APIMethods:
2370
2325
  self,
2371
2326
  chat_id: int | str,
2372
2327
  name: str,
2373
- icon_color: TopicIconColor | Option[TopicIconColor] = Nothing,
2374
- icon_custom_emoji_id: str | Option[str] = Nothing,
2328
+ icon_color: TopicIconColor | None = None,
2329
+ icon_custom_emoji_id: str | None = None,
2375
2330
  **other: typing.Any,
2376
- ) -> Result[ForumTopic, "APIError"]:
2331
+ ) -> Result[ForumTopic, APIError]:
2377
2332
  """Method `createForumTopic`, see the [documentation](https://core.telegram.org/bots/api#createforumtopic)
2378
2333
 
2379
2334
  Use this method to create a topic in a forum supergroup chat. The bot must
@@ -2404,10 +2359,10 @@ class APIMethods:
2404
2359
  self,
2405
2360
  chat_id: int | str,
2406
2361
  message_thread_id: int,
2407
- name: str | Option[str] = Nothing,
2408
- icon_custom_emoji_id: str | Option[str] = Nothing,
2362
+ name: str | None = None,
2363
+ icon_custom_emoji_id: str | None = None,
2409
2364
  **other: typing.Any,
2410
- ) -> Result[bool, "APIError"]:
2365
+ ) -> Result[bool, APIError]:
2411
2366
  """Method `editForumTopic`, see the [documentation](https://core.telegram.org/bots/api#editforumtopic)
2412
2367
 
2413
2368
  Use this method to edit name and icon of a topic in a forum supergroup chat.
@@ -2439,7 +2394,7 @@ class APIMethods:
2439
2394
  chat_id: int | str,
2440
2395
  message_thread_id: int,
2441
2396
  **other: typing.Any,
2442
- ) -> Result[bool, "APIError"]:
2397
+ ) -> Result[bool, APIError]:
2443
2398
  """Method `closeForumTopic`, see the [documentation](https://core.telegram.org/bots/api#closeforumtopic)
2444
2399
 
2445
2400
  Use this method to close an open topic in a forum supergroup chat. The bot
@@ -2464,7 +2419,7 @@ class APIMethods:
2464
2419
  chat_id: int | str,
2465
2420
  message_thread_id: int,
2466
2421
  **other: typing.Any,
2467
- ) -> Result[bool, "APIError"]:
2422
+ ) -> Result[bool, APIError]:
2468
2423
  """Method `reopenForumTopic`, see the [documentation](https://core.telegram.org/bots/api#reopenforumtopic)
2469
2424
 
2470
2425
  Use this method to reopen a closed topic in a forum supergroup chat. The bot
@@ -2489,7 +2444,7 @@ class APIMethods:
2489
2444
  chat_id: int | str,
2490
2445
  message_thread_id: int,
2491
2446
  **other: typing.Any,
2492
- ) -> Result[bool, "APIError"]:
2447
+ ) -> Result[bool, APIError]:
2493
2448
  """Method `deleteForumTopic`, see the [documentation](https://core.telegram.org/bots/api#deleteforumtopic)
2494
2449
 
2495
2450
  Use this method to delete a forum topic along with all its messages in a forum
@@ -2514,7 +2469,7 @@ class APIMethods:
2514
2469
  chat_id: int | str,
2515
2470
  message_thread_id: int,
2516
2471
  **other: typing.Any,
2517
- ) -> Result[bool, "APIError"]:
2472
+ ) -> Result[bool, APIError]:
2518
2473
  """Method `unpinAllForumTopicMessages`, see the [documentation](https://core.telegram.org/bots/api#unpinallforumtopicmessages)
2519
2474
 
2520
2475
  Use this method to clear the list of pinned messages in a forum topic. The
@@ -2539,7 +2494,7 @@ class APIMethods:
2539
2494
  chat_id: int | str,
2540
2495
  name: str,
2541
2496
  **other: typing.Any,
2542
- ) -> Result[bool, "APIError"]:
2497
+ ) -> Result[bool, APIError]:
2543
2498
  """Method `editGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#editgeneralforumtopic)
2544
2499
 
2545
2500
  Use this method to edit the name of the 'General' topic in a forum supergroup
@@ -2562,7 +2517,7 @@ class APIMethods:
2562
2517
  self,
2563
2518
  chat_id: int | str,
2564
2519
  **other: typing.Any,
2565
- ) -> Result[bool, "APIError"]:
2520
+ ) -> Result[bool, APIError]:
2566
2521
  """Method `closeGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#closegeneralforumtopic)
2567
2522
 
2568
2523
  Use this method to close an open 'General' topic in a forum supergroup chat.
@@ -2583,7 +2538,7 @@ class APIMethods:
2583
2538
  self,
2584
2539
  chat_id: int | str,
2585
2540
  **other: typing.Any,
2586
- ) -> Result[bool, "APIError"]:
2541
+ ) -> Result[bool, APIError]:
2587
2542
  """Method `reopenGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#reopengeneralforumtopic)
2588
2543
 
2589
2544
  Use this method to reopen a closed 'General' topic in a forum supergroup
@@ -2605,7 +2560,7 @@ class APIMethods:
2605
2560
  self,
2606
2561
  chat_id: int | str,
2607
2562
  **other: typing.Any,
2608
- ) -> Result[bool, "APIError"]:
2563
+ ) -> Result[bool, APIError]:
2609
2564
  """Method `hideGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#hidegeneralforumtopic)
2610
2565
 
2611
2566
  Use this method to hide the 'General' topic in a forum supergroup chat. The
@@ -2627,7 +2582,7 @@ class APIMethods:
2627
2582
  self,
2628
2583
  chat_id: int | str,
2629
2584
  **other: typing.Any,
2630
- ) -> Result[bool, "APIError"]:
2585
+ ) -> Result[bool, APIError]:
2631
2586
  """Method `unhideGeneralForumTopic`, see the [documentation](https://core.telegram.org/bots/api#unhidegeneralforumtopic)
2632
2587
 
2633
2588
  Use this method to unhide the 'General' topic in a forum supergroup chat.
@@ -2648,7 +2603,7 @@ class APIMethods:
2648
2603
  self,
2649
2604
  chat_id: int | str,
2650
2605
  **other: typing.Any,
2651
- ) -> Result[bool, "APIError"]:
2606
+ ) -> Result[bool, APIError]:
2652
2607
  """Method `unpinAllGeneralForumTopicMessages`, see the [documentation](https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages)
2653
2608
 
2654
2609
  Use this method to clear the list of pinned messages in a General forum topic.
@@ -2669,12 +2624,12 @@ class APIMethods:
2669
2624
  async def answer_callback_query(
2670
2625
  self,
2671
2626
  callback_query_id: str,
2672
- text: str | Option[str] = Nothing,
2673
- show_alert: bool | Option[bool] = Nothing,
2674
- url: str | Option[str] = Nothing,
2675
- cache_time: int | Option[int] = Nothing,
2627
+ text: str | None = None,
2628
+ show_alert: bool | None = None,
2629
+ url: str | None = None,
2630
+ cache_time: int | None = None,
2676
2631
  **other: typing.Any,
2677
- ) -> Result[bool, "APIError"]:
2632
+ ) -> Result[bool, APIError]:
2678
2633
  """Method `answerCallbackQuery`, see the [documentation](https://core.telegram.org/bots/api#answercallbackquery)
2679
2634
 
2680
2635
  Use this method to send answers to callback queries sent from inline keyboards.
@@ -2711,7 +2666,7 @@ class APIMethods:
2711
2666
  chat_id: int | str,
2712
2667
  user_id: int,
2713
2668
  **other: typing.Any,
2714
- ) -> Result[UserChatBoosts, "APIError"]:
2669
+ ) -> Result[UserChatBoosts, APIError]:
2715
2670
  """Method `getUserChatBoosts`, see the [documentation](https://core.telegram.org/bots/api#getuserchatboosts)
2716
2671
 
2717
2672
  Use this method to get the list of boosts added to a chat by a user. Requires
@@ -2732,10 +2687,10 @@ class APIMethods:
2732
2687
  async def set_my_commands(
2733
2688
  self,
2734
2689
  commands: list[BotCommand],
2735
- scope: BotCommandScope | Option[BotCommandScope] = Nothing,
2736
- language_code: str | Option[str] = Nothing,
2690
+ scope: BotCommandScope | None = None,
2691
+ language_code: str | None = None,
2737
2692
  **other: typing.Any,
2738
- ) -> Result[bool, "APIError"]:
2693
+ ) -> Result[bool, APIError]:
2739
2694
  """Method `setMyCommands`, see the [documentation](https://core.telegram.org/bots/api#setmycommands)
2740
2695
 
2741
2696
  Use this method to change the list of the bot's commands. See this manual
@@ -2760,10 +2715,10 @@ class APIMethods:
2760
2715
 
2761
2716
  async def delete_my_commands(
2762
2717
  self,
2763
- scope: BotCommandScope | Option[BotCommandScope] = Nothing,
2764
- language_code: str | Option[str] = Nothing,
2718
+ scope: BotCommandScope | None = None,
2719
+ language_code: str | None = None,
2765
2720
  **other: typing.Any,
2766
- ) -> Result[bool, "APIError"]:
2721
+ ) -> Result[bool, APIError]:
2767
2722
  """Method `deleteMyCommands`, see the [documentation](https://core.telegram.org/bots/api#deletemycommands)
2768
2723
 
2769
2724
  Use this method to delete the list of the bot's commands for the given scope
@@ -2786,10 +2741,10 @@ class APIMethods:
2786
2741
 
2787
2742
  async def get_my_commands(
2788
2743
  self,
2789
- scope: BotCommandScope | Option[BotCommandScope] = Nothing,
2790
- language_code: str | Option[str] = Nothing,
2744
+ scope: BotCommandScope | None = None,
2745
+ language_code: str | None = None,
2791
2746
  **other: typing.Any,
2792
- ) -> Result[list[BotCommand], "APIError"]:
2747
+ ) -> Result[list[BotCommand], APIError]:
2793
2748
  """Method `getMyCommands`, see the [documentation](https://core.telegram.org/bots/api#getmycommands)
2794
2749
 
2795
2750
  Use this method to get the current list of the bot's commands for the given
@@ -2809,10 +2764,10 @@ class APIMethods:
2809
2764
 
2810
2765
  async def set_my_name(
2811
2766
  self,
2812
- name: str | Option[str] = Nothing,
2813
- language_code: str | Option[str] = Nothing,
2767
+ name: str | None = None,
2768
+ language_code: str | None = None,
2814
2769
  **other: typing.Any,
2815
- ) -> Result[bool, "APIError"]:
2770
+ ) -> Result[bool, APIError]:
2816
2771
  """Method `setMyName`, see the [documentation](https://core.telegram.org/bots/api#setmyname)
2817
2772
 
2818
2773
  Use this method to change the bot's name. Returns True on success.
@@ -2832,9 +2787,9 @@ class APIMethods:
2832
2787
 
2833
2788
  async def get_my_name(
2834
2789
  self,
2835
- language_code: str | Option[str] = Nothing,
2790
+ language_code: str | None = None,
2836
2791
  **other: typing.Any,
2837
- ) -> Result[BotName, "APIError"]:
2792
+ ) -> Result[BotName, APIError]:
2838
2793
  """Method `getMyName`, see the [documentation](https://core.telegram.org/bots/api#getmyname)
2839
2794
 
2840
2795
  Use this method to get the current bot name for the given user language. Returns
@@ -2851,10 +2806,10 @@ class APIMethods:
2851
2806
 
2852
2807
  async def set_my_description(
2853
2808
  self,
2854
- description: str | Option[str] = Nothing,
2855
- language_code: str | Option[str] = Nothing,
2809
+ description: str | None = None,
2810
+ language_code: str | None = None,
2856
2811
  **other: typing.Any,
2857
- ) -> Result[bool, "APIError"]:
2812
+ ) -> Result[bool, APIError]:
2858
2813
  """Method `setMyDescription`, see the [documentation](https://core.telegram.org/bots/api#setmydescription)
2859
2814
 
2860
2815
  Use this method to change the bot's description, which is shown in the chat
@@ -2875,9 +2830,9 @@ class APIMethods:
2875
2830
 
2876
2831
  async def get_my_description(
2877
2832
  self,
2878
- language_code: str | Option[str] = Nothing,
2833
+ language_code: str | None = None,
2879
2834
  **other: typing.Any,
2880
- ) -> Result[BotDescription, "APIError"]:
2835
+ ) -> Result[BotDescription, APIError]:
2881
2836
  """Method `getMyDescription`, see the [documentation](https://core.telegram.org/bots/api#getmydescription)
2882
2837
 
2883
2838
  Use this method to get the current bot description for the given user language.
@@ -2894,10 +2849,10 @@ class APIMethods:
2894
2849
 
2895
2850
  async def set_my_short_description(
2896
2851
  self,
2897
- short_description: str | Option[str] = Nothing,
2898
- language_code: str | Option[str] = Nothing,
2852
+ short_description: str | None = None,
2853
+ language_code: str | None = None,
2899
2854
  **other: typing.Any,
2900
- ) -> Result[bool, "APIError"]:
2855
+ ) -> Result[bool, APIError]:
2901
2856
  """Method `setMyShortDescription`, see the [documentation](https://core.telegram.org/bots/api#setmyshortdescription)
2902
2857
 
2903
2858
  Use this method to change the bot's short description, which is shown on
@@ -2919,9 +2874,9 @@ class APIMethods:
2919
2874
 
2920
2875
  async def get_my_short_description(
2921
2876
  self,
2922
- language_code: str | Option[str] = Nothing,
2877
+ language_code: str | None = None,
2923
2878
  **other: typing.Any,
2924
- ) -> Result[BotShortDescription, "APIError"]:
2879
+ ) -> Result[BotShortDescription, APIError]:
2925
2880
  """Method `getMyShortDescription`, see the [documentation](https://core.telegram.org/bots/api#getmyshortdescription)
2926
2881
 
2927
2882
  Use this method to get the current bot short description for the given user
@@ -2938,10 +2893,10 @@ class APIMethods:
2938
2893
 
2939
2894
  async def set_chat_menu_button(
2940
2895
  self,
2941
- chat_id: int | Option[int] = Nothing,
2942
- menu_button: MenuButton | Option[MenuButton] = Nothing,
2896
+ chat_id: int | None = None,
2897
+ menu_button: MenuButton | None = None,
2943
2898
  **other: typing.Any,
2944
- ) -> Result[bool, "APIError"]:
2899
+ ) -> Result[bool, APIError]:
2945
2900
  """Method `setChatMenuButton`, see the [documentation](https://core.telegram.org/bots/api#setchatmenubutton)
2946
2901
 
2947
2902
  Use this method to change the bot's menu button in a private chat, or the default
@@ -2961,10 +2916,10 @@ class APIMethods:
2961
2916
 
2962
2917
  async def get_chat_menu_button(
2963
2918
  self,
2964
- chat_id: int | Option[int] = Nothing,
2919
+ chat_id: int | None = None,
2965
2920
  **other: typing.Any,
2966
2921
  ) -> Result[
2967
- Variative[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault], "APIError"
2922
+ Variative[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault], APIError
2968
2923
  ]:
2969
2924
  """Method `getChatMenuButton`, see the [documentation](https://core.telegram.org/bots/api#getchatmenubutton)
2970
2925
 
@@ -2986,10 +2941,10 @@ class APIMethods:
2986
2941
 
2987
2942
  async def set_my_default_administrator_rights(
2988
2943
  self,
2989
- rights: ChatAdministratorRights | Option[ChatAdministratorRights] = Nothing,
2990
- for_channels: bool | Option[bool] = Nothing,
2944
+ rights: ChatAdministratorRights | None = None,
2945
+ for_channels: bool | None = None,
2991
2946
  **other: typing.Any,
2992
- ) -> Result[bool, "APIError"]:
2947
+ ) -> Result[bool, APIError]:
2993
2948
  """Method `setMyDefaultAdministratorRights`, see the [documentation](https://core.telegram.org/bots/api#setmydefaultadministratorrights)
2994
2949
 
2995
2950
  Use this method to change the default administrator rights requested by
@@ -3013,9 +2968,9 @@ class APIMethods:
3013
2968
 
3014
2969
  async def get_my_default_administrator_rights(
3015
2970
  self,
3016
- for_channels: bool | Option[bool] = Nothing,
2971
+ for_channels: bool | None = None,
3017
2972
  **other: typing.Any,
3018
- ) -> Result[ChatAdministratorRights, "APIError"]:
2973
+ ) -> Result[ChatAdministratorRights, APIError]:
3019
2974
  """Method `getMyDefaultAdministratorRights`, see the [documentation](https://core.telegram.org/bots/api#getmydefaultadministratorrights)
3020
2975
 
3021
2976
  Use this method to get the current default administrator rights of the bot.
@@ -3035,15 +2990,15 @@ class APIMethods:
3035
2990
  async def edit_message_text(
3036
2991
  self,
3037
2992
  text: str,
3038
- chat_id: int | str | Option[int | str] = Nothing,
3039
- message_id: int | Option[int] = Nothing,
3040
- inline_message_id: str | Option[str] = Nothing,
3041
- parse_mode: str | Option[str] = Nothing,
3042
- entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
3043
- link_preview_options: LinkPreviewOptions | Option[LinkPreviewOptions] = Nothing,
3044
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
2993
+ chat_id: int | str | None = None,
2994
+ message_id: int | None = None,
2995
+ inline_message_id: str | None = None,
2996
+ parse_mode: str | None = None,
2997
+ entities: list[MessageEntity] | None = None,
2998
+ link_preview_options: LinkPreviewOptions | None = None,
2999
+ reply_markup: InlineKeyboardMarkup | None = None,
3045
3000
  **other: typing.Any,
3046
- ) -> Result[Variative[Message, bool], "APIError"]:
3001
+ ) -> Result[Variative[Message, bool], APIError]:
3047
3002
  """Method `editMessageText`, see the [documentation](https://core.telegram.org/bots/api#editmessagetext)
3048
3003
 
3049
3004
  Use this method to edit text and game messages. On success, if the edited
@@ -3080,15 +3035,15 @@ class APIMethods:
3080
3035
 
3081
3036
  async def edit_message_caption(
3082
3037
  self,
3083
- chat_id: int | str | Option[int | str] = Nothing,
3084
- message_id: int | Option[int] = Nothing,
3085
- inline_message_id: str | Option[str] = Nothing,
3086
- caption: str | Option[str] = Nothing,
3087
- parse_mode: str | Option[str] = Nothing,
3088
- caption_entities: list[MessageEntity] | Option[list[MessageEntity]] = Nothing,
3089
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
3038
+ chat_id: int | str | None = None,
3039
+ message_id: int | None = None,
3040
+ inline_message_id: str | None = None,
3041
+ caption: str | None = None,
3042
+ parse_mode: str | None = None,
3043
+ caption_entities: list[MessageEntity] | None = None,
3044
+ reply_markup: InlineKeyboardMarkup | None = None,
3090
3045
  **other: typing.Any,
3091
- ) -> Result[Variative[Message, bool], "APIError"]:
3046
+ ) -> Result[Variative[Message, bool], APIError]:
3092
3047
  """Method `editMessageCaption`, see the [documentation](https://core.telegram.org/bots/api#editmessagecaption)
3093
3048
 
3094
3049
  Use this method to edit captions of messages. On success, if the edited message
@@ -3124,12 +3079,12 @@ class APIMethods:
3124
3079
  async def edit_message_media(
3125
3080
  self,
3126
3081
  media: InputMedia,
3127
- chat_id: int | str | Option[int | str] = Nothing,
3128
- message_id: int | Option[int] = Nothing,
3129
- inline_message_id: str | Option[str] = Nothing,
3130
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
3082
+ chat_id: int | str | None = None,
3083
+ message_id: int | None = None,
3084
+ inline_message_id: str | None = None,
3085
+ reply_markup: InlineKeyboardMarkup | None = None,
3131
3086
  **other: typing.Any,
3132
- ) -> Result[Variative[Message, bool], "APIError"]:
3087
+ ) -> Result[Variative[Message, bool], APIError]:
3133
3088
  """Method `editMessageMedia`, see the [documentation](https://core.telegram.org/bots/api#editmessagemedia)
3134
3089
 
3135
3090
  Use this method to edit animation, audio, document, photo, or video messages.
@@ -3164,15 +3119,15 @@ class APIMethods:
3164
3119
  self,
3165
3120
  latitude: float,
3166
3121
  longitude: float,
3167
- chat_id: int | str | Option[int | str] = Nothing,
3168
- message_id: int | Option[int] = Nothing,
3169
- inline_message_id: str | Option[str] = Nothing,
3170
- horizontal_accuracy: float | Option[float] = Nothing,
3171
- heading: int | Option[int] = Nothing,
3172
- proximity_alert_radius: int | Option[int] = Nothing,
3173
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
3122
+ chat_id: int | str | None = None,
3123
+ message_id: int | None = None,
3124
+ inline_message_id: str | None = None,
3125
+ horizontal_accuracy: float | None = None,
3126
+ heading: int | None = None,
3127
+ proximity_alert_radius: int | None = None,
3128
+ reply_markup: InlineKeyboardMarkup | None = None,
3174
3129
  **other: typing.Any,
3175
- ) -> Result[Variative[Message, bool], "APIError"]:
3130
+ ) -> Result[Variative[Message, bool], APIError]:
3176
3131
  """Method `editMessageLiveLocation`, see the [documentation](https://core.telegram.org/bots/api#editmessagelivelocation)
3177
3132
 
3178
3133
  Use this method to edit live location messages. A location can be edited
@@ -3212,12 +3167,12 @@ class APIMethods:
3212
3167
 
3213
3168
  async def stop_message_live_location(
3214
3169
  self,
3215
- chat_id: int | str | Option[int | str] = Nothing,
3216
- message_id: int | Option[int] = Nothing,
3217
- inline_message_id: str | Option[str] = Nothing,
3218
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
3170
+ chat_id: int | str | None = None,
3171
+ message_id: int | None = None,
3172
+ inline_message_id: str | None = None,
3173
+ reply_markup: InlineKeyboardMarkup | None = None,
3219
3174
  **other: typing.Any,
3220
- ) -> Result[Variative[Message, bool], "APIError"]:
3175
+ ) -> Result[Variative[Message, bool], APIError]:
3221
3176
  """Method `stopMessageLiveLocation`, see the [documentation](https://core.telegram.org/bots/api#stopmessagelivelocation)
3222
3177
 
3223
3178
  Use this method to stop updating a live location message before live_period
@@ -3244,12 +3199,12 @@ class APIMethods:
3244
3199
 
3245
3200
  async def edit_message_reply_markup(
3246
3201
  self,
3247
- chat_id: int | str | Option[int | str] = Nothing,
3248
- message_id: int | Option[int] = Nothing,
3249
- inline_message_id: str | Option[str] = Nothing,
3250
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
3202
+ chat_id: int | str | None = None,
3203
+ message_id: int | None = None,
3204
+ inline_message_id: str | None = None,
3205
+ reply_markup: InlineKeyboardMarkup | None = None,
3251
3206
  **other: typing.Any,
3252
- ) -> Result[Variative[Message, bool], "APIError"]:
3207
+ ) -> Result[Variative[Message, bool], APIError]:
3253
3208
  """Method `editMessageReplyMarkup`, see the [documentation](https://core.telegram.org/bots/api#editmessagereplymarkup)
3254
3209
 
3255
3210
  Use this method to edit only the reply markup of messages. On success, if
@@ -3278,9 +3233,9 @@ class APIMethods:
3278
3233
  self,
3279
3234
  chat_id: int | str,
3280
3235
  message_id: int,
3281
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
3236
+ reply_markup: InlineKeyboardMarkup | None = None,
3282
3237
  **other: typing.Any,
3283
- ) -> Result[Poll, "APIError"]:
3238
+ ) -> Result[Poll, APIError]:
3284
3239
  """Method `stopPoll`, see the [documentation](https://core.telegram.org/bots/api#stoppoll)
3285
3240
 
3286
3241
  Use this method to stop a poll which was sent by the bot. On success, the stopped
@@ -3305,7 +3260,7 @@ class APIMethods:
3305
3260
  chat_id: int | str,
3306
3261
  message_id: int,
3307
3262
  **other: typing.Any,
3308
- ) -> Result[bool, "APIError"]:
3263
+ ) -> Result[bool, APIError]:
3309
3264
  """Method `deleteMessage`, see the [documentation](https://core.telegram.org/bots/api#deletemessage)
3310
3265
 
3311
3266
  Use this method to delete a message, including service messages, with the
@@ -3337,7 +3292,7 @@ class APIMethods:
3337
3292
  chat_id: int | str,
3338
3293
  message_ids: list[int],
3339
3294
  **other: typing.Any,
3340
- ) -> Result[bool, "APIError"]:
3295
+ ) -> Result[bool, APIError]:
3341
3296
  """Method `deleteMessages`, see the [documentation](https://core.telegram.org/bots/api#deletemessages)
3342
3297
 
3343
3298
  Use this method to delete multiple messages simultaneously. If some of
@@ -3361,23 +3316,20 @@ class APIMethods:
3361
3316
  self,
3362
3317
  chat_id: int | str,
3363
3318
  sticker: InputFile | str,
3364
- message_thread_id: int | Option[int] = Nothing,
3365
- emoji: str | Option[str] = Nothing,
3366
- disable_notification: bool | Option[bool] = Nothing,
3367
- protect_content: bool | Option[bool] = Nothing,
3368
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
3369
- reply_markup: InlineKeyboardMarkup
3370
- | ReplyKeyboardMarkup
3371
- | ReplyKeyboardRemove
3372
- | ForceReply
3373
- | Option[
3319
+ message_thread_id: int | None = None,
3320
+ emoji: str | None = None,
3321
+ disable_notification: bool | None = None,
3322
+ protect_content: bool | None = None,
3323
+ reply_parameters: ReplyParameters | None = None,
3324
+ reply_markup: (
3374
3325
  InlineKeyboardMarkup
3375
3326
  | ReplyKeyboardMarkup
3376
3327
  | ReplyKeyboardRemove
3377
3328
  | ForceReply
3378
- ] = Nothing,
3329
+ | None
3330
+ ) = None,
3379
3331
  **other: typing.Any,
3380
- ) -> Result[Message, "APIError"]:
3332
+ ) -> Result[Message, APIError]:
3381
3333
  """Method `sendSticker`, see the [documentation](https://core.telegram.org/bots/api#sendsticker)
3382
3334
 
3383
3335
  Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers.
@@ -3419,7 +3371,7 @@ class APIMethods:
3419
3371
  self,
3420
3372
  name: str,
3421
3373
  **other: typing.Any,
3422
- ) -> Result[StickerSet, "APIError"]:
3374
+ ) -> Result[StickerSet, APIError]:
3423
3375
  """Method `getStickerSet`, see the [documentation](https://core.telegram.org/bots/api#getstickerset)
3424
3376
 
3425
3377
  Use this method to get a sticker set. On success, a StickerSet object is returned.
@@ -3437,7 +3389,7 @@ class APIMethods:
3437
3389
  self,
3438
3390
  custom_emoji_ids: list[str],
3439
3391
  **other: typing.Any,
3440
- ) -> Result[list[Sticker], "APIError"]:
3392
+ ) -> Result[list[Sticker], APIError]:
3441
3393
  """Method `getCustomEmojiStickers`, see the [documentation](https://core.telegram.org/bots/api#getcustomemojistickers)
3442
3394
 
3443
3395
  Use this method to get information about custom emoji stickers by their
@@ -3459,7 +3411,7 @@ class APIMethods:
3459
3411
  sticker: InputFile,
3460
3412
  sticker_format: typing.Literal["static", "animated", "video"],
3461
3413
  **other: typing.Any,
3462
- ) -> Result[File, "APIError"]:
3414
+ ) -> Result[File, APIError]:
3463
3415
  """Method `uploadStickerFile`, see the [documentation](https://core.telegram.org/bots/api#uploadstickerfile)
3464
3416
 
3465
3417
  Use this method to upload a file with a sticker for later use in the createNewStickerSet
@@ -3487,11 +3439,10 @@ class APIMethods:
3487
3439
  title: str,
3488
3440
  stickers: list[InputSticker],
3489
3441
  sticker_format: typing.Literal["static", "animated", "video"],
3490
- sticker_type: typing.Literal["regular", "mask", "custom_emoji"]
3491
- | Option[typing.Literal["regular", "mask", "custom_emoji"]] = Nothing,
3492
- needs_repainting: bool | Option[bool] = Nothing,
3442
+ sticker_type: typing.Literal["regular", "mask", "custom_emoji"] | None = None,
3443
+ needs_repainting: bool | None = None,
3493
3444
  **other: typing.Any,
3494
- ) -> Result[bool, "APIError"]:
3445
+ ) -> Result[bool, APIError]:
3495
3446
  """Method `createNewStickerSet`, see the [documentation](https://core.telegram.org/bots/api#createnewstickerset)
3496
3447
 
3497
3448
  Use this method to create a new sticker set owned by a user. The bot will be
@@ -3532,7 +3483,7 @@ class APIMethods:
3532
3483
  name: str,
3533
3484
  sticker: InputSticker,
3534
3485
  **other: typing.Any,
3535
- ) -> Result[bool, "APIError"]:
3486
+ ) -> Result[bool, APIError]:
3536
3487
  """Method `addStickerToSet`, see the [documentation](https://core.telegram.org/bots/api#addstickertoset)
3537
3488
 
3538
3489
  Use this method to add a new sticker to a set created by the bot. The format
@@ -3561,7 +3512,7 @@ class APIMethods:
3561
3512
  sticker: str,
3562
3513
  position: int,
3563
3514
  **other: typing.Any,
3564
- ) -> Result[bool, "APIError"]:
3515
+ ) -> Result[bool, APIError]:
3565
3516
  """Method `setStickerPositionInSet`, see the [documentation](https://core.telegram.org/bots/api#setstickerpositioninset)
3566
3517
 
3567
3518
  Use this method to move a sticker in a set created by the bot to a specific position.
@@ -3582,7 +3533,7 @@ class APIMethods:
3582
3533
  self,
3583
3534
  sticker: str,
3584
3535
  **other: typing.Any,
3585
- ) -> Result[bool, "APIError"]:
3536
+ ) -> Result[bool, APIError]:
3586
3537
  """Method `deleteStickerFromSet`, see the [documentation](https://core.telegram.org/bots/api#deletestickerfromset)
3587
3538
 
3588
3539
  Use this method to delete a sticker from a set created by the bot. Returns
@@ -3602,7 +3553,7 @@ class APIMethods:
3602
3553
  sticker: str,
3603
3554
  emoji_list: list[str],
3604
3555
  **other: typing.Any,
3605
- ) -> Result[bool, "APIError"]:
3556
+ ) -> Result[bool, APIError]:
3606
3557
  """Method `setStickerEmojiList`, see the [documentation](https://core.telegram.org/bots/api#setstickeremojilist)
3607
3558
 
3608
3559
  Use this method to change the list of emoji assigned to a regular or custom
@@ -3623,9 +3574,9 @@ class APIMethods:
3623
3574
  async def set_sticker_keywords(
3624
3575
  self,
3625
3576
  sticker: str,
3626
- keywords: list[str] | Option[list[str]] = Nothing,
3577
+ keywords: list[str] | None = None,
3627
3578
  **other: typing.Any,
3628
- ) -> Result[bool, "APIError"]:
3579
+ ) -> Result[bool, APIError]:
3629
3580
  """Method `setStickerKeywords`, see the [documentation](https://core.telegram.org/bots/api#setstickerkeywords)
3630
3581
 
3631
3582
  Use this method to change search keywords assigned to a regular or custom
@@ -3647,9 +3598,9 @@ class APIMethods:
3647
3598
  async def set_sticker_mask_position(
3648
3599
  self,
3649
3600
  sticker: str,
3650
- mask_position: MaskPosition | Option[MaskPosition] = Nothing,
3601
+ mask_position: MaskPosition | None = None,
3651
3602
  **other: typing.Any,
3652
- ) -> Result[bool, "APIError"]:
3603
+ ) -> Result[bool, APIError]:
3653
3604
  """Method `setStickerMaskPosition`, see the [documentation](https://core.telegram.org/bots/api#setstickermaskposition)
3654
3605
 
3655
3606
  Use this method to change the mask position of a mask sticker. The sticker
@@ -3672,7 +3623,7 @@ class APIMethods:
3672
3623
  name: str,
3673
3624
  title: str,
3674
3625
  **other: typing.Any,
3675
- ) -> Result[bool, "APIError"]:
3626
+ ) -> Result[bool, APIError]:
3676
3627
  """Method `setStickerSetTitle`, see the [documentation](https://core.telegram.org/bots/api#setstickersettitle)
3677
3628
 
3678
3629
  Use this method to set the title of a created sticker set. Returns True on
@@ -3693,9 +3644,9 @@ class APIMethods:
3693
3644
  self,
3694
3645
  name: str,
3695
3646
  user_id: int,
3696
- thumbnail: InputFile | str | Option[InputFile | str] = Nothing,
3647
+ thumbnail: InputFile | str | None = None,
3697
3648
  **other: typing.Any,
3698
- ) -> Result[bool, "APIError"]:
3649
+ ) -> Result[bool, APIError]:
3699
3650
  """Method `setStickerSetThumbnail`, see the [documentation](https://core.telegram.org/bots/api#setstickersetthumbnail)
3700
3651
 
3701
3652
  Use this method to set the thumbnail of a regular or mask sticker set. The
@@ -3729,9 +3680,9 @@ class APIMethods:
3729
3680
  async def set_custom_emoji_sticker_set_thumbnail(
3730
3681
  self,
3731
3682
  name: str,
3732
- custom_emoji_id: str | Option[str] = Nothing,
3683
+ custom_emoji_id: str | None = None,
3733
3684
  **other: typing.Any,
3734
- ) -> Result[bool, "APIError"]:
3685
+ ) -> Result[bool, APIError]:
3735
3686
  """Method `setCustomEmojiStickerSetThumbnail`, see the [documentation](https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail)
3736
3687
 
3737
3688
  Use this method to set the thumbnail of a custom emoji sticker set. Returns
@@ -3753,7 +3704,7 @@ class APIMethods:
3753
3704
  self,
3754
3705
  name: str,
3755
3706
  **other: typing.Any,
3756
- ) -> Result[bool, "APIError"]:
3707
+ ) -> Result[bool, APIError]:
3757
3708
  """Method `deleteStickerSet`, see the [documentation](https://core.telegram.org/bots/api#deletestickerset)
3758
3709
 
3759
3710
  Use this method to delete a sticker set that was created by the bot. Returns
@@ -3772,12 +3723,12 @@ class APIMethods:
3772
3723
  self,
3773
3724
  inline_query_id: str,
3774
3725
  results: list[InlineQueryResult],
3775
- cache_time: int | Option[int] = Nothing,
3776
- is_personal: bool | Option[bool] = Nothing,
3777
- next_offset: str | Option[str] = Nothing,
3778
- button: InlineQueryResultsButton | Option[InlineQueryResultsButton] = Nothing,
3726
+ cache_time: int | None = None,
3727
+ is_personal: bool | None = None,
3728
+ next_offset: str | None = None,
3729
+ button: InlineQueryResultsButton | None = None,
3779
3730
  **other: typing.Any,
3780
- ) -> Result[bool, "APIError"]:
3731
+ ) -> Result[bool, APIError]:
3781
3732
  """Method `answerInlineQuery`, see the [documentation](https://core.telegram.org/bots/api#answerinlinequery)
3782
3733
 
3783
3734
  Use this method to send answers to an inline query. On success, True is returned.
@@ -3813,7 +3764,7 @@ class APIMethods:
3813
3764
  web_app_query_id: str,
3814
3765
  result: InlineQueryResult,
3815
3766
  **other: typing.Any,
3816
- ) -> Result[SentWebAppMessage, "APIError"]:
3767
+ ) -> Result[SentWebAppMessage, APIError]:
3817
3768
  """Method `answerWebAppQuery`, see the [documentation](https://core.telegram.org/bots/api#answerwebappquery)
3818
3769
 
3819
3770
  Use this method to set the result of an interaction with a Web App and send
@@ -3840,28 +3791,28 @@ class APIMethods:
3840
3791
  provider_token: str,
3841
3792
  currency: str,
3842
3793
  prices: list[LabeledPrice],
3843
- message_thread_id: int | Option[int] = Nothing,
3844
- max_tip_amount: int | Option[int] = Nothing,
3845
- suggested_tip_amounts: list[int] | Option[list[int]] = Nothing,
3846
- start_parameter: str | Option[str] = Nothing,
3847
- provider_data: str | Option[str] = Nothing,
3848
- photo_url: str | Option[str] = Nothing,
3849
- photo_size: int | Option[int] = Nothing,
3850
- photo_width: int | Option[int] = Nothing,
3851
- photo_height: int | Option[int] = Nothing,
3852
- need_name: bool | Option[bool] = Nothing,
3853
- need_phone_number: bool | Option[bool] = Nothing,
3854
- need_email: bool | Option[bool] = Nothing,
3855
- need_shipping_address: bool | Option[bool] = Nothing,
3856
- send_phone_number_to_provider: bool | Option[bool] = Nothing,
3857
- send_email_to_provider: bool | Option[bool] = Nothing,
3858
- is_flexible: bool | Option[bool] = Nothing,
3859
- disable_notification: bool | Option[bool] = Nothing,
3860
- protect_content: bool | Option[bool] = Nothing,
3861
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
3862
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
3794
+ message_thread_id: int | None = None,
3795
+ max_tip_amount: int | None = None,
3796
+ suggested_tip_amounts: list[int] | None = None,
3797
+ start_parameter: str | None = None,
3798
+ provider_data: str | None = None,
3799
+ photo_url: str | None = None,
3800
+ photo_size: int | None = None,
3801
+ photo_width: int | None = None,
3802
+ photo_height: int | None = None,
3803
+ need_name: bool | None = None,
3804
+ need_phone_number: bool | None = None,
3805
+ need_email: bool | None = None,
3806
+ need_shipping_address: bool | None = None,
3807
+ send_phone_number_to_provider: bool | None = None,
3808
+ send_email_to_provider: bool | None = None,
3809
+ is_flexible: bool | None = None,
3810
+ disable_notification: bool | None = None,
3811
+ protect_content: bool | None = None,
3812
+ reply_parameters: ReplyParameters | None = None,
3813
+ reply_markup: InlineKeyboardMarkup | None = None,
3863
3814
  **other: typing.Any,
3864
- ) -> Result[Message, "APIError"]:
3815
+ ) -> Result[Message, APIError]:
3865
3816
  """Method `sendInvoice`, see the [documentation](https://core.telegram.org/bots/api#sendinvoice)
3866
3817
 
3867
3818
  Use this method to send invoices. On success, the sent Message is returned.
@@ -3955,22 +3906,22 @@ class APIMethods:
3955
3906
  provider_token: str,
3956
3907
  currency: str,
3957
3908
  prices: list[LabeledPrice],
3958
- max_tip_amount: int | Option[int] = Nothing,
3959
- suggested_tip_amounts: list[int] | Option[list[int]] = Nothing,
3960
- provider_data: str | Option[str] = Nothing,
3961
- photo_url: str | Option[str] = Nothing,
3962
- photo_size: int | Option[int] = Nothing,
3963
- photo_width: int | Option[int] = Nothing,
3964
- photo_height: int | Option[int] = Nothing,
3965
- need_name: bool | Option[bool] = Nothing,
3966
- need_phone_number: bool | Option[bool] = Nothing,
3967
- need_email: bool | Option[bool] = Nothing,
3968
- need_shipping_address: bool | Option[bool] = Nothing,
3969
- send_phone_number_to_provider: bool | Option[bool] = Nothing,
3970
- send_email_to_provider: bool | Option[bool] = Nothing,
3971
- is_flexible: bool | Option[bool] = Nothing,
3909
+ max_tip_amount: int | None = None,
3910
+ suggested_tip_amounts: list[int] | None = None,
3911
+ provider_data: str | None = None,
3912
+ photo_url: str | None = None,
3913
+ photo_size: int | None = None,
3914
+ photo_width: int | None = None,
3915
+ photo_height: int | None = None,
3916
+ need_name: bool | None = None,
3917
+ need_phone_number: bool | None = None,
3918
+ need_email: bool | None = None,
3919
+ need_shipping_address: bool | None = None,
3920
+ send_phone_number_to_provider: bool | None = None,
3921
+ send_email_to_provider: bool | None = None,
3922
+ is_flexible: bool | None = None,
3972
3923
  **other: typing.Any,
3973
- ) -> Result[str, "APIError"]:
3924
+ ) -> Result[str, APIError]:
3974
3925
  """Method `createInvoiceLink`, see the [documentation](https://core.telegram.org/bots/api#createinvoicelink)
3975
3926
 
3976
3927
  Use this method to create a link for an invoice. Returns the created invoice
@@ -4039,10 +3990,10 @@ class APIMethods:
4039
3990
  self,
4040
3991
  shipping_query_id: str,
4041
3992
  ok: bool,
4042
- shipping_options: list[ShippingOption] | Option[list[ShippingOption]] = Nothing,
4043
- error_message: str | Option[str] = Nothing,
3993
+ shipping_options: list[ShippingOption] | None = None,
3994
+ error_message: str | None = None,
4044
3995
  **other: typing.Any,
4045
- ) -> Result[bool, "APIError"]:
3996
+ ) -> Result[bool, APIError]:
4046
3997
  """Method `answerShippingQuery`, see the [documentation](https://core.telegram.org/bots/api#answershippingquery)
4047
3998
 
4048
3999
  If you sent an invoice requesting a shipping address and the parameter is_flexible
@@ -4074,9 +4025,9 @@ class APIMethods:
4074
4025
  self,
4075
4026
  pre_checkout_query_id: str,
4076
4027
  ok: bool,
4077
- error_message: str | Option[str] = Nothing,
4028
+ error_message: str | None = None,
4078
4029
  **other: typing.Any,
4079
- ) -> Result[bool, "APIError"]:
4030
+ ) -> Result[bool, APIError]:
4080
4031
  """Method `answerPreCheckoutQuery`, see the [documentation](https://core.telegram.org/bots/api#answerprecheckoutquery)
4081
4032
 
4082
4033
  Once the user has confirmed their payment and shipping details, the Bot
@@ -4108,7 +4059,7 @@ class APIMethods:
4108
4059
  user_id: int,
4109
4060
  errors: list[PassportElementError],
4110
4061
  **other: typing.Any,
4111
- ) -> Result[bool, "APIError"]:
4062
+ ) -> Result[bool, APIError]:
4112
4063
  """Method `setPassportDataErrors`, see the [documentation](https://core.telegram.org/bots/api#setpassportdataerrors)
4113
4064
 
4114
4065
  Informs a user that some of the Telegram Passport elements they provided
@@ -4135,13 +4086,13 @@ class APIMethods:
4135
4086
  self,
4136
4087
  chat_id: int,
4137
4088
  game_short_name: str,
4138
- message_thread_id: int | Option[int] = Nothing,
4139
- disable_notification: bool | Option[bool] = Nothing,
4140
- protect_content: bool | Option[bool] = Nothing,
4141
- reply_parameters: ReplyParameters | Option[ReplyParameters] = Nothing,
4142
- reply_markup: InlineKeyboardMarkup | Option[InlineKeyboardMarkup] = Nothing,
4089
+ message_thread_id: int | None = None,
4090
+ disable_notification: bool | None = None,
4091
+ protect_content: bool | None = None,
4092
+ reply_parameters: ReplyParameters | None = None,
4093
+ reply_markup: InlineKeyboardMarkup | None = None,
4143
4094
  **other: typing.Any,
4144
- ) -> Result[Message, "APIError"]:
4095
+ ) -> Result[Message, APIError]:
4145
4096
  """Method `sendGame`, see the [documentation](https://core.telegram.org/bots/api#sendgame)
4146
4097
 
4147
4098
  Use this method to send a game. On success, the sent Message is returned.
@@ -4174,13 +4125,13 @@ class APIMethods:
4174
4125
  self,
4175
4126
  user_id: int,
4176
4127
  score: int,
4177
- force: bool | Option[bool] = Nothing,
4178
- disable_edit_message: bool | Option[bool] = Nothing,
4179
- chat_id: int | Option[int] = Nothing,
4180
- message_id: int | Option[int] = Nothing,
4181
- inline_message_id: str | Option[str] = Nothing,
4128
+ force: bool | None = None,
4129
+ disable_edit_message: bool | None = None,
4130
+ chat_id: int | None = None,
4131
+ message_id: int | None = None,
4132
+ inline_message_id: str | None = None,
4182
4133
  **other: typing.Any,
4183
- ) -> Result[Variative[Message, bool], "APIError"]:
4134
+ ) -> Result[Variative[Message, bool], APIError]:
4184
4135
  """Method `setGameScore`, see the [documentation](https://core.telegram.org/bots/api#setgamescore)
4185
4136
 
4186
4137
  Use this method to set the score of the specified user in a game message. On
@@ -4217,11 +4168,11 @@ class APIMethods:
4217
4168
  async def get_game_high_scores(
4218
4169
  self,
4219
4170
  user_id: int,
4220
- chat_id: int | Option[int] = Nothing,
4221
- message_id: int | Option[int] = Nothing,
4222
- inline_message_id: str | Option[str] = Nothing,
4171
+ chat_id: int | None = None,
4172
+ message_id: int | None = None,
4173
+ inline_message_id: str | None = None,
4223
4174
  **other: typing.Any,
4224
- ) -> Result[list[GameHighScore], "APIError"]:
4175
+ ) -> Result[list[GameHighScore], APIError]:
4225
4176
  """Method `getGameHighScores`, see the [documentation](https://core.telegram.org/bots/api#getgamehighscores)
4226
4177
 
4227
4178
  Use this method to get data for high score tables. Will return the score of