telegrinder 1.0.0rc1__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.
Files changed (215) hide show
  1. telegrinder/__init__.py +258 -0
  2. telegrinder/__meta__.py +1 -0
  3. telegrinder/api/__init__.py +15 -0
  4. telegrinder/api/api.py +175 -0
  5. telegrinder/api/error.py +50 -0
  6. telegrinder/api/response.py +23 -0
  7. telegrinder/api/token.py +30 -0
  8. telegrinder/api/validators.py +30 -0
  9. telegrinder/bot/__init__.py +144 -0
  10. telegrinder/bot/bot.py +70 -0
  11. telegrinder/bot/cute_types/__init__.py +41 -0
  12. telegrinder/bot/cute_types/base.py +228 -0
  13. telegrinder/bot/cute_types/base.pyi +49 -0
  14. telegrinder/bot/cute_types/business_connection.py +9 -0
  15. telegrinder/bot/cute_types/business_messages_deleted.py +9 -0
  16. telegrinder/bot/cute_types/callback_query.py +248 -0
  17. telegrinder/bot/cute_types/chat_boost_removed.py +9 -0
  18. telegrinder/bot/cute_types/chat_boost_updated.py +9 -0
  19. telegrinder/bot/cute_types/chat_join_request.py +59 -0
  20. telegrinder/bot/cute_types/chat_member_updated.py +158 -0
  21. telegrinder/bot/cute_types/chosen_inline_result.py +11 -0
  22. telegrinder/bot/cute_types/inline_query.py +41 -0
  23. telegrinder/bot/cute_types/message.py +2809 -0
  24. telegrinder/bot/cute_types/message_reaction_count_updated.py +9 -0
  25. telegrinder/bot/cute_types/message_reaction_updated.py +9 -0
  26. telegrinder/bot/cute_types/paid_media_purchased.py +11 -0
  27. telegrinder/bot/cute_types/poll.py +9 -0
  28. telegrinder/bot/cute_types/poll_answer.py +9 -0
  29. telegrinder/bot/cute_types/pre_checkout_query.py +36 -0
  30. telegrinder/bot/cute_types/shipping_query.py +11 -0
  31. telegrinder/bot/cute_types/update.py +209 -0
  32. telegrinder/bot/cute_types/utils.py +141 -0
  33. telegrinder/bot/dispatch/__init__.py +99 -0
  34. telegrinder/bot/dispatch/abc.py +74 -0
  35. telegrinder/bot/dispatch/action.py +99 -0
  36. telegrinder/bot/dispatch/context.py +162 -0
  37. telegrinder/bot/dispatch/dispatch.py +362 -0
  38. telegrinder/bot/dispatch/handler/__init__.py +23 -0
  39. telegrinder/bot/dispatch/handler/abc.py +25 -0
  40. telegrinder/bot/dispatch/handler/audio_reply.py +43 -0
  41. telegrinder/bot/dispatch/handler/base.py +34 -0
  42. telegrinder/bot/dispatch/handler/document_reply.py +43 -0
  43. telegrinder/bot/dispatch/handler/func.py +73 -0
  44. telegrinder/bot/dispatch/handler/media_group_reply.py +43 -0
  45. telegrinder/bot/dispatch/handler/message_reply.py +35 -0
  46. telegrinder/bot/dispatch/handler/photo_reply.py +43 -0
  47. telegrinder/bot/dispatch/handler/sticker_reply.py +36 -0
  48. telegrinder/bot/dispatch/handler/video_reply.py +43 -0
  49. telegrinder/bot/dispatch/middleware/__init__.py +13 -0
  50. telegrinder/bot/dispatch/middleware/abc.py +112 -0
  51. telegrinder/bot/dispatch/middleware/box.py +32 -0
  52. telegrinder/bot/dispatch/middleware/filter.py +88 -0
  53. telegrinder/bot/dispatch/middleware/media_group.py +69 -0
  54. telegrinder/bot/dispatch/process.py +93 -0
  55. telegrinder/bot/dispatch/return_manager/__init__.py +21 -0
  56. telegrinder/bot/dispatch/return_manager/abc.py +107 -0
  57. telegrinder/bot/dispatch/return_manager/callback_query.py +19 -0
  58. telegrinder/bot/dispatch/return_manager/inline_query.py +14 -0
  59. telegrinder/bot/dispatch/return_manager/message.py +34 -0
  60. telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +19 -0
  61. telegrinder/bot/dispatch/return_manager/utils.py +20 -0
  62. telegrinder/bot/dispatch/router/__init__.py +4 -0
  63. telegrinder/bot/dispatch/router/abc.py +15 -0
  64. telegrinder/bot/dispatch/router/base.py +154 -0
  65. telegrinder/bot/dispatch/view/__init__.py +15 -0
  66. telegrinder/bot/dispatch/view/abc.py +15 -0
  67. telegrinder/bot/dispatch/view/base.py +226 -0
  68. telegrinder/bot/dispatch/view/box.py +207 -0
  69. telegrinder/bot/dispatch/view/media_group.py +25 -0
  70. telegrinder/bot/dispatch/waiter_machine/__init__.py +25 -0
  71. telegrinder/bot/dispatch/waiter_machine/actions.py +16 -0
  72. telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +13 -0
  73. telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +53 -0
  74. telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +61 -0
  75. telegrinder/bot/dispatch/waiter_machine/hasher/message.py +49 -0
  76. telegrinder/bot/dispatch/waiter_machine/machine.py +264 -0
  77. telegrinder/bot/dispatch/waiter_machine/middleware.py +77 -0
  78. telegrinder/bot/dispatch/waiter_machine/short_state.py +105 -0
  79. telegrinder/bot/polling/__init__.py +4 -0
  80. telegrinder/bot/polling/abc.py +25 -0
  81. telegrinder/bot/polling/error_handler.py +93 -0
  82. telegrinder/bot/polling/polling.py +167 -0
  83. telegrinder/bot/polling/utils.py +12 -0
  84. telegrinder/bot/rules/__init__.py +166 -0
  85. telegrinder/bot/rules/abc.py +150 -0
  86. telegrinder/bot/rules/button.py +20 -0
  87. telegrinder/bot/rules/callback_data.py +109 -0
  88. telegrinder/bot/rules/chat_join.py +28 -0
  89. telegrinder/bot/rules/chat_member_updated.py +145 -0
  90. telegrinder/bot/rules/command.py +137 -0
  91. telegrinder/bot/rules/enum_text.py +29 -0
  92. telegrinder/bot/rules/func.py +21 -0
  93. telegrinder/bot/rules/fuzzy.py +21 -0
  94. telegrinder/bot/rules/inline.py +45 -0
  95. telegrinder/bot/rules/integer.py +19 -0
  96. telegrinder/bot/rules/is_from.py +213 -0
  97. telegrinder/bot/rules/logic.py +22 -0
  98. telegrinder/bot/rules/magic.py +60 -0
  99. telegrinder/bot/rules/markup.py +51 -0
  100. telegrinder/bot/rules/media.py +13 -0
  101. telegrinder/bot/rules/mention.py +15 -0
  102. telegrinder/bot/rules/message_entities.py +37 -0
  103. telegrinder/bot/rules/node.py +43 -0
  104. telegrinder/bot/rules/payload.py +89 -0
  105. telegrinder/bot/rules/payment_invoice.py +14 -0
  106. telegrinder/bot/rules/regex.py +34 -0
  107. telegrinder/bot/rules/rule_enum.py +71 -0
  108. telegrinder/bot/rules/start.py +73 -0
  109. telegrinder/bot/rules/state.py +35 -0
  110. telegrinder/bot/rules/text.py +27 -0
  111. telegrinder/bot/rules/update.py +14 -0
  112. telegrinder/bot/scenario/__init__.py +5 -0
  113. telegrinder/bot/scenario/abc.py +16 -0
  114. telegrinder/bot/scenario/checkbox.py +183 -0
  115. telegrinder/bot/scenario/choice.py +44 -0
  116. telegrinder/client/__init__.py +11 -0
  117. telegrinder/client/abc.py +136 -0
  118. telegrinder/client/form_data.py +34 -0
  119. telegrinder/client/rnet.py +198 -0
  120. telegrinder/model.py +133 -0
  121. telegrinder/model.pyi +57 -0
  122. telegrinder/modules.py +1081 -0
  123. telegrinder/msgspec_utils/__init__.py +42 -0
  124. telegrinder/msgspec_utils/abc.py +16 -0
  125. telegrinder/msgspec_utils/custom_types/__init__.py +6 -0
  126. telegrinder/msgspec_utils/custom_types/datetime.py +24 -0
  127. telegrinder/msgspec_utils/custom_types/enum_meta.py +61 -0
  128. telegrinder/msgspec_utils/custom_types/literal.py +25 -0
  129. telegrinder/msgspec_utils/custom_types/option.py +17 -0
  130. telegrinder/msgspec_utils/decoder.py +388 -0
  131. telegrinder/msgspec_utils/encoder.py +204 -0
  132. telegrinder/msgspec_utils/json.py +15 -0
  133. telegrinder/msgspec_utils/tools.py +80 -0
  134. telegrinder/node/__init__.py +80 -0
  135. telegrinder/node/compose.py +193 -0
  136. telegrinder/node/nodes/__init__.py +96 -0
  137. telegrinder/node/nodes/attachment.py +169 -0
  138. telegrinder/node/nodes/callback_query.py +25 -0
  139. telegrinder/node/nodes/channel.py +97 -0
  140. telegrinder/node/nodes/command.py +33 -0
  141. telegrinder/node/nodes/error.py +43 -0
  142. telegrinder/node/nodes/event.py +70 -0
  143. telegrinder/node/nodes/file.py +39 -0
  144. telegrinder/node/nodes/global_node.py +66 -0
  145. telegrinder/node/nodes/i18n.py +110 -0
  146. telegrinder/node/nodes/me.py +26 -0
  147. telegrinder/node/nodes/message_entities.py +15 -0
  148. telegrinder/node/nodes/payload.py +84 -0
  149. telegrinder/node/nodes/reply_message.py +14 -0
  150. telegrinder/node/nodes/source.py +172 -0
  151. telegrinder/node/nodes/state_mutator.py +71 -0
  152. telegrinder/node/nodes/text.py +62 -0
  153. telegrinder/node/scope.py +88 -0
  154. telegrinder/node/utils.py +38 -0
  155. telegrinder/py.typed +0 -0
  156. telegrinder/rules.py +1 -0
  157. telegrinder/tools/__init__.py +183 -0
  158. telegrinder/tools/aio.py +147 -0
  159. telegrinder/tools/final.py +21 -0
  160. telegrinder/tools/formatting/__init__.py +85 -0
  161. telegrinder/tools/formatting/deep_links/__init__.py +39 -0
  162. telegrinder/tools/formatting/deep_links/links.py +468 -0
  163. telegrinder/tools/formatting/deep_links/parsing.py +88 -0
  164. telegrinder/tools/formatting/deep_links/validators.py +8 -0
  165. telegrinder/tools/formatting/html.py +241 -0
  166. telegrinder/tools/fullname.py +82 -0
  167. telegrinder/tools/global_context/__init__.py +13 -0
  168. telegrinder/tools/global_context/abc.py +63 -0
  169. telegrinder/tools/global_context/builtin_context.py +45 -0
  170. telegrinder/tools/global_context/global_context.py +614 -0
  171. telegrinder/tools/input_file_directory.py +30 -0
  172. telegrinder/tools/keyboard/__init__.py +6 -0
  173. telegrinder/tools/keyboard/abc.py +84 -0
  174. telegrinder/tools/keyboard/base.py +108 -0
  175. telegrinder/tools/keyboard/button.py +181 -0
  176. telegrinder/tools/keyboard/data.py +31 -0
  177. telegrinder/tools/keyboard/keyboard.py +160 -0
  178. telegrinder/tools/keyboard/utils.py +95 -0
  179. telegrinder/tools/lifespan.py +188 -0
  180. telegrinder/tools/limited_dict.py +35 -0
  181. telegrinder/tools/loop_wrapper.py +271 -0
  182. telegrinder/tools/magic/__init__.py +29 -0
  183. telegrinder/tools/magic/annotations.py +172 -0
  184. telegrinder/tools/magic/descriptors.py +57 -0
  185. telegrinder/tools/magic/function.py +254 -0
  186. telegrinder/tools/magic/inspect.py +16 -0
  187. telegrinder/tools/magic/shortcut.py +107 -0
  188. telegrinder/tools/member_descriptor_proxy.py +95 -0
  189. telegrinder/tools/parse_mode.py +12 -0
  190. telegrinder/tools/serialization/__init__.py +5 -0
  191. telegrinder/tools/serialization/abc.py +34 -0
  192. telegrinder/tools/serialization/json_ser.py +60 -0
  193. telegrinder/tools/serialization/msgpack_ser.py +197 -0
  194. telegrinder/tools/serialization/utils.py +18 -0
  195. telegrinder/tools/singleton/__init__.py +4 -0
  196. telegrinder/tools/singleton/abc.py +14 -0
  197. telegrinder/tools/singleton/singleton.py +18 -0
  198. telegrinder/tools/state_mutator/__init__.py +4 -0
  199. telegrinder/tools/state_mutator/mutation.py +85 -0
  200. telegrinder/tools/state_storage/__init__.py +4 -0
  201. telegrinder/tools/state_storage/abc.py +38 -0
  202. telegrinder/tools/state_storage/memory.py +27 -0
  203. telegrinder/tools/strings.py +22 -0
  204. telegrinder/types/__init__.py +323 -0
  205. telegrinder/types/enums.py +754 -0
  206. telegrinder/types/input_file.py +51 -0
  207. telegrinder/types/methods.py +6143 -0
  208. telegrinder/types/methods_utils.py +66 -0
  209. telegrinder/types/objects.py +8184 -0
  210. telegrinder/types/webapp.py +129 -0
  211. telegrinder/verification_utils.py +35 -0
  212. telegrinder-1.0.0rc1.dist-info/METADATA +166 -0
  213. telegrinder-1.0.0rc1.dist-info/RECORD +215 -0
  214. telegrinder-1.0.0rc1.dist-info/WHEEL +4 -0
  215. telegrinder-1.0.0rc1.dist-info/licenses/LICENSE +22 -0
