telegrinder 0.2.2__tar.gz → 0.3.0.post1__tar.gz

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 (166) hide show
  1. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/PKG-INFO +2 -2
  2. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/pyproject.toml +4 -2
  3. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/readme.md +1 -1
  4. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/__init__.py +24 -2
  5. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/__init__.py +16 -0
  6. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/callback_query.py +60 -146
  7. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/chat_join_request.py +12 -16
  8. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/chat_member_updated.py +14 -104
  9. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/inline_query.py +5 -14
  10. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/message.py +605 -1227
  11. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/__init__.py +22 -1
  12. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/abc.py +7 -0
  13. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/dispatch.py +7 -0
  14. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/__init__.py +28 -0
  15. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/actions.py +10 -0
  16. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +15 -0
  17. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +60 -0
  18. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +49 -0
  19. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/hasher/message.py +54 -0
  20. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/hasher/state.py +19 -0
  21. telegrinder-0.3.0.post1/telegrinder/bot/dispatch/waiter_machine/machine.py +176 -0
  22. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/waiter_machine/middleware.py +23 -35
  23. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/waiter_machine/short_state.py +9 -9
  24. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/scenario/checkbox.py +2 -2
  25. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/model.py +6 -4
  26. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/msgspec_json.py +1 -1
  27. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/msgspec_utils.py +51 -0
  28. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/event.py +2 -0
  29. telegrinder-0.3.0.post1/telegrinder/tools/functional.py +9 -0
  30. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/state_storage/memory.py +3 -3
  31. telegrinder-0.2.2/telegrinder/bot/dispatch/waiter_machine/__init__.py +0 -10
  32. telegrinder-0.2.2/telegrinder/bot/dispatch/waiter_machine/machine.py +0 -188
  33. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/LICENSE +0 -0
  34. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/api/__init__.py +0 -0
  35. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/api/api.py +0 -0
  36. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/api/error.py +0 -0
  37. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/api/response.py +0 -0
  38. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/api/token.py +0 -0
  39. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/bot.py +0 -0
  40. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/__init__.py +0 -0
  41. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/base.py +0 -0
  42. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/update.py +0 -0
  43. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/cute_types/utils.py +0 -0
  44. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/context.py +0 -0
  45. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/__init__.py +0 -0
  46. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/abc.py +0 -0
  47. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/audio_reply.py +0 -0
  48. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/base.py +0 -0
  49. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/document_reply.py +0 -0
  50. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/func.py +0 -0
  51. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/media_group_reply.py +0 -0
  52. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/message_reply.py +0 -0
  53. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/photo_reply.py +0 -0
  54. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/sticker_reply.py +0 -0
  55. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/handler/video_reply.py +0 -0
  56. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/middleware/__init__.py +0 -0
  57. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/middleware/abc.py +0 -0
  58. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/process.py +0 -0
  59. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
  60. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/return_manager/abc.py +0 -0
  61. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/return_manager/callback_query.py +0 -0
  62. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/return_manager/inline_query.py +0 -0
  63. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/return_manager/message.py +0 -0
  64. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/__init__.py +0 -0
  65. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/abc.py +0 -0
  66. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/base.py +0 -0
  67. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/box.py +0 -0
  68. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/callback_query.py +0 -0
  69. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/chat_join_request.py +0 -0
  70. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/chat_member.py +0 -0
  71. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/inline_query.py +0 -0
  72. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/message.py +0 -0
  73. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/dispatch/view/raw.py +0 -0
  74. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/polling/__init__.py +0 -0
  75. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/polling/abc.py +0 -0
  76. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/polling/polling.py +0 -0
  77. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/__init__.py +0 -0
  78. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/abc.py +0 -0
  79. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/adapter/__init__.py +0 -0
  80. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/adapter/abc.py +0 -0
  81. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/adapter/errors.py +0 -0
  82. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/adapter/event.py +0 -0
  83. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/adapter/node.py +0 -0
  84. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/adapter/raw_update.py +0 -0
  85. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/callback_data.py +0 -0
  86. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/chat_join.py +0 -0
  87. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/command.py +0 -0
  88. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/enum_text.py +0 -0
  89. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/func.py +0 -0
  90. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/fuzzy.py +0 -0
  91. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/inline.py +0 -0
  92. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/integer.py +0 -0
  93. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/is_from.py +0 -0
  94. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/markup.py +0 -0
  95. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/mention.py +0 -0
  96. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/message.py +0 -0
  97. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/message_entities.py +0 -0
  98. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/node.py +0 -0
  99. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/regex.py +0 -0
  100. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/rule_enum.py +0 -0
  101. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/start.py +0 -0
  102. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/state.py +0 -0
  103. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/text.py +0 -0
  104. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/rules/update.py +0 -0
  105. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/scenario/__init__.py +0 -0
  106. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/scenario/abc.py +0 -0
  107. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/bot/scenario/choice.py +0 -0
  108. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/client/__init__.py +0 -0
  109. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/client/abc.py +0 -0
  110. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/client/aiohttp.py +0 -0
  111. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/modules.py +0 -0
  112. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/__init__.py +0 -0
  113. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/attachment.py +0 -0
  114. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/base.py +0 -0
  115. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/callback_query.py +0 -0
  116. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/command.py +0 -0
  117. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/composer.py +0 -0
  118. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/container.py +0 -0
  119. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/me.py +0 -0
  120. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/message.py +0 -0
  121. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/polymorphic.py +0 -0
  122. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/rule.py +0 -0
  123. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/scope.py +0 -0
  124. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/source.py +0 -0
  125. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/text.py +0 -0
  126. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/tools/__init__.py +0 -0
  127. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/tools/generator.py +0 -0
  128. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/node/update.py +0 -0
  129. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/py.typed +0 -0
  130. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/rules.py +0 -0
  131. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/__init__.py +0 -0
  132. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/buttons.py +0 -0
  133. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/error_handler/__init__.py +0 -0
  134. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/error_handler/abc.py +0 -0
  135. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/error_handler/error.py +0 -0
  136. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/error_handler/error_handler.py +0 -0
  137. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/formatting/__init__.py +0 -0
  138. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/formatting/html.py +0 -0
  139. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/formatting/links.py +0 -0
  140. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/formatting/spec_html_formats.py +0 -0
  141. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/global_context/__init__.py +0 -0
  142. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/global_context/abc.py +0 -0
  143. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/global_context/global_context.py +0 -0
  144. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/global_context/telegrinder_ctx.py +0 -0
  145. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/i18n/__init__.py +0 -0
  146. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/i18n/base.py +0 -0
  147. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/i18n/middleware/__init__.py +0 -0
  148. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/i18n/middleware/base.py +0 -0
  149. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/i18n/simple.py +0 -0
  150. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/kb_set/__init__.py +0 -0
  151. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/kb_set/base.py +0 -0
  152. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/kb_set/yaml.py +0 -0
  153. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/keyboard.py +0 -0
  154. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/limited_dict.py +0 -0
  155. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/loop_wrapper/__init__.py +0 -0
  156. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/loop_wrapper/abc.py +0 -0
  157. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -0
  158. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/magic.py +0 -0
  159. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/parse_mode.py +0 -0
  160. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/state_storage/__init__.py +0 -0
  161. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/tools/state_storage/abc.py +0 -0
  162. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/types/__init__.py +0 -0
  163. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/types/enums.py +0 -0
  164. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/types/methods.py +0 -0
  165. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/types/objects.py +0 -0
  166. {telegrinder-0.2.2 → telegrinder-0.3.0.post1}/telegrinder/verification_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: telegrinder