@@ -0,0 +1,754 @@
1
+ import enum
2
+
3
+ from telegrinder.msgspec_utils import BaseEnumMeta
4
+
5
+
6
+ class ProgrammingLanguage(enum.StrEnum, metaclass=BaseEnumMeta):
7
+ """Type of ProgrammingLanguage."""
8
+
9
+ ASSEMBLY = "assembly"
10
+ PYTHON = "python"
11
+ RUST = "rust"
12
+ RUBY = "ruby"
13
+ JAVA = "java"
14
+ C = "c"
15
+ C_SHARP = "cs"
16
+ CPP = "cpp"
17
+ CSS = "css"
18
+ OBJECTIVE_C = "Objective-C"
19
+ CYTHON = "cython"
20
+ CARBON = "carbon"
21
+ COBRA = "cobra"
22
+ SWIFT = "swift"
23
+ LAURELANG = "laurelang"
24
+ DART = "dart"
25
+ DELPHI = "delphi"
26
+ ELIXIR = "elixir"
27
+ HASKELL = "haskell"
28
+ PASCAL = "pascal"
29
+ TYPE_SCRIPT = "ts"
30
+ JAVA_SCRIPT = "js"
31
+ PHP = "php"
32
+ GO = "go"
33
+ SQL = "sql"
34
+ F_SHARP = "fs"
35
+ FORTRAN = "fortran"
36
+ KOTLIN = "kotlin"
37
+ HTML = "html"
38
+ YAML = "yaml"
39
+ JSON = "json"
40
+ MARKDOWN = "markdown"
41
+ MARKUP = "markup"
42
+
43
+
44
+ class ChatAction(enum.StrEnum, metaclass=BaseEnumMeta):
45
+ """Type of ChatAction.
46
+
47
+ Choose one, depending on what the user is about to receive:
48
+ - typing for text messages,
49
+ - upload_photo for photos,
50
+ - record_video or upload_video for videos,
51
+ - record_voice or upload_voice for voice notes,
52
+ - upload_document for general files,
53
+ - choose_sticker for stickers,
54
+ - find_location for location data,
55
+ - record_video_note or upload_video_note for video notes.
56
+
57
+ Docs: https://core.telegram.org/bots/api#sendchataction
58
+ """
59
+
60
+ TYPING = "typing"
61
+ UPLOAD_PHOTO = "upload_photo"
62
+ RECORD_VIDEO = "record_video"
63
+ UPLOAD_VIDEO = "upload_video"
64
+ RECORD_VOICE = "record_voice"
65
+ UPLOAD_VOICE = "upload_voice"
66
+ UPLOAD_DOCUMENT = "upload_document"
67
+ CHOOSE_STICKER = "choose_sticker"
68
+ FIND_LOCATION = "find_location"
69
+ RECORD_VIDEO_NOTE = "record_video_note"
70
+ UPLOAD_VIDEO_NOTE = "upload_video_note"
71
+
72
+
73
+ class ReactionEmoji(enum.StrEnum, metaclass=BaseEnumMeta):
74
+ """Type of ReactionEmoji.
75
+
76
+ Currently, it can be one of `👍`, `👎`, `❤`, `🔥`, `🥰`, `👏`,
77
+ `😁`, `🤔`, `🤯`, `😱`, `🤬`, `😢`, `🎉`, `🤩`, `🤮`, `💩`, `🙏`, `👌`, `🕊`, `🤡`, `🥱`,
78
+ `🥴`, `😍`, `🐳`, `❤‍🔥`, `🌚`, `🌭`, `💯`, `🤣`, `⚡`, `🍌`, `🏆`, `💔`, `🤨`, `😐`, `🍓`,
79
+ `🍾`, `💋`, `🖕`, `😈`, `😴`, `😭`, `🤓`, `👻`, `👨‍💻`, `👀`, `🎃`, `🙈`, `😇`, `😨`, `🤝`,
80
+ `✍`, `🤗`, `🫡`, `🎅`, `🎄`, `☃`, `💅`, `🤪`, `🗿`, `🆒`, `💘`, `🙉`, `🦄`, `😘`, `💊`,
81
+ `🙊`, `😎`, `👾`, `🤷‍♂`, `🤷`, `🤷‍♀`, `😡`.
82
+
83
+ Docs: https://core.telegram.org/bots/api#reactiontypeemoji
84
+ """
85
+
86
+ THUMBS_UP = "👍"
87
+ THUMBS_DOWN = "👎"
88
+ RED_HEART = "❤"
89
+ FIRE = "🔥"
90
+ SMILING_FACE_WITH_HEARTS = "🥰"
91
+ CLAPPING_HANDS = "👏"
92
+ BEAMING_FACE_WITH_SMILING_EYES = "😁"
93
+ THINKING_FACE = "🤔"
94
+ EXPLODING_HEAD = "🤯"
95
+ FACE_SCREAMING_IN_FEAR = "😱"
96
+ FACE_WITH_SYMBOLS_ON_MOUTH = "🤬"
97
+ CRYING_FACE = "😢"
98
+ PARTY_POPPER = "🎉"
99
+ STAR_STRUCK = "🤩"
100
+ FACE_VOMITING = "🤮"
101
+ PILE_OF_POO = "💩"
102
+ FOLDED_HANDS = "🙏"
103
+ OK_HAND = "👌"
104
+ DOVE = "🕊"
105
+ CLOWN_FACE = "🤡"
106
+ YAWNING_FACE = "🥱"
107
+ WOOZY_FACE = "🥴"
108
+ SMILING_FACE_WITH_HEART_EYES = "😍"
109
+ SPOUTING_WHALE = "🐳"
110
+ HEART_ON_FIRE = "❤‍🔥"
111
+ NEW_MOON_FACE = "🌚"
112
+ HOT_DOG = "🌭"
113
+ HUNDRED_POINTS = "💯"
114
+ ROLLING_ON_THE_FLOOR_LAUGHING = "🤣"
115
+ HIGH_VOLTAGE = "⚡"
116
+ BANANA = "🍌"
117
+ TROPHY = "🏆"
118
+ BROKEN_HEART = "💔"
119
+ FACE_WITH_RAISED_EYEBROW = "🤨"
120
+ NEUTRAL_FACE = "😐"
121
+ STRAWBERRY = "🍓"
122
+ BOTTLE_WITH_POPPING_CORK = "🍾"
123
+ KISS_MARK = "💋"
124
+ MIDDLE_FINGER = "🖕"
125
+ SMILING_FACE_WITH_HORNS = "😈"
126
+ SLEEPING_FACE = "😴"
127
+ LOUDLY_CRYING_FACE = "😭"
128
+ NERD_FACE = "🤓"
129
+ GHOST = "👻"
130
+ MAN_TECHNOLOGIST = "👨‍💻"
131
+ EYES = "👀"
132
+ JACK_O_LANTERN = "🎃"
133
+ SEE_NO_EVIL_MONKEY = "🙈"
134
+ SMILING_FACE_WITH_HALO = "😇"
135
+ FEARFUL_FACE = "😨"
136
+ HANDSHAKE = "🤝"
137
+ WRITING_HAND = "✍"
138
+ SMILING_FACE_WITH_OPEN_HANDS = "🤗"
139
+ SALUTING_FACE = "🫡"
140
+ SANTA_CLAUS = "🎅"
141
+ CHRISTMAS_TREE = "🎄"
142
+ SNOWMAN = "☃"
143
+ NAIL_POLISH = "💅"
144
+ ZANY_FACE = "🤪"
145
+ MOAI = "🗿"
146
+ COOL_BUTTON = "🆒"
147
+ HEART_WITH_ARROW = "💘"
148
+ HEAR_NO_EVIL_MONKEY = "🙉"
149
+ UNICORN = "🦄"
150
+ FACE_BLOWING_A_KISS = "😘"
151
+ PILL = "💊"
152
+ SPEAK_NO_EVIL_MONKEY = "🙊"
153
+ SMILING_FACE_WITH_SUNGLASSES = "😎"
154
+ ALIEN_MONSTER = "👾"
155
+ MAN_SHRUGGING = "🤷‍♂"
156
+ PERSON_SHRUGGING = "🤷"
157
+ WOMAN_SHRUGGING = "🤷‍♀"
158
+ ENRAGED_FACE = "😡"
159
+
160
+
161
+ class DefaultAccentColor(enum.IntEnum, metaclass=BaseEnumMeta):
162
+ """Type of DefaultAccentColor.
163
+
164
+ One of 7 possible user colors:
165
+ - Red
166
+ - Orange
167
+ - Purple
168
+ - Green
169
+ - Cyan
170
+ - Blue
171
+ - Pink
172
+
173
+ Docs: https://core.telegram.org/bots/api#accent-colors
174
+ """
175
+
176
+ RED = 0
177
+ ORANGE = 1
178
+ PURPLE = 2
179
+ GREEN = 3
180
+ CYAN = 4
181
+ BLUE = 5
182
+ PINK = 6
183
+
184
+
185
+ class TopicIconColor(enum.IntEnum, metaclass=BaseEnumMeta):
186
+ """Type of TopicIconColor.
187
+
188
+ Docs: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56
189
+ """
190
+
191
+ BLUE = 0x6FB9F0
192
+ YELLOW = 0xFFD67E
193
+ VIOLET = 0xCB86DB
194
+ GREEN = 0x8EEE98
195
+ ROSE = 0xFF93B2
196
+ RED = 0xFB6F5F
197
+
198
+
199
+ class ChatBoostSourceType(enum.StrEnum, metaclass=BaseEnumMeta):
200
+ """Type of ChatBoostSourceType
201
+ Docs: https://core.telegram.org/bots/api#chatboostsource
202
+ """
203
+
204
+ PREMIUM = "premium"
205
+ GIFT_CODE = "gift_code"
206
+ GIVEAWAY = "giveaway"
207
+
208
+
209
+ class ContentType(enum.StrEnum, metaclass=BaseEnumMeta):
210
+ """Type of ContentType."""
211
+
212
+ TEXT = "text"
213
+ ANIMATION = "animation"
214
+ AUDIO = "audio"
215
+ DOCUMENT = "document"
216
+ PAID_MEDIA = "paid_media"
217
+ PHOTO = "photo"
218
+ STICKER = "sticker"
219
+ STORY = "story"
220
+ VIDEO = "video"
221
+ VIDEO_NOTE = "video_note"
222
+ VOICE = "voice"
223
+ CHECKLIST = "checklist"
224
+ CONTACT = "contact"
225
+ DICE = "dice"
226
+ GAME = "game"
227
+ POLL = "poll"
228
+ VENUE = "venue"
229
+ LOCATION = "location"
230
+ NEW_CHAT_MEMBERS = "new_chat_members"
231
+ LEFT_CHAT_MEMBER = "left_chat_member"
232
+ NEW_CHAT_TITLE = "new_chat_title"
233
+ NEW_CHAT_PHOTO = "new_chat_photo"
234
+ DELETE_CHAT_PHOTO = "delete_chat_photo"
235
+ GROUP_CHAT_CREATED = "group_chat_created"
236
+ BOOST_ADDED = "boost_added"
237
+ SUPERGROUP_CHAT_CREATED = "supergroup_chat_created"
238
+ CHANNEL_CHAT_CREATED = "channel_chat_created"
239
+ MESSAGE_AUTO_DELETE_TIMER_CHANGED = "message_auto_delete_timer_changed"
240
+ MIGRATE_TO_CHAT_ID = "migrate_to_chat_id"
241
+ MIGRATE_FROM_CHAT_ID = "migrate_from_chat_id"
242
+ PINNED_MESSAGE = "pinned_message"
243
+ INVOICE = "invoice"
244
+ SUCCESSFUL_PAYMENT = "successful_payment"
245
+ REFUNDED_PAYMENT = "refunded_payment"
246
+ USERS_SHARED = "users_shared"
247
+ CHAT_SHARED = "chat_shared"
248
+ GIFT = "gift"
249
+ UNIQUE_GIFT = "unique_gift"
250
+ CONNECTED_WEBSITE = "connected_website"
251
+ WRITE_ACCESS_ALLOWED = "write_access_allowed"
252
+ PASSPORT_DATA = "passport_data"
253
+ PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered"
254
+ CHAT_BACKGROUND_SET = "chat_background_set"
255
+ CHECKLIST_TASKS_DONE = "checklist_tasks_done"
256
+ CHECKLIST_TASKS_ADDED = "checklist_tasks_added"
257
+ DIRECT_MESSAGE_PRICE_CHANGED = "direct_message_price_changed"
258
+ FORUM_TOPIC_CREATED = "forum_topic_created"
259
+ FORUM_TOPIC_EDITED = "forum_topic_edited"
260
+ FORUM_TOPIC_CLOSED = "forum_topic_closed"
261
+ FORUM_TOPIC_REOPENED = "forum_topic_reopened"
262
+ GENERAL_FORUM_TOPIC_HIDDEN = "general_forum_topic_hidden"
263
+ GENERAL_FORUM_TOPIC_UNHIDDEN = "general_forum_topic_unhidden"
264
+ GIVEAWAY_CREATED = "giveaway_created"
265
+ GIVEAWAY = "giveaway"
266
+ GIVEAWAY_WINNERS = "giveaway_winners"
267
+ GIVEAWAY_COMPLETED = "giveaway_completed"
268
+ PAID_MESSAGE_PRICE_CHANGED = "paid_message_price_changed"
269
+ SUGGESTED_POST_APPROVED = "suggested_post_approved"
270
+ SUGGESTED_POST_APPROVAL_FAILED = "suggested_post_approval_failed"
271
+ SUGGESTED_POST_DECLINED = "suggested_post_declined"
272
+ SUGGESTED_POST_PAID = "suggested_post_paid"
273
+ SUGGESTED_POST_REFUNDED = "suggested_post_refunded"
274
+ VIDEO_CHAT_SCHEDULED = "video_chat_scheduled"
275
+ VIDEO_CHAT_STARTED = "video_chat_started"
276
+ VIDEO_CHAT_ENDED = "video_chat_ended"
277
+ VIDEO_CHAT_PARTICIPANTS_INVITED = "video_chat_participants_invited"
278
+ WEB_APP_DATA = "web_app_data"
279
+ USER_SHARED = "user_shared"
280
+ UNKNOWN = "unknown"
281
+
282
+
283
+ class Currency(enum.StrEnum, metaclass=BaseEnumMeta):
284
+ """Type of Currency.
285
+ Docs: https://core.telegram.org/bots/payments#supported-currencies
286
+ """
287
+
288
+ AED = "AED"
289
+ AFN = "AFN"
290
+ ALL = "ALL"
291
+ AMD = "AMD"
292
+ ARS = "ARS"
293
+ AUD = "AUD"
294
+ AZN = "AZN"
295
+ BAM = "BAM"
296
+ BDT = "BDT"
297
+ BGN = "BGN"
298
+ BND = "BND"
299
+ BOB = "BOB"
300
+ BRL = "BRL"
301
+ BYN = "BYN"
302
+ CAD = "CAD"
303
+ CHF = "CHF"
304
+ CLP = "CLP"
305
+ CNY = "CNY"
306
+ COP = "COP"
307
+ CRC = "CRC"
308
+ CZK = "CZK"
309
+ DKK = "DKK"
310
+ DOP = "DOP"
311
+ DZD = "DZD"
312
+ EGP = "EGP"
313
+ ETB = "ETB"
314
+ EUR = "EUR"
315
+ GBP = "GBP"
316
+ GEL = "GEL"
317
+ GTQ = "GTQ"
318
+ HKD = "HKD"
319
+ HNL = "HNL"
320
+ HRK = "HRK"
321
+ HUF = "HUF"
322
+ IDR = "IDR"
323
+ ILS = "ILS"
324
+ INR = "INR"
325
+ ISK = "ISK"
326
+ JMD = "JMD"
327
+ JPY = "JPY"
328
+ KES = "KES"
329
+ KGS = "KGS"
330
+ KRW = "KRW"
331
+ KZT = "KZT"
332
+ LBP = "LBP"
333
+ LKR = "LKR"
334
+ MAD = "MAD"
335
+ MDL = "MDL"
336
+ MNT = "MNT"
337
+ MUR = "MUR"
338
+ MVR = "MVR"
339
+ MXN = "MXN"
340
+ MYR = "MYR"
341
+ MZN = "MZN"
342
+ NGN = "NGN"
343
+ NIO = "NIO"
344
+ NOK = "NOK"
345
+ NPR = "NPR"
346
+ NZD = "NZD"
347
+ PAB = "PAB"
348
+ PEN = "PEN"
349
+ PHP = "PHP"
350
+ PKR = "PKR"
351
+ PLN = "PLN"
352
+ PYG = "PYG"
353
+ QAR = "QAR"
354
+ RON = "RON"
355
+ RSD = "RSD"
356
+ RUB = "RUB"
357
+ SAR = "SAR"
358
+ SEK = "SEK"
359
+ SGD = "SGD"
360
+ THB = "THB"
361
+ TJS = "TJS"
362
+ TRY = "TRY"
363
+ TTD = "TTD"
364
+ TWD = "TWD"
365
+ TZS = "TZS"
366
+ UAH = "UAH"
367
+ UGX = "UGX"
368
+ USD = "USD"
369
+ UYU = "UYU"
370
+ UZS = "UZS"
371
+ VND = "VND"
372
+ YER = "YER"
373
+ ZAR = "ZAR"
374
+ XTR = "XTR"
375
+ """Telegram stars."""
376
+ TON = "TON"
377
+ """Toncoin."""
378
+
379
+
380
+ class InlineQueryResultType(enum.StrEnum, metaclass=BaseEnumMeta):
381
+ """Type of InlineQueryResultType.
382
+ Docs: https://core.telegram.org/bots/api#inlinequeryresult
383
+ """
384
+
385
+ AUDIO = "audio"
386
+ DOCUMENT = "document"
387
+ GIF = "gif"
388
+ MPEG4_GIF = "mpeg4_gif"
389
+ PHOTO = "photo"
390
+ STICKER = "sticker"
391
+ VIDEO = "video"
392
+ VOICE = "voice"
393
+ ARTICLE = "article"
394
+ CONTACT = "contact"
395
+ GAME = "game"
396
+ LOCATION = "location"
397
+ VENUE = "venue"
398
+
399
+
400
+ class MenuButtonType(enum.StrEnum, metaclass=BaseEnumMeta):
401
+ """TType of MenuButtonType.
402
+ Docs: https://core.telegram.org/bots/api#menubuttondefault
403
+ """
404
+
405
+ DEFAULT = "default"
406
+ COMMANDS = "commands"
407
+ WEB_APP = "web_app"
408
+
409
+
410
+ class InputMediaType(enum.StrEnum, metaclass=BaseEnumMeta):
411
+ """Type of InputMediaType.
412
+ Docs: https://core.telegram.org/bots/api#inputmedia
413
+ """
414
+
415
+ ANIMATION = "animation"
416
+ AUDIO = "audio"
417
+ DOCUMENT = "document"
418
+ PHOTO = "photo"
419
+ VIDEO = "video"
420
+
421
+
422
+ class UpdateType(enum.StrEnum, metaclass=BaseEnumMeta):
423
+ """Type of update."""
424
+
425
+ MESSAGE = "message"
426
+ EDITED_MESSAGE = "edited_message"
427
+ CHANNEL_POST = "channel_post"
428
+ EDITED_CHANNEL_POST = "edited_channel_post"
429
+ MESSAGE_REACTION = "message_reaction"
430
+ MESSAGE_REACTION_COUNT = "message_reaction_count"
431
+ INLINE_QUERY = "inline_query"
432
+ CHOSEN_INLINE_RESULT = "chosen_inline_result"
433
+ CALLBACK_QUERY = "callback_query"
434
+ SHIPPING_QUERY = "shipping_query"
435
+ PRE_CHECKOUT_QUERY = "pre_checkout_query"
436
+ PURCHASED_PAID_MEDIA = "purchased_paid_media"
437
+ POLL = "poll"
438
+ POLL_ANSWER = "poll_answer"
439
+ MY_CHAT_MEMBER = "my_chat_member"
440
+ CHAT_MEMBER = "chat_member"
441
+ CHAT_JOIN_REQUEST = "chat_join_request"
442
+ CHAT_BOOST = "chat_boost"
443
+ REMOVED_CHAT_BOOST = "removed_chat_boost"
444
+ BUSINESS_CONNECTION = "business_connection"
445
+ BUSINESS_MESSAGE = "business_message"
446
+ EDITED_BUSINESS_MESSAGE = "edited_business_message"
447
+ DELETED_BUSINESS_MESSAGES = "deleted_business_messages"
448
+
449
+
450
+ class BotCommandScopeType(enum.StrEnum, metaclass=BaseEnumMeta):
451
+ """Type of BotCommandScope.
452
+ Represents the scope to which bot commands are applied.
453
+ """
454
+
455
+ DEFAULT = "default"
456
+ ALL_PRIVATE_CHATS = "all_private_chats"
457
+ ALL_GROUP_CHATS = "all_group_chats"
458
+ ALL_CHAT_ADMINISTRATORS = "all_chat_administrators"
459
+ CHAT = "chat"
460
+ CHAT_ADMINISTRATORS = "chat_administrators"
461
+ CHAT_MEMBER = "chat_member"
462
+
463
+
464
+ class ChatType(enum.StrEnum, metaclass=BaseEnumMeta):
465
+ """Type of chat, can be either `private`, `group`, `supergroup` or `channel`."""
466
+
467
+ PRIVATE = "private"
468
+ GROUP = "group"
469
+ SUPERGROUP = "supergroup"
470
+ CHANNEL = "channel"
471
+ SENDER = "sender"
472
+
473
+
474
+ class ChatMemberStatus(enum.StrEnum, metaclass=BaseEnumMeta):
475
+ """Type of ChatMemberStatus."""
476
+
477
+ CREATOR = "creator"
478
+ ADMINISTRATOR = "administrator"
479
+ MEMBER = "member"
480
+ RESTRICTED = "restricted"
481
+ LEFT = "left"
482
+ KICKED = "kicked"
483
+
484
+
485
+ class DiceEmoji(enum.StrEnum, metaclass=BaseEnumMeta):
486
+ """Emoji on which the dice throw animation is based."""
487
+
488
+ DICE = "🎲"
489
+ DART = "🎯"
490
+ BASKETBALL = "🏀"
491
+ FOOTBALL = "⚽"
492
+ SLOT_MACHINE = "🎰"
493
+ BOWLING = "🎳"
494
+
495
+
496
+ class MessageEntityType(enum.StrEnum, metaclass=BaseEnumMeta):
497
+ """Type of the entity. Currently, can be `mention` (@username), `hashtag`
498
+ (#hashtag or #hashtag@chatusername), `cashtag` ($USD or $USD@chatusername),
499
+ `bot_command` (/start@jobs_bot), `url` (https://telegram.org), `email`
500
+ (do-not-reply@telegram.org), `phone_number` (+1-212-555-0123),
501
+ `bold` (bold text), `italic` (italic text), `underline` (underlined
502
+ text), `strikethrough` (strikethrough text), `spoiler` (spoiler message),
503
+ `blockquote` (block quotation), `expandable_blockquote` (collapsed-by-default
504
+ block quotation), `code` (monowidth string), `pre` (monowidth block),
505
+ `text_link` (for clickable text URLs), `text_mention` (for users without
506
+ usernames), `custom_emoji` (for inline custom emoji stickers)."""
507
+
508
+ MENTION = "mention"
509
+ HASHTAG = "hashtag"
510
+ CASHTAG = "cashtag"
511
+ BOT_COMMAND = "bot_command"
512
+ URL = "url"
513
+ EMAIL = "email"
514
+ PHONE_NUMBER = "phone_number"
515
+ BOLD = "bold"
516
+ ITALIC = "italic"
517
+ UNDERLINE = "underline"
518
+ STRIKETHROUGH = "strikethrough"
519
+ SPOILER = "spoiler"
520
+ BLOCKQUOTE = "blockquote"
521
+ CODE = "code"
522
+ PRE = "pre"
523
+ TEXT_LINK = "text_link"
524
+ TEXT_MENTION = "text_mention"
525
+ CUSTOM_EMOJI = "custom_emoji"
526
+ EXPANDABLE_BLOCKQUOTE = "expandable_blockquote"
527
+
528
+
529
+ class PollType(enum.StrEnum, metaclass=BaseEnumMeta):
530
+ """Poll type, currently can be `regular` or `quiz`."""
531
+
532
+ REGULAR = "regular"
533
+ QUIZ = "quiz"
534
+
535
+
536
+ class StickerType(enum.StrEnum, metaclass=BaseEnumMeta):
537
+ """Type of the sticker, currently one of `regular`, `mask`, `custom_emoji`.
538
+ The type of the sticker is independent from its format, which is determined
539
+ by the fields `is_animated` and `is_video`.
540
+ """
541
+
542
+ REGULAR = "regular"
543
+ MASK = "mask"
544
+ CUSTOM_EMOJI = "custom_emoji"
545
+
546
+
547
+ class MessageOriginType(enum.StrEnum, metaclass=BaseEnumMeta):
548
+ """Type of MessageOriginType
549
+ Docs: https://core.telegram.org/bots/api#messageorigin
550
+ """
551
+
552
+ USER = "user"
553
+ HIDDEN_USER = "hidden_user"
554
+ CHAT = "chat"
555
+ CHANNEL = "channel"
556
+
557
+
558
+ class StickerSetStickerType(enum.StrEnum, metaclass=BaseEnumMeta):
559
+ """Type of stickers in the set, currently one of `regular`, `mask`, `custom_emoji`."""
560
+
561
+ REGULAR = "regular"
562
+ MASK = "mask"
563
+ CUSTOM_EMOJI = "custom_emoji"
564
+
565
+
566
+ class MaskPositionPoint(enum.StrEnum, metaclass=BaseEnumMeta):
567
+ """The part of the face relative to which the mask should be placed. One of `forehead`,
568
+ `eyes`, `mouth`, or `chin`.
569
+ """
570
+
571
+ FOREHEAD = "forehead"
572
+ EYES = "eyes"
573
+ MOUTH = "mouth"
574
+ CHIN = "chin"
575
+
576
+
577
+ class InlineQueryChatType(enum.StrEnum, metaclass=BaseEnumMeta):
578
+ """Type of the chat from which the inline query was sent. Can be
579
+ either `sender` for a private chat with the inline query sender, `private`,
580
+ `group`, `supergroup`, or `channel`. The chat type should be always known
581
+ for requests sent from official clients and most third-party clients,
582
+ unless the request was sent from a secret chat.
583
+ """
584
+
585
+ SENDER = "sender"
586
+ PRIVATE = "private"
587
+ GROUP = "group"
588
+ SUPERGROUP = "supergroup"
589
+ CHANNEL = "channel"
590
+
591
+
592
+ class InlineQueryResultMimeType(enum.StrEnum, metaclass=BaseEnumMeta):
593
+ """MIME type of the content of the video URL, `text/html` or `video/mp4`."""
594
+
595
+ TEXT_HTML = "text/html"
596
+ VIDEO_MP4 = "video/mp4"
597
+
598
+
599
+ class InlineQueryResultThumbnailMimeType(enum.StrEnum, metaclass=BaseEnumMeta):
600
+ """MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
601
+ or `video/mp4`. Defaults to `image/jpeg`
602
+ """
603
+
604
+ IMAGE_JPEG = "image/jpeg"
605
+ IMAGE_GIF = "image/gif"
606
+ VIDEO_MP4 = "video/mp4"
607
+
608
+
609
+ class PassportElementErrorType(enum.StrEnum, metaclass=BaseEnumMeta):
610
+ """Type of PassportElementErrorType.
611
+ Docs: https://core.telegram.org/bots/api#passportelementerror
612
+ """
613
+
614
+ DATA = "data"
615
+ FRONT_SIDE = "front_side"
616
+ REVERSE_SIDE = "reverse_side"
617
+ SELFIE = "selfie"
618
+ FILE = "file"
619
+ FILES = "files"
620
+ TRANSLATION_FILE = "translation_file"
621
+ TRANSLATION_FILES = "translation_files"
622
+ UNSPECIFIED = "unspecified"
623
+
624
+
625
+ class ReactionTypeType(enum.StrEnum, metaclass=BaseEnumMeta):
626
+ """Type of ReactionTypeType.
627
+ Docs: https://core.telegram.org/bots/api#reactiontype
628
+ """
629
+
630
+ EMOJI = "emoji"
631
+ CUSTOM_EMOJI = "custom_emoji"
632
+
633
+
634
+ class InlineQueryResultGifThumbnailMimeType(enum.StrEnum, metaclass=BaseEnumMeta):
635
+ """MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
636
+ or `video/mp4`. Defaults to `image/jpeg`.
637
+ """
638
+
639
+ IMAGE_JPEG = "image/jpeg"
640
+ IMAGE_GIF = "image/gif"
641
+ VIDEO_MP4 = "video/mp4"
642
+
643
+
644
+ class InlineQueryResultMpeg4GifThumbnailMimeType(enum.StrEnum, metaclass=BaseEnumMeta):
645
+ """MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`,
646
+ or `video/mp4`. Defaults to `image/jpeg`.
647
+ """
648
+
649
+ IMAGE_JPEG = "image/jpeg"
650
+ IMAGE_GIF = "image/gif"
651
+ VIDEO_MP4 = "video/mp4"
652
+
653
+
654
+ class InlineQueryResultVideoMimeType(enum.StrEnum, metaclass=BaseEnumMeta):
655
+ """MIME type of the content of the video URL, `text/html` or `video/mp4`."""
656
+
657
+ TEXT_HTML = "text/html"
658
+ VIDEO_MP4 = "video/mp4"
659
+
660
+
661
+ class InlineQueryResultDocumentMimeType(enum.StrEnum, metaclass=BaseEnumMeta):
662
+ """MIME type of the content of the file, either `application/pdf` or `application/zip`."""
663
+
664
+ APPLICATION_PDF = "application/pdf"
665
+ APPLICATION_ZIP = "application/zip"
666
+
667
+
668
+ class EncryptedPassportElementType(enum.StrEnum, metaclass=BaseEnumMeta):
669
+ """Element type. One of `personal_details`, `passport`, `driver_license`,
670
+ `identity_card`, `internal_passport`, `address`, `utility_bill`,
671
+ `bank_statement`, `rental_agreement`, `passport_registration`,
672
+ `temporary_registration`, `phone_number`, `email`.
673
+ """
674
+
675
+ PERSONAL_DETAILS = "personal_details"
676
+ PASSPORT = "passport"
677
+ DRIVER_LICENSE = "driver_license"
678
+ IDENTITY_CARD = "identity_card"
679
+ INTERNAL_PASSPORT = "internal_passport"
680
+ ADDRESS = "address"
681
+ UTILITY_BILL = "utility_bill"
682
+ BANK_STATEMENT = "bank_statement"
683
+ RENTAL_AGREEMENT = "rental_agreement"
684
+ PASSPORT_REGISTRATION = "passport_registration"
685
+ TEMPORARY_REGISTRATION = "temporary_registration"
686
+ PHONE_NUMBER = "phone_number"
687
+ EMAIL = "email"
688
+
689
+
690
+ class StickerFormat(enum.StrEnum, metaclass=BaseEnumMeta):
691
+ """Format of the sticker."""
692
+
693
+ STATIC = "static"
694
+ ANIMATED = "animated"
695
+ VIDEO = "video"
696
+
697
+
698
+ class TransactionPartnerUserTransactionType(enum.StrEnum, metaclass=BaseEnumMeta):
699
+ """This object represents type of the transaction that were made by partner user."""
700
+
701
+ INVOICE_PAYMENT = "invoice_payment"
702
+ PAID_MEDIA_PAYMENT = "paid_media_payment"
703
+ GIFT_PURCHASE = "gift_purchase"
704
+ PREMIUM_PURCHASE = "premium_purchase"
705
+ BUSINESS_ACCOUNT_TRANSFER = "business_account_transfer"
706
+
707
+
708
+ class UniqueGiftInfoOriginType(enum.StrEnum, metaclass=BaseEnumMeta):
709
+ """Origin of the gift.
710
+
711
+ Currently, either `upgrade`, `transfer`, `resale`, `gifted_upgrade` or `offer`.
712
+ """
713
+
714
+ UPGRADE = "upgrade"
715
+ TRANSFER = "transfer"
716
+ RESALE = "resale"
717
+ GIFTED_UPGRADE = "gifted_upgrade"
718
+ OFFER = "offer"
719
+
720
+
721
+ __all__ = (
722
+ "BotCommandScopeType",
723
+ "ChatAction",
724
+ "ChatBoostSourceType",
725
+ "ChatMemberStatus",
726
+ "ChatType",
727
+ "ContentType",
728
+ "Currency",
729
+ "DefaultAccentColor",
730
+ "DiceEmoji",
731
+ "EncryptedPassportElementType",
732
+ "InlineQueryChatType",
733
+ "InlineQueryResultDocumentMimeType",
734
+ "InlineQueryResultGifThumbnailMimeType",
735
+ "InlineQueryResultMimeType",
736
+ "InlineQueryResultMpeg4GifThumbnailMimeType",
737
+ "InlineQueryResultThumbnailMimeType",
738
+ "InlineQueryResultVideoMimeType",
739
+ "MaskPositionPoint",
740
+ "MessageEntityType",
741
+ "MessageOriginType",
742
+ "PassportElementErrorType",
743
+ "PollType",
744
+ "ProgrammingLanguage",
745
+ "ReactionEmoji",
746
+ "ReactionTypeType",
747
+ "StickerFormat",
748
+ "StickerSetStickerType",
749
+ "StickerType",
750
+ "TopicIconColor",
751
+ "TransactionPartnerUserTransactionType",
752
+ "UniqueGiftInfoOriginType",
753
+ "UpdateType",
754
+ )