3
- Version: 0.2.2
3
+ Version: 0.3.0.post1
4
4
  Summary: Modern visionary telegram bot framework.
5
5
  Home-page: https://github.com/timoniq/telegrinder
6
6
  License: MIT
@@ -43,7 +43,7 @@ Still in development.
43
43
  * Type hinted
44
44
  * Customizable and extensible
45
45
  * Ready to use scenarios and rules
46
- * Fast models built on msgspec
46
+ * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
47
47
  * Both low-level and high-level API
48
48
  * Support [optional dependecies](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
49
49
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "telegrinder"
3
- version = "0.2.2"
3
+ version = "0.3.0.post1"
4
4
  description = "Modern visionary telegram bot framework."
5
5
  authors = ["timoniq <tesseradecades@mail.ru>"]
6
6
  maintainers = ["luwqz1 <howluwqz1@gmail.com>"]
@@ -56,7 +56,8 @@ fntypes = "^0.1.3"
56
56
  pre-commit = "^3.8.0"
57
57
  ruff = ">=0.5,<0.7"
58
58
  basedpyright = "^1.12.1"
59
- sort-all = "1.2.0"
59
+ sort-all = "^1.2.0"
60
+ libcst = "^1.4.0"
60
61
  pytest = "^8.0.0"
61
62
  pytest-asyncio = ">=0.23.5,<0.25.0"
62
63
  pytest-cov = "^5.0.0"
@@ -81,6 +82,7 @@ asyncio_mode = "auto"
81
82
 
82
83
  [tool.ruff.lint.per-file-ignores]
83
84
  "__init__.py" = ["F401", "F403"]
85
+ "typegen/**.py" = ["N802"]
84
86
 
85
87
  [tool.ruff.lint.flake8-quotes]
86
88
  docstring-quotes = "double"
@@ -7,7 +7,7 @@ Still in development.
7
7
  * Type hinted
8
8
  * Customizable and extensible
9
9
  * Ready to use scenarios and rules
10
- * Fast models built on msgspec
10
+ * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
11
11
  * Both low-level and high-level API
12
12
  * Support [optional dependecies](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
13
13
 
@@ -5,7 +5,7 @@ Modern visionary telegram bot framework.
5
5
  * Type hinted
6
6
  * Customizable and extensible
7
7
  * Ready to use scenarios and rules
8
- * Fast models built on msgspec
8
+ * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
9
9
  * Both low-level and high-level API
10
10
  * Support [optional dependecies](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
11
11
 
@@ -35,6 +35,12 @@ import typing
35
35
 
36
36
  from .api import API, APIError, APIResponse, Token
37
37
  from .bot import (
38
+ CALLBACK_QUERY_FOR_MESSAGE,
39
+ CALLBACK_QUERY_FROM_CHAT,
40
+ CALLBACK_QUERY_IN_CHAT_FOR_MESSAGE,
41
+ MESSAGE_FROM_USER,
42
+ MESSAGE_FROM_USER_IN_CHAT,
43
+ MESSAGE_IN_CHAT,
38
44
  ABCDispatch,
39
45
  ABCHandler,
40
46
  ABCMiddleware,
@@ -64,6 +70,7 @@ from .bot import (
64
70
  Dispatch,
65
71
  DocumentReplyHandler,
66
72
  FuncHandler,
73
+ Hasher,
67
74
  InlineQueryCute,
68
75
  InlineQueryReturnManager,
69
76
  InlineQueryRule,
@@ -77,6 +84,7 @@ from .bot import (
77
84
  Polling,
78
85
  RawEventView,
79
86
  ShortState,
87
+ StateViewHasher,
80
88
  StickerReplyHandler,
81
89
  Telegrinder,
82
90
  UpdateCute,
@@ -144,6 +152,7 @@ __all__ = (
144
152
  "ABCRule",
145
153
  "ABCScenario",
146
154
  "ABCStateStorage",
155
+ "ABCStateStorage",
147
156
  "ABCStateView",
148
157
  "ABCTranslator",
149
158
  "ABCTranslatorMiddleware",
@@ -153,12 +162,16 @@ __all__ = (
153
162
  "APIResponse",
154
163
  "AiohttpClient",
155
164
  "AnyMarkup",
165
+ "AudioReplyHandler",
156
166
  "BaseCute",
157
167
  "BaseReturnManager",
158
168
  "BaseStateView",
159
169
  "BaseView",
160
170
  "Bot",
161
171
  "Button",
172
+ "CALLBACK_QUERY_FOR_MESSAGE",
173
+ "CALLBACK_QUERY_FROM_CHAT",
174
+ "CALLBACK_QUERY_IN_CHAT_FOR_MESSAGE",
162
175
  "CallbackQuery",
163
176
  "CallbackQueryCute",
164
177
  "CallbackQueryReturnManager",
@@ -171,8 +184,10 @@ __all__ = (
171
184
  "ChatMemberUpdated",
172
185
  "ChatMemberUpdatedCute",
173
186
  "ChatMemberView",
187
+ "DocumentReplyHandler",
174
188
  "Checkbox",
175
189
  "Choice",
190
+ "Context",
176
191
  "CtxVar",
177
192
  "DelayedTask",
178
193
  "Dispatch",
@@ -181,6 +196,7 @@ __all__ = (
181
196
  "FuncHandler",
182
197
  "GlobalContext",
183
198
  "HTMLFormatter",
199
+ "Hasher",
184
200
  "I18nEnum",
185
201
  "InlineButton",
186
202
  "InlineKeyboard",
@@ -193,8 +209,12 @@ __all__ = (
193
209
  "KeyboardSetYAML",
194
210
  "Lifespan",
195
211
  "LoopWrapper",
212
+ "MESSAGE_FROM_USER",
213
+ "MESSAGE_FROM_USER_IN_CHAT",
214
+ "MESSAGE_IN_CHAT",
196
215
  "MediaGroupReplyHandler",
197
216
  "MemoryStateStorage",
217
+ "MemoryStateStorage",
198
218
  "Message",
199
219
  "MessageCute",
200
220
  "MessageReplyHandler",
@@ -212,7 +232,10 @@ __all__ = (
212
232
  "SimpleI18n",
213
233
  "SimpleTranslator",
214
234
  "StateData",
235
+ "StateData",
236
+ "StateMeta",
215
237
  "StateMeta",
238
+ "StateViewHasher",
216
239
  "StickerReplyHandler",
217
240
  "Telegrinder",
218
241
  "Token",
@@ -225,5 +248,4 @@ __all__ = (
225
248
  "logger",
226
249
  "magic_bundle",
227
250
  "register_manager",
228
- "Context",
229
251
  )
@@ -9,6 +9,12 @@ from telegrinder.bot.cute_types import (
9
9
  UpdateCute,
10
10
  )
11
11
  from telegrinder.bot.dispatch import (
12
+ CALLBACK_QUERY_FOR_MESSAGE,
13
+ CALLBACK_QUERY_FROM_CHAT,
14
+ CALLBACK_QUERY_IN_CHAT_FOR_MESSAGE,
15
+ MESSAGE_FROM_USER,
16
+ MESSAGE_FROM_USER_IN_CHAT,
17
+ MESSAGE_IN_CHAT,
12
18
  ABCDispatch,
13
19
  ABCHandler,
14
20
  ABCMiddleware,
@@ -27,6 +33,7 @@ from telegrinder.bot.dispatch import (
27
33
  Dispatch,
28
34
  DocumentReplyHandler,
29
35
  FuncHandler,
36
+ Hasher,
30
37
  InlineQueryReturnManager,
31
38
  Manager,
32
39
  MediaGroupReplyHandler,
@@ -36,6 +43,7 @@ from telegrinder.bot.dispatch import (
36
43
  PhotoReplyHandler,
37
44
  RawEventView,
38
45
  ShortState,
46
+ StateViewHasher,
39
47
  StickerReplyHandler,
40
48
  VideoReplyHandler,
41
49
  ViewBox,
@@ -68,6 +76,9 @@ __all__ = (
68
76
  "BaseReturnManager",
69
77
  "BaseStateView",
70
78
  "BaseView",
79
+ "CALLBACK_QUERY_FOR_MESSAGE",
80
+ "CALLBACK_QUERY_FROM_CHAT",
81
+ "CALLBACK_QUERY_IN_CHAT_FOR_MESSAGE",
71
82
  "CallbackQueryCute",
72
83
  "CallbackQueryReturnManager",
73
84
  "CallbackQueryRule",
@@ -83,9 +94,13 @@ __all__ = (
83
94
  "Dispatch",
84
95
  "DocumentReplyHandler",
85
96
  "FuncHandler",
97
+ "Hasher",
86
98
  "InlineQueryCute",
87
99
  "InlineQueryReturnManager",
88
100
  "InlineQueryRule",
101
+ "MESSAGE_FROM_USER",
102
+ "MESSAGE_FROM_USER_IN_CHAT",
103
+ "MESSAGE_IN_CHAT",
89
104
  "Manager",
90
105
  "MediaGroupReplyHandler",
91
106
  "MessageCute",
@@ -97,6 +112,7 @@ __all__ = (
97
112
  "Polling",
98
113
  "RawEventView",
99
114
  "ShortState",
115
+ "StateViewHasher",
100
116
  "StickerReplyHandler",
101
117
  "Telegrinder",
102
118
  "UpdateCute",
@@ -100,25 +100,7 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
100
100
 
101
101
  Use this method to send answers to callback queries sent from inline keyboards.
102
102
  The answer will be displayed to the user as a notification at the top of the
103
- chat screen or as an alert. On success, True is returned.
104
-
105
- :param callback_query_id: Unique identifier for the query to be answered.
106
-
107
- :param text: Text of the notification. If not specified, nothing will be shown to the \
108
- user, 0-200 characters.
109
-
110
- :param show_alert: If True, an alert will be shown by the client instead of a notification at \
111
- the top of the chat screen. Defaults to false.
112
-
113
- :param url: URL that will be opened by the user's client. If you have created a Game and \
114
- accepted the conditions via @BotFather, specify the URL that opens your \
115
- game - note that this will only work if the query comes from a callback_game \
116
- button. Otherwise, you may use links like t.me/your_bot?start=XXXX that \
117
- open your bot with a parameter.
118
-
119
- :param cache_time: The maximum amount of time in seconds that the result of the callback query \
120
- may be cached client-side. Telegram apps will support caching starting \
121
- in version 3.14. Defaults to 0."""
103
+ chat screen or as an alert. On success, True is returned."""
122
104
 
123
105
  params = compose_method_params(
124
106
  get_params(locals()), self, default_params={("callback_query_id", "id")}
@@ -149,47 +131,17 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
149
131
  protect_content: bool | None = None,
150
132
  reply_parameters: ReplyParameters | dict[str, typing.Any] | None = None,
151
133
  reply_markup: ReplyMarkup | None = None,
134
+ show_caption_above_media: bool | None = None,
152
135
  **other: typing.Any,
153
136
  ) -> Result[MessageId, APIError]:
154
137
  """Shortcut `API.copy_message()`, see the [documentation](https://core.telegram.org/bots/api#copymessage)
155
138
 
156
- Use this method to copy messages of any kind. Service messages, giveaway
157
- messages, giveaway winners messages, and invoice messages can't be copied.
158
- A quiz poll can be copied only if the value of the field correct_option_id
159
- is known to the bot. The method is analogous to the method forwardMessage,
160
- but the copied message doesn't have a link to the original message. Returns
161
- the MessageId of the sent message on success.
162
-
163
- :param chat_id: Unique identifier for the target chat or username of the target channel \
164
- (in the format @channelusername).
165
-
166
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
167
- forum supergroups only.
168
-
169
- :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel \
170
- username in the format @channelusername).
171
-
172
- :param message_id: Message identifier in the chat specified in from_chat_id.
173
-
174
- :param caption: New caption for media, 0-1024 characters after entities parsing. If not \
175
- specified, the original caption is kept.
176
-
177
- :param parse_mode: Mode for parsing entities in the new caption. See formatting options for \
178
- more details.
179
-
180
- :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, \
181
- which can be specified instead of parse_mode.
182
-
183
- :param disable_notification: Sends the message silently. Users will receive a notification with no sound. \
184
-
185
- :param protect_content: Protects the contents of the sent message from forwarding and saving.
186
-
187
- :param reply_parameters: Description of the message to reply to.
188
-
189
- :param reply_markup: Additional interface options. A JSON-serialized object for an inline \
190
- keyboard, custom reply keyboard, instructions to remove reply keyboard \
191
- or to force a reply from the user.
192
- """
139
+ Use this method to copy messages of any kind. Service messages, paid media
140
+ messages, giveaway messages, giveaway winners messages, and invoice
141
+ messages can't be copied. A quiz poll can be copied only if the value of the
142
+ field correct_option_id is known to the bot. The method is analogous to
143
+ the method forwardMessage, but the copied message doesn't have a link to
144
+ the original message. Returns the MessageId of the sent message on success."""
193
145
 
194
146
  return await MessageCute.copy(self, **get_params(locals())) # type: ignore
195
147
 
@@ -213,15 +165,7 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
213
165
  can delete outgoing messages in channels. - If the bot is an administrator
214
166
  of a group, it can delete any message there. - If the bot has can_delete_messages
215
167
  permission in a supergroup or a channel, it can delete any message there.
216
- Returns True on success.
217
-
218
- :param chat_id: Unique identifier for the target chat or username of the target channel \
219
- (in the format @channelusername).
220
-
221
- :param message_id: Identifier of the message to delete.
222
-
223
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
224
- forum supergroups only."""
168
+ Returns True on success."""
225
169
 
226
170
  return await MessageCute.delete(self, **get_params(locals())) # type: ignore
227
171
 
@@ -233,7 +177,7 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
233
177
  async def edit_text(
234
178
  self,
235
179
  text: str,
236
- inline_message_id: int | None = None,
180
+ inline_message_id: str | None = None,
237
181
  chat_id: int | str | None = None,
238
182
  message_id: int | None = None,
239
183
  message_thread_id: int | None = None,
@@ -241,33 +185,28 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
241
185
  entities: list[MessageEntity] | None = None,
242
186
  link_preview_options: LinkPreviewOptions | dict[str, typing.Any] | None = None,
243
187
  reply_markup: InlineKeyboardMarkup | None = None,
188
+ business_connection_id: str | None = None,
244
189
  **other: typing.Any,
245
190
  ) -> Result[Variative[MessageCute, bool], APIError]:
246
191
  """Shortcut `API.edit_message_text()`, see the [documentation](https://core.telegram.org/bots/api#editmessagetext)
247
192
 
248
193
  Use this method to edit text and game messages. On success, if the edited
249
194
  message is not an inline message, the edited Message is returned, otherwise
250
- True is returned.
251
-
252
- :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the \
253
- inline message.
254
-
255
- :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
256
- the target chat or username of the target channel (in the format @channelusername). \
195
+ True is returned. Note that business messages that were not sent by the bot
196
+ and do not contain an inline keyboard can only be edited within 48 hours from
197
+ the time they were sent.
198
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the messageto be edited was sent.
257
199
 
258
- :param message_id: Required if inline_message_id is not specified. Identifier of the message \
259
- to edit.
200
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier forthe target chat or username of the target channel (in the format @channelusername).
201
+ :param message_id: Required if inline_message_id is not specified. Identifier of the messageto edit.
260
202
 
261
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
262
- forum supergroups only.
203
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of theinline message.
263
204
 
264
205
  :param text: New text of the message, 1-4096 characters after entities parsing.
265
206
 
266
- :param parse_mode: Mode for parsing entities in the message text. See formatting options for \
267
- more details.
207
+ :param parse_mode: Mode for parsing entities in the message text. See formatting options formore details.
268
208
 
269
- :param entities: A JSON-serialized list of special entities that appear in message text, \
270
- which can be specified instead of parse_mode.
209
+ :param entities: A JSON-serialized list of special entities that appear in message text,which can be specified instead of parse_mode.
271
210
 
272
211
  :param link_preview_options: Link preview generation options for the message.
273
212
 
@@ -292,6 +231,8 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
292
231
  heading: int | None = None,
293
232
  proximity_alert_radius: int | None = None,
294
233
  reply_markup: InlineKeyboardMarkup | None = None,
234
+ business_connection_id: str | None = None,
235
+ live_period: int | None = None,
295
236
  **other: typing.Any,
296
237
  ) -> Result[Variative[MessageCute, bool], APIError]:
297
238
  """Shortcut `API.edit_message_live_location()`, see the [documentation](https://core.telegram.org/bots/api#editmessagelivelocation)
@@ -300,30 +241,23 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
300
241
  until its live_period expires or editing is explicitly disabled by a call
301
242
  to stopMessageLiveLocation. On success, if the edited message is not an
302
243
  inline message, the edited Message is returned, otherwise True is returned.
244
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the messageto be edited was sent.
303
245
 
304
- :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the \
305
- inline message.
246
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier forthe target chat or username of the target channel (in the format @channelusername).
247
+ :param message_id: Required if inline_message_id is not specified. Identifier of the messageto edit.
306
248
 
307
- :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
308
- the target chat or username of the target channel (in the format @channelusername). \
309
-
310
- :param message_id: Required if inline_message_id is not specified. Identifier of the message \
311
- to edit.
312
-
313
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
314
- forum supergroups only.
249
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of theinline message.
315
250
 
316
251
  :param latitude: Latitude of new location.
317
252
 
318
253
  :param longitude: Longitude of new location.
319
254
 
320
- :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500. \
255
+ :param live_period: New period in seconds during which the location can be updated, startingfrom the message send date. If 0x7FFFFFFF is specified, then the locationcan be updated forever. Otherwise, the new value must not exceed the currentlive_period by more than a day, and the live location expiration date mustremain within the next 90 days. If not specified, then live_period remainsunchanged.
321
256
 
322
- :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 \
323
- if specified.
257
+ :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500.
258
+ :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360if specified.
324
259
 
325
- :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat \
326
- member, in meters. Must be between 1 and 100000 if specified.
260
+ :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chatmember, in meters. Must be between 1 and 100000 if specified.
327
261
 
328
262
  :param reply_markup: A JSON-serialized object for a new inline keyboard."""
329
263
 
@@ -336,7 +270,7 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
336
270
  )
337
271
  async def edit_caption(
338
272
  self,
339
- caption: str,
273
+ caption: str | None = None,
340
274
  chat_id: int | str | None = None,
341
275
  message_id: int | None = None,
342
276
  message_thread_id: int | None = None,
@@ -344,33 +278,30 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
344
278
  parse_mode: str | None = None,
345
279
  caption_entities: list[MessageEntity] | None = None,
346
280
  reply_markup: InlineKeyboardMarkup | None = None,
281
+ business_connection_id: str | None = None,
282
+ show_caption_above_media: bool | None = None,
347
283
  **other: typing.Any,
348
284
  ) -> Result[Variative[MessageCute, bool], APIError]:
349
285
  """Shortcut `API.edit_message_caption()`, see the [documentation](https://core.telegram.org/bots/api#editmessagecaption)
350
286
 
351
287
  Use this method to edit captions of messages. On success, if the edited message
352
288
  is not an inline message, the edited Message is returned, otherwise True
353
- is returned.
354
-
355
- :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
356
- the target chat or username of the target channel (in the format @channelusername). \
289
+ is returned. Note that business messages that were not sent by the bot and
290
+ do not contain an inline keyboard can only be edited within 48 hours from
291
+ the time they were sent.
292
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the messageto be edited was sent.
357
293
 
358
- :param message_id: Required if inline_message_id is not specified. Identifier of the message \
359
- to edit.
294
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier forthe target chat or username of the target channel (in the format @channelusername).
295
+ :param message_id: Required if inline_message_id is not specified. Identifier of the messageto edit.
360
296
 
361
- :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the \
362
- inline message.
297
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of theinline message.
363
298
 
364
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
365
- forum supergroups only.
299
+ :param caption: New caption of the message, 0-1024 characters after entities parsing.
300
+ :param parse_mode: Mode for parsing entities in the message caption. See formatting optionsfor more details.
366
301
 
367
- :param caption: New caption of the message, 0-1024 characters after entities parsing. \
302
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption,which can be specified instead of parse_mode.
368
303
 
369
- :param parse_mode: Mode for parsing entities in the message caption. See formatting options \
370
- for more details.
371
-
372
- :param caption_entities: A JSON-serialized list of special entities that appear in the caption, \
373
- which can be specified instead of parse_mode.
304
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supportedonly for animation, photo and video messages.
374
305
 
375
306
  :param reply_markup: A JSON-serialized object for an inline keyboard."""
376
307
 
@@ -399,6 +330,7 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
399
330
  message_id: int | None = None,
400
331
  message_thread_id: int | None = None,
401
332
  reply_markup: InlineKeyboardMarkup | None = None,
333
+ business_connection_id: str | None = None,
402
334
  **other: typing.Any,
403
335
  ) -> Result[Variative[MessageCute, bool], APIError]:
404
336
  """Shortcut `API.edit_message_media()`, see the [documentation](https://core.telegram.org/bots/api#editmessagemedia)
@@ -409,33 +341,18 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
409
341
  a video otherwise. When an inline message is edited, a new file can't be uploaded;
410
342
  use a previously uploaded file via its file_id or specify a URL. On success,
411
343
  if the edited message is not an inline message, the edited Message is returned,
412
- otherwise True is returned.
413
-
414
- :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
415
- the target chat or username of the target channel (in the format @channelusername). \
416
-
417
- :param message_id: Required if inline_message_id is not specified. Identifier of the message \
418
- to edit.
344
+ otherwise True is returned. Note that business messages that were not sent
345
+ by the bot and do not contain an inline keyboard can only be edited within
346
+ 48 hours from the time they were sent.
347
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the messageto be edited was sent.
419
348
 
420
- :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the \
421
- inline message.
349
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier forthe target chat or username of the target channel (in the format @channelusername).
350
+ :param message_id: Required if inline_message_id is not specified. Identifier of the messageto edit.
422
351
 
423
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
424
- forum supergroups only.
352
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of theinline message.
425
353
 
426
354
  :param media: A JSON-serialized object for a new media content of the message.
427
355
 
428
- :param caption: Audio caption, 0-1024 characters after entities parsing.
429
-
430
- :param parse_mode: Mode for parsing entities in the audio caption. See formatting options \
431
- for more details.
432
-
433
- :param caption_entities: A JSON-serialized list of special entities that appear in the caption, \
434
- which can be specified instead of parse_mode.
435
-
436
- :param type: Required if media is not an `str | InputMedia` object. Type of the media, \
437
- must be one of `photo`, `video`, `animation`, `audio`, `document`.
438
-
439
356
  :param reply_markup: A JSON-serialized object for a new inline keyboard."""
440
357
 
441
358
  return await MessageCute.edit_media(self, **get_params(locals())) # type: ignore
@@ -452,25 +369,22 @@ class CallbackQueryCute(BaseCute[CallbackQuery], CallbackQuery, kw_only=True):
452
369
  message_thread_id: int | None = None,
453
370
  chat_id: int | str | None = None,
454
371
  reply_markup: InlineKeyboardMarkup | None = None,
372
+ business_connection_id: str | None = None,
455
373
  **other: typing.Any,
456
374
  ) -> Result[Variative[MessageCute, bool], APIError]:
457
375
  """Shortcut `API.edit_message_reply_markup()`, see the [documentation](https://core.telegram.org/bots/api#editmessagereplymarkup)
458
376
 
459
377
  Use this method to edit only the reply markup of messages. On success, if
460
378
  the edited message is not an inline message, the edited Message is returned,
461
- otherwise True is returned.
462
-
463
- :param chat_id: Required if inline_message_id is not specified. Unique identifier for \
464
- the target chat or username of the target channel (in the format @channelusername). \
465
-
466
- :param message_id: Required if inline_message_id is not specified. Identifier of the message \
467
- to edit.
379
+ otherwise True is returned. Note that business messages that were not sent
380
+ by the bot and do not contain an inline keyboard can only be edited within
381
+ 48 hours from the time they were sent.
382
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the messageto be edited was sent.
468
383
 
469
- :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for \
470
- forum supergroups only.
384
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier forthe target chat or username of the target channel (in the format @channelusername).
385
+ :param message_id: Required if inline_message_id is not specified. Identifier of the messageto edit.
471
386
 
472
- :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the \
473
- inline message.
387
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of theinline message.
474
388
 
475
389
  :param reply_markup: A JSON-serialized object for an inline keyboard."""
476
390
 
@@ -19,7 +19,11 @@ class ChatJoinRequestCute(BaseCute[ChatJoinRequest], ChatJoinRequest, ChatMember
19
19
  def user_id(self) -> int:
20
20
  return self.from_user.id
21
21
 
22
- @shortcut("approve_chat_join_request", executor=chat_member_interaction)
22
+ @shortcut(
23
+ "approve_chat_join_request",
24
+ executor=chat_member_interaction,
25
+ custom_params={"chat_id", "user_id"},
26
+ )
23
27
  async def approve(
24
28
  self,
25
29
  chat_id: int | str | None = None,
@@ -30,17 +34,15 @@ class ChatJoinRequestCute(BaseCute[ChatJoinRequest], ChatJoinRequest, ChatMember
30
34
 
31
35
  Use this method to approve a chat join request. The bot must be an administrator
32
36
  in the chat for this to work and must have the can_invite_users administrator
33
- right. Returns True on success.
34
-
35
- :param chat_id: Unique identifier for the target chat or username of the target channel \
36
- (in the format @channelusername).
37
-
38
- :param user_id: Unique identifier of the target user.
39
- """
37
+ right. Returns True on success."""
40
38
 
41
39
  ...
42
40
 
43
- @shortcut("decline_chat_join_request", executor=chat_member_interaction)
41
+ @shortcut(
42
+ "decline_chat_join_request",
43
+ executor=chat_member_interaction,
44
+ custom_params={"chat_id", "user_id"},
45
+ )
44
46
  async def decline(
45
47
  self,
46
48
  chat_id: int | str | None = None,
@@ -51,13 +53,7 @@ class ChatJoinRequestCute(BaseCute[ChatJoinRequest], ChatJoinRequest, ChatMember
51
53
 
52
54
  Use this method to decline a chat join request. The bot must be an administrator
53
55
  in the chat for this to work and must have the can_invite_users administrator
54
- right. Returns True on success.
55
-
56
- :param chat_id: Unique identifier for the target chat or username of the target channel \
57
- (in the format @channelusername).
58
-
59
- :param user_id: Unique identifier of the target user.
60
- """
56
+ right. Returns True on success."""
61
57
 
62
58
  ...
63
59