syncgram 0.0.1__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 (595) hide show
  1. syncgram/__init__.py +12 -0
  2. syncgram/bot.py +121 -0
  3. syncgram/exceptions.py +17 -0
  4. syncgram/methods/__init__.py +373 -0
  5. syncgram/methods/add_sticker_to_set.py +18 -0
  6. syncgram/methods/answer_callback_query.py +16 -0
  7. syncgram/methods/answer_chat_join_request_query.py +13 -0
  8. syncgram/methods/answer_guest_query.py +15 -0
  9. syncgram/methods/answer_inline_query.py +19 -0
  10. syncgram/methods/answer_pre_checkout_query.py +14 -0
  11. syncgram/methods/answer_shipping_query.py +16 -0
  12. syncgram/methods/answer_web_app_query.py +15 -0
  13. syncgram/methods/approve_chat_join_request.py +13 -0
  14. syncgram/methods/approve_suggested_post.py +14 -0
  15. syncgram/methods/ban_chat_member.py +15 -0
  16. syncgram/methods/ban_chat_sender_chat.py +13 -0
  17. syncgram/methods/close.py +11 -0
  18. syncgram/methods/close_forum_topic.py +13 -0
  19. syncgram/methods/close_general_forum_topic.py +12 -0
  20. syncgram/methods/convert_gift_to_stars.py +13 -0
  21. syncgram/methods/copy_message.py +36 -0
  22. syncgram/methods/copy_messages.py +20 -0
  23. syncgram/methods/create_chat_invite_link.py +17 -0
  24. syncgram/methods/create_chat_subscription_invite_link.py +16 -0
  25. syncgram/methods/create_forum_topic.py +16 -0
  26. syncgram/methods/create_invoice_link.py +34 -0
  27. syncgram/methods/create_new_sticker_set.py +18 -0
  28. syncgram/methods/decline_chat_join_request.py +13 -0
  29. syncgram/methods/decline_suggested_post.py +14 -0
  30. syncgram/methods/delete_all_message_reactions.py +14 -0
  31. syncgram/methods/delete_business_messages.py +13 -0
  32. syncgram/methods/delete_chat_photo.py +12 -0
  33. syncgram/methods/delete_chat_sticker_set.py +12 -0
  34. syncgram/methods/delete_ephemeral_message.py +14 -0
  35. syncgram/methods/delete_forum_topic.py +13 -0
  36. syncgram/methods/delete_message.py +13 -0
  37. syncgram/methods/delete_message_reaction.py +15 -0
  38. syncgram/methods/delete_messages.py +13 -0
  39. syncgram/methods/delete_my_commands.py +14 -0
  40. syncgram/methods/delete_sticker_from_set.py +15 -0
  41. syncgram/methods/delete_sticker_set.py +12 -0
  42. syncgram/methods/delete_story.py +13 -0
  43. syncgram/methods/delete_webhook.py +12 -0
  44. syncgram/methods/edit_chat_invite_link.py +18 -0
  45. syncgram/methods/edit_chat_subscription_invite_link.py +15 -0
  46. syncgram/methods/edit_ephemeral_message_caption.py +21 -0
  47. syncgram/methods/edit_ephemeral_message_media.py +18 -0
  48. syncgram/methods/edit_ephemeral_message_reply_markup.py +16 -0
  49. syncgram/methods/edit_ephemeral_message_text.py +24 -0
  50. syncgram/methods/edit_forum_topic.py +15 -0
  51. syncgram/methods/edit_general_forum_topic.py +13 -0
  52. syncgram/methods/edit_message_caption.py +23 -0
  53. syncgram/methods/edit_message_checklist.py +19 -0
  54. syncgram/methods/edit_message_live_location.py +24 -0
  55. syncgram/methods/edit_message_media.py +20 -0
  56. syncgram/methods/edit_message_reply_markup.py +18 -0
  57. syncgram/methods/edit_message_text.py +26 -0
  58. syncgram/methods/edit_story.py +22 -0
  59. syncgram/methods/edit_user_star_subscription.py +14 -0
  60. syncgram/methods/export_chat_invite_link.py +12 -0
  61. syncgram/methods/forward_message.py +23 -0
  62. syncgram/methods/forward_messages.py +19 -0
  63. syncgram/methods/get_available_gifts.py +12 -0
  64. syncgram/methods/get_business_account_gifts.py +23 -0
  65. syncgram/methods/get_business_account_star_balance.py +13 -0
  66. syncgram/methods/get_business_connection.py +13 -0
  67. syncgram/methods/get_chat.py +13 -0
  68. syncgram/methods/get_chat_administrators.py +14 -0
  69. syncgram/methods/get_chat_gifts.py +23 -0
  70. syncgram/methods/get_chat_member.py +14 -0
  71. syncgram/methods/get_chat_member_count.py +12 -0
  72. syncgram/methods/get_chat_menu_button.py +13 -0
  73. syncgram/methods/get_custom_emoji_stickers.py +13 -0
  74. syncgram/methods/get_file.py +13 -0
  75. syncgram/methods/get_forum_topic_icon_stickers.py +12 -0
  76. syncgram/methods/get_game_high_scores.py +16 -0
  77. syncgram/methods/get_managed_bot_access_settings.py +13 -0
  78. syncgram/methods/get_managed_bot_token.py +12 -0
  79. syncgram/methods/get_me.py +12 -0
  80. syncgram/methods/get_my_commands.py +15 -0
  81. syncgram/methods/get_my_default_administrator_rights.py +13 -0
  82. syncgram/methods/get_my_description.py +13 -0
  83. syncgram/methods/get_my_name.py +13 -0
  84. syncgram/methods/get_my_short_description.py +13 -0
  85. syncgram/methods/get_my_star_balance.py +12 -0
  86. syncgram/methods/get_star_transactions.py +14 -0
  87. syncgram/methods/get_sticker_set.py +13 -0
  88. syncgram/methods/get_updates.py +16 -0
  89. syncgram/methods/get_user_chat_boosts.py +14 -0
  90. syncgram/methods/get_user_gifts.py +21 -0
  91. syncgram/methods/get_user_personal_chat_messages.py +14 -0
  92. syncgram/methods/get_user_profile_audios.py +15 -0
  93. syncgram/methods/get_user_profile_photos.py +15 -0
  94. syncgram/methods/get_webhook_info.py +12 -0
  95. syncgram/methods/gift_premium_subscription.py +18 -0
  96. syncgram/methods/hide_general_forum_topic.py +12 -0
  97. syncgram/methods/leave_chat.py +12 -0
  98. syncgram/methods/log_out.py +11 -0
  99. syncgram/methods/pin_chat_message.py +15 -0
  100. syncgram/methods/post_story.py +24 -0
  101. syncgram/methods/promote_chat_member.py +31 -0
  102. syncgram/methods/read_business_message.py +14 -0
  103. syncgram/methods/refund_star_payment.py +13 -0
  104. syncgram/methods/remove_business_account_profile_photo.py +13 -0
  105. syncgram/methods/remove_chat_verification.py +12 -0
  106. syncgram/methods/remove_my_profile_photo.py +11 -0
  107. syncgram/methods/remove_user_verification.py +12 -0
  108. syncgram/methods/reopen_forum_topic.py +13 -0
  109. syncgram/methods/reopen_general_forum_topic.py +12 -0
  110. syncgram/methods/replace_managed_bot_token.py +12 -0
  111. syncgram/methods/replace_sticker_in_set.py +19 -0
  112. syncgram/methods/repost_story.py +18 -0
  113. syncgram/methods/restrict_chat_member.py +17 -0
  114. syncgram/methods/revoke_chat_invite_link.py +14 -0
  115. syncgram/methods/save_prepared_inline_message.py +19 -0
  116. syncgram/methods/save_prepared_keyboard_button.py +15 -0
  117. syncgram/methods/send_animation.py +46 -0
  118. syncgram/methods/send_audio.py +44 -0
  119. syncgram/methods/send_chat_action.py +15 -0
  120. syncgram/methods/send_chat_join_request_web_app.py +13 -0
  121. syncgram/methods/send_checklist.py +23 -0
  122. syncgram/methods/send_contact.py +35 -0
  123. syncgram/methods/send_dice.py +30 -0
  124. syncgram/methods/send_document.py +42 -0
  125. syncgram/methods/send_game.py +24 -0
  126. syncgram/methods/send_gift.py +19 -0
  127. syncgram/methods/send_invoice.py +47 -0
  128. syncgram/methods/send_live_photo.py +43 -0
  129. syncgram/methods/send_location.py +37 -0
  130. syncgram/methods/send_media_group.py +28 -0
  131. syncgram/methods/send_message.py +37 -0
  132. syncgram/methods/send_message_draft.py +20 -0
  133. syncgram/methods/send_paid_media.py +37 -0
  134. syncgram/methods/send_photo.py +42 -0
  135. syncgram/methods/send_poll.py +54 -0
  136. syncgram/methods/send_rich_message.py +33 -0
  137. syncgram/methods/send_rich_message_draft.py +18 -0
  138. syncgram/methods/send_sticker.py +37 -0
  139. syncgram/methods/send_venue.py +39 -0
  140. syncgram/methods/send_video.py +49 -0
  141. syncgram/methods/send_video_note.py +36 -0
  142. syncgram/methods/send_voice.py +41 -0
  143. syncgram/methods/set_business_account_bio.py +13 -0
  144. syncgram/methods/set_business_account_gift_settings.py +15 -0
  145. syncgram/methods/set_business_account_name.py +14 -0
  146. syncgram/methods/set_business_account_profile_photo.py +18 -0
  147. syncgram/methods/set_business_account_username.py +13 -0
  148. syncgram/methods/set_chat_administrator_custom_title.py +14 -0
  149. syncgram/methods/set_chat_description.py +13 -0
  150. syncgram/methods/set_chat_member_tag.py +14 -0
  151. syncgram/methods/set_chat_menu_button.py +14 -0
  152. syncgram/methods/set_chat_permissions.py +15 -0
  153. syncgram/methods/set_chat_photo.py +17 -0
  154. syncgram/methods/set_chat_sticker_set.py +13 -0
  155. syncgram/methods/set_chat_title.py +13 -0
  156. syncgram/methods/set_custom_emoji_sticker_set_thumbnail.py +13 -0
  157. syncgram/methods/set_game_score.py +19 -0
  158. syncgram/methods/set_managed_bot_access_settings.py +14 -0
  159. syncgram/methods/set_message_reaction.py +16 -0
  160. syncgram/methods/set_my_commands.py +16 -0
  161. syncgram/methods/set_my_default_administrator_rights.py +14 -0
  162. syncgram/methods/set_my_description.py +13 -0
  163. syncgram/methods/set_my_name.py +13 -0
  164. syncgram/methods/set_my_profile_photo.py +16 -0
  165. syncgram/methods/set_my_short_description.py +13 -0
  166. syncgram/methods/set_passport_data_errors.py +14 -0
  167. syncgram/methods/set_sticker_emoji_list.py +16 -0
  168. syncgram/methods/set_sticker_keywords.py +16 -0
  169. syncgram/methods/set_sticker_mask_position.py +17 -0
  170. syncgram/methods/set_sticker_position_in_set.py +16 -0
  171. syncgram/methods/set_sticker_set_thumbnail.py +16 -0
  172. syncgram/methods/set_sticker_set_title.py +13 -0
  173. syncgram/methods/set_user_emoji_status.py +14 -0
  174. syncgram/methods/set_webhook.py +19 -0
  175. syncgram/methods/stop_message_live_location.py +18 -0
  176. syncgram/methods/stop_poll.py +17 -0
  177. syncgram/methods/transfer_business_account_stars.py +13 -0
  178. syncgram/methods/transfer_gift.py +15 -0
  179. syncgram/methods/unban_chat_member.py +14 -0
  180. syncgram/methods/unban_chat_sender_chat.py +13 -0
  181. syncgram/methods/unhide_general_forum_topic.py +12 -0
  182. syncgram/methods/unpin_all_chat_messages.py +12 -0
  183. syncgram/methods/unpin_all_forum_topic_messages.py +13 -0
  184. syncgram/methods/unpin_all_general_forum_topic_messages.py +12 -0
  185. syncgram/methods/unpin_chat_message.py +14 -0
  186. syncgram/methods/upgrade_gift.py +15 -0
  187. syncgram/methods/upload_sticker_file.py +19 -0
  188. syncgram/methods/verify_chat.py +13 -0
  189. syncgram/methods/verify_user.py +13 -0
  190. syncgram/objects/__init__.py +400 -0
  191. syncgram/objects/accepted_gift_types.py +45 -0
  192. syncgram/objects/affiliate_info.py +51 -0
  193. syncgram/objects/animation.py +65 -0
  194. syncgram/objects/audio.py +65 -0
  195. syncgram/objects/background_fill.py +26 -0
  196. syncgram/objects/background_fill_freeform_gradient.py +33 -0
  197. syncgram/objects/background_fill_gradient.py +41 -0
  198. syncgram/objects/background_fill_solid.py +33 -0
  199. syncgram/objects/background_type.py +26 -0
  200. syncgram/objects/background_type_chat_theme.py +33 -0
  201. syncgram/objects/background_type_fill.py +41 -0
  202. syncgram/objects/background_type_pattern.py +55 -0
  203. syncgram/objects/background_type_wallpaper.py +49 -0
  204. syncgram/objects/birthdate.py +37 -0
  205. syncgram/objects/bot_access_settings.py +39 -0
  206. syncgram/objects/bot_command.py +37 -0
  207. syncgram/objects/bot_command_scope.py +26 -0
  208. syncgram/objects/bot_command_scope_all_chat_administrators.py +29 -0
  209. syncgram/objects/bot_command_scope_all_group_chats.py +29 -0
  210. syncgram/objects/bot_command_scope_all_private_chats.py +29 -0
  211. syncgram/objects/bot_command_scope_chat.py +33 -0
  212. syncgram/objects/bot_command_scope_chat_administrators.py +33 -0
  213. syncgram/objects/bot_command_scope_chat_member.py +37 -0
  214. syncgram/objects/bot_command_scope_default.py +29 -0
  215. syncgram/objects/bot_description.py +29 -0
  216. syncgram/objects/bot_name.py +29 -0
  217. syncgram/objects/bot_short_description.py +29 -0
  218. syncgram/objects/bot_subscription_updated.py +41 -0
  219. syncgram/objects/business_bot_rights.py +81 -0
  220. syncgram/objects/business_connection.py +55 -0
  221. syncgram/objects/business_intro.py +41 -0
  222. syncgram/objects/business_location.py +37 -0
  223. syncgram/objects/business_messages_deleted.py +41 -0
  224. syncgram/objects/business_opening_hours.py +39 -0
  225. syncgram/objects/business_opening_hours_interval.py +33 -0
  226. syncgram/objects/callback_game.py +26 -0
  227. syncgram/objects/callback_query.py +59 -0
  228. syncgram/objects/chat.py +57 -0
  229. syncgram/objects/chat_administrator_rights.py +97 -0
  230. syncgram/objects/chat_background.py +33 -0
  231. syncgram/objects/chat_boost.py +45 -0
  232. syncgram/objects/chat_boost_added.py +29 -0
  233. syncgram/objects/chat_boost_removed.py +47 -0
  234. syncgram/objects/chat_boost_source.py +26 -0
  235. syncgram/objects/chat_boost_source_gift_code.py +37 -0
  236. syncgram/objects/chat_boost_source_giveaway.py +49 -0
  237. syncgram/objects/chat_boost_source_premium.py +37 -0
  238. syncgram/objects/chat_boost_updated.py +39 -0
  239. syncgram/objects/chat_full_info.py +273 -0
  240. syncgram/objects/chat_invite_link.py +73 -0
  241. syncgram/objects/chat_join_request.py +61 -0
  242. syncgram/objects/chat_location.py +37 -0
  243. syncgram/objects/chat_member.py +26 -0
  244. syncgram/objects/chat_member_administrator.py +117 -0
  245. syncgram/objects/chat_member_banned.py +41 -0
  246. syncgram/objects/chat_member_left.py +37 -0
  247. syncgram/objects/chat_member_member.py +45 -0
  248. syncgram/objects/chat_member_owner.py +45 -0
  249. syncgram/objects/chat_member_restricted.py +113 -0
  250. syncgram/objects/chat_member_updated.py +67 -0
  251. syncgram/objects/chat_owner_changed.py +33 -0
  252. syncgram/objects/chat_owner_left.py +33 -0
  253. syncgram/objects/chat_permissions.py +89 -0
  254. syncgram/objects/chat_photo.py +41 -0
  255. syncgram/objects/chat_shared.py +51 -0
  256. syncgram/objects/checklist.py +55 -0
  257. syncgram/objects/checklist_task.py +59 -0
  258. syncgram/objects/checklist_tasks_added.py +41 -0
  259. syncgram/objects/checklist_tasks_done.py +41 -0
  260. syncgram/objects/chosen_inline_result.py +51 -0
  261. syncgram/objects/community.py +33 -0
  262. syncgram/objects/community_chat_added.py +33 -0
  263. syncgram/objects/community_chat_joined.py +33 -0
  264. syncgram/objects/community_chat_removed.py +26 -0
  265. syncgram/objects/contact.py +45 -0
  266. syncgram/objects/copy_text_button.py +29 -0
  267. syncgram/objects/dice.py +33 -0
  268. syncgram/objects/direct_message_price_changed.py +33 -0
  269. syncgram/objects/direct_messages_topic.py +37 -0
  270. syncgram/objects/disabled_button.py +26 -0
  271. syncgram/objects/document.py +53 -0
  272. syncgram/objects/encrypted_credentials.py +37 -0
  273. syncgram/objects/encrypted_passport_element.py +73 -0
  274. syncgram/objects/ephemeral_message_parameters.py +36 -0
  275. syncgram/objects/external_reply_info.py +181 -0
  276. syncgram/objects/file.py +41 -0
  277. syncgram/objects/force_reply.py +37 -0
  278. syncgram/objects/forum_topic.py +45 -0
  279. syncgram/objects/forum_topic_closed.py +26 -0
  280. syncgram/objects/forum_topic_created.py +41 -0
  281. syncgram/objects/forum_topic_edited.py +33 -0
  282. syncgram/objects/forum_topic_reopened.py +26 -0
  283. syncgram/objects/game.py +61 -0
  284. syncgram/objects/game_high_score.py +41 -0
  285. syncgram/objects/general_forum_topic_hidden.py +26 -0
  286. syncgram/objects/general_forum_topic_unhidden.py +26 -0
  287. syncgram/objects/gift.py +85 -0
  288. syncgram/objects/gift_background.py +37 -0
  289. syncgram/objects/gift_info.py +73 -0
  290. syncgram/objects/gifts.py +35 -0
  291. syncgram/objects/giveaway.py +67 -0
  292. syncgram/objects/giveaway_completed.py +45 -0
  293. syncgram/objects/giveaway_created.py +29 -0
  294. syncgram/objects/giveaway_winners.py +81 -0
  295. syncgram/objects/inaccessible_message.py +41 -0
  296. syncgram/objects/inline_keyboard_button.py +95 -0
  297. syncgram/objects/inline_keyboard_markup.py +39 -0
  298. syncgram/objects/inline_query.py +55 -0
  299. syncgram/objects/inline_query_result.py +26 -0
  300. syncgram/objects/inline_query_result_article.py +71 -0
  301. syncgram/objects/inline_query_result_audio.py +79 -0
  302. syncgram/objects/inline_query_result_cached_audio.py +67 -0
  303. syncgram/objects/inline_query_result_cached_document.py +75 -0
  304. syncgram/objects/inline_query_result_cached_gif.py +75 -0
  305. syncgram/objects/inline_query_result_cached_mpeg4_gif.py +75 -0
  306. syncgram/objects/inline_query_result_cached_photo.py +79 -0
  307. syncgram/objects/inline_query_result_cached_sticker.py +51 -0
  308. syncgram/objects/inline_query_result_cached_video.py +79 -0
  309. syncgram/objects/inline_query_result_cached_voice.py +71 -0
  310. syncgram/objects/inline_query_result_contact.py +75 -0
  311. syncgram/objects/inline_query_result_document.py +91 -0
  312. syncgram/objects/inline_query_result_game.py +45 -0
  313. syncgram/objects/inline_query_result_gif.py +95 -0
  314. syncgram/objects/inline_query_result_location.py +87 -0
  315. syncgram/objects/inline_query_result_mpeg4_gif.py +95 -0
  316. syncgram/objects/inline_query_result_photo.py +91 -0
  317. syncgram/objects/inline_query_result_venue.py +91 -0
  318. syncgram/objects/inline_query_result_video.py +99 -0
  319. syncgram/objects/inline_query_result_voice.py +75 -0
  320. syncgram/objects/inline_query_results_button.py +41 -0
  321. syncgram/objects/input_checklist.py +59 -0
  322. syncgram/objects/input_checklist_task.py +47 -0
  323. syncgram/objects/input_contact_message_content.py +41 -0
  324. syncgram/objects/input_file.py +26 -0
  325. syncgram/objects/input_invoice_message_content.py +111 -0
  326. syncgram/objects/input_location_message_content.py +49 -0
  327. syncgram/objects/input_media.py +26 -0
  328. syncgram/objects/input_media_animation.py +75 -0
  329. syncgram/objects/input_media_audio.py +67 -0
  330. syncgram/objects/input_media_document.py +59 -0
  331. syncgram/objects/input_media_link.py +33 -0
  332. syncgram/objects/input_media_live_photo.py +63 -0
  333. syncgram/objects/input_media_location.py +41 -0
  334. syncgram/objects/input_media_photo.py +59 -0
  335. syncgram/objects/input_media_sticker.py +37 -0
  336. syncgram/objects/input_media_venue.py +61 -0
  337. syncgram/objects/input_media_video.py +87 -0
  338. syncgram/objects/input_media_voice_note.py +55 -0
  339. syncgram/objects/input_message_content.py +26 -0
  340. syncgram/objects/input_paid_media.py +26 -0
  341. syncgram/objects/input_paid_media_live_photo.py +37 -0
  342. syncgram/objects/input_paid_media_photo.py +33 -0
  343. syncgram/objects/input_paid_media_video.py +61 -0
  344. syncgram/objects/input_poll_media.py +26 -0
  345. syncgram/objects/input_poll_option.py +49 -0
  346. syncgram/objects/input_poll_option_media.py +26 -0
  347. syncgram/objects/input_profile_photo.py +26 -0
  348. syncgram/objects/input_profile_photo_animated.py +37 -0
  349. syncgram/objects/input_profile_photo_static.py +33 -0
  350. syncgram/objects/input_rich_block.py +26 -0
  351. syncgram/objects/input_rich_block_anchor.py +33 -0
  352. syncgram/objects/input_rich_block_animation.py +43 -0
  353. syncgram/objects/input_rich_block_audio.py +43 -0
  354. syncgram/objects/input_rich_block_block_quotation.py +45 -0
  355. syncgram/objects/input_rich_block_buttons.py +43 -0
  356. syncgram/objects/input_rich_block_collage.py +45 -0
  357. syncgram/objects/input_rich_block_details.py +49 -0
  358. syncgram/objects/input_rich_block_divider.py +29 -0
  359. syncgram/objects/input_rich_block_document.py +43 -0
  360. syncgram/objects/input_rich_block_expandable_block_quotation.py +41 -0
  361. syncgram/objects/input_rich_block_footer.py +37 -0
  362. syncgram/objects/input_rich_block_list.py +39 -0
  363. syncgram/objects/input_rich_block_list_item.py +51 -0
  364. syncgram/objects/input_rich_block_map.py +55 -0
  365. syncgram/objects/input_rich_block_mathematical_expression.py +33 -0
  366. syncgram/objects/input_rich_block_paragraph.py +37 -0
  367. syncgram/objects/input_rich_block_photo.py +43 -0
  368. syncgram/objects/input_rich_block_preformatted.py +41 -0
  369. syncgram/objects/input_rich_block_pull_quotation.py +41 -0
  370. syncgram/objects/input_rich_block_section_heading.py +41 -0
  371. syncgram/objects/input_rich_block_slideshow.py +45 -0
  372. syncgram/objects/input_rich_block_table.py +57 -0
  373. syncgram/objects/input_rich_block_thinking.py +37 -0
  374. syncgram/objects/input_rich_block_video.py +43 -0
  375. syncgram/objects/input_rich_block_voice_note.py +43 -0
  376. syncgram/objects/input_rich_message.py +59 -0
  377. syncgram/objects/input_rich_message_content.py +33 -0
  378. syncgram/objects/input_rich_message_media.py +47 -0
  379. syncgram/objects/input_sticker.py +49 -0
  380. syncgram/objects/input_story_content.py +26 -0
  381. syncgram/objects/input_story_content_photo.py +33 -0
  382. syncgram/objects/input_story_content_video.py +45 -0
  383. syncgram/objects/input_text_message_content.py +49 -0
  384. syncgram/objects/input_venue_message_content.py +57 -0
  385. syncgram/objects/invoice.py +45 -0
  386. syncgram/objects/keyboard_button.py +77 -0
  387. syncgram/objects/keyboard_button_poll_type.py +29 -0
  388. syncgram/objects/keyboard_button_request_chat.py +73 -0
  389. syncgram/objects/keyboard_button_request_managed_bot.py +37 -0
  390. syncgram/objects/keyboard_button_request_users.py +53 -0
  391. syncgram/objects/labeled_price.py +33 -0
  392. syncgram/objects/link.py +29 -0
  393. syncgram/objects/link_preview_options.py +45 -0
  394. syncgram/objects/live_photo.py +63 -0
  395. syncgram/objects/location.py +49 -0
  396. syncgram/objects/location_address.py +41 -0
  397. syncgram/objects/login_url.py +41 -0
  398. syncgram/objects/managed_bot_created.py +33 -0
  399. syncgram/objects/managed_bot_updated.py +37 -0
  400. syncgram/objects/mask_position.py +41 -0
  401. syncgram/objects/maybe_inaccessible_message.py +26 -0
  402. syncgram/objects/menu_button.py +26 -0
  403. syncgram/objects/menu_button_commands.py +29 -0
  404. syncgram/objects/menu_button_default.py +29 -0
  405. syncgram/objects/menu_button_web_app.py +41 -0
  406. syncgram/objects/message.py +667 -0
  407. syncgram/objects/message_auto_delete_timer_changed.py +29 -0
  408. syncgram/objects/message_entity.py +65 -0
  409. syncgram/objects/message_generation_stopped.py +41 -0
  410. syncgram/objects/message_id.py +29 -0
  411. syncgram/objects/message_origin.py +26 -0
  412. syncgram/objects/message_origin_channel.py +49 -0
  413. syncgram/objects/message_origin_chat.py +45 -0
  414. syncgram/objects/message_origin_hidden_user.py +37 -0
  415. syncgram/objects/message_origin_user.py +41 -0
  416. syncgram/objects/message_reaction_count_updated.py +49 -0
  417. syncgram/objects/message_reaction_updated.py +65 -0
  418. syncgram/objects/order_info.py +45 -0
  419. syncgram/objects/owned_gift.py +26 -0
  420. syncgram/objects/owned_gift_regular.py +95 -0
  421. syncgram/objects/owned_gift_unique.py +67 -0
  422. syncgram/objects/owned_gifts.py +43 -0
  423. syncgram/objects/paid_media.py +26 -0
  424. syncgram/objects/paid_media_info.py +39 -0
  425. syncgram/objects/paid_media_live_photo.py +37 -0
  426. syncgram/objects/paid_media_photo.py +39 -0
  427. syncgram/objects/paid_media_preview.py +41 -0
  428. syncgram/objects/paid_media_purchased.py +37 -0
  429. syncgram/objects/paid_media_video.py +37 -0
  430. syncgram/objects/paid_message_price_changed.py +29 -0
  431. syncgram/objects/passport_data.py +41 -0
  432. syncgram/objects/passport_element_error.py +26 -0
  433. syncgram/objects/passport_element_error_data_field.py +45 -0
  434. syncgram/objects/passport_element_error_file.py +41 -0
  435. syncgram/objects/passport_element_error_files.py +41 -0
  436. syncgram/objects/passport_element_error_front_side.py +41 -0
  437. syncgram/objects/passport_element_error_reverse_side.py +41 -0
  438. syncgram/objects/passport_element_error_selfie.py +41 -0
  439. syncgram/objects/passport_element_error_translation_file.py +41 -0
  440. syncgram/objects/passport_element_error_translation_files.py +41 -0
  441. syncgram/objects/passport_element_error_unspecified.py +41 -0
  442. syncgram/objects/passport_file.py +41 -0
  443. syncgram/objects/photo_size.py +45 -0
  444. syncgram/objects/poll.py +125 -0
  445. syncgram/objects/poll_answer.py +51 -0
  446. syncgram/objects/poll_media.py +89 -0
  447. syncgram/objects/poll_option.py +69 -0
  448. syncgram/objects/poll_option_added.py +49 -0
  449. syncgram/objects/poll_option_deleted.py +49 -0
  450. syncgram/objects/pre_checkout_query.py +59 -0
  451. syncgram/objects/prepared_inline_message.py +33 -0
  452. syncgram/objects/prepared_keyboard_button.py +29 -0
  453. syncgram/objects/proximity_alert_triggered.py +41 -0
  454. syncgram/objects/reaction_count.py +37 -0
  455. syncgram/objects/reaction_type.py +26 -0
  456. syncgram/objects/reaction_type_custom_emoji.py +33 -0
  457. syncgram/objects/reaction_type_emoji.py +33 -0
  458. syncgram/objects/reaction_type_paid.py +29 -0
  459. syncgram/objects/refunded_payment.py +45 -0
  460. syncgram/objects/reply_keyboard_markup.py +59 -0
  461. syncgram/objects/reply_keyboard_remove.py +33 -0
  462. syncgram/objects/reply_parameters.py +71 -0
  463. syncgram/objects/response_parameters.py +33 -0
  464. syncgram/objects/revenue_withdrawal_state.py +26 -0
  465. syncgram/objects/revenue_withdrawal_state_failed.py +29 -0
  466. syncgram/objects/revenue_withdrawal_state_pending.py +29 -0
  467. syncgram/objects/revenue_withdrawal_state_succeeded.py +37 -0
  468. syncgram/objects/rich_block.py +26 -0
  469. syncgram/objects/rich_block_anchor.py +33 -0
  470. syncgram/objects/rich_block_animation.py +47 -0
  471. syncgram/objects/rich_block_audio.py +43 -0
  472. syncgram/objects/rich_block_block_quotation.py +45 -0
  473. syncgram/objects/rich_block_buttons.py +43 -0
  474. syncgram/objects/rich_block_caption.py +37 -0
  475. syncgram/objects/rich_block_collage.py +45 -0
  476. syncgram/objects/rich_block_details.py +49 -0
  477. syncgram/objects/rich_block_divider.py +29 -0
  478. syncgram/objects/rich_block_document.py +43 -0
  479. syncgram/objects/rich_block_expandable_block_quotation.py +41 -0
  480. syncgram/objects/rich_block_footer.py +37 -0
  481. syncgram/objects/rich_block_list.py +39 -0
  482. syncgram/objects/rich_block_list_item.py +55 -0
  483. syncgram/objects/rich_block_map.py +55 -0
  484. syncgram/objects/rich_block_mathematical_expression.py +33 -0
  485. syncgram/objects/rich_block_paragraph.py +37 -0
  486. syncgram/objects/rich_block_photo.py +49 -0
  487. syncgram/objects/rich_block_preformatted.py +41 -0
  488. syncgram/objects/rich_block_pull_quotation.py +41 -0
  489. syncgram/objects/rich_block_section_heading.py +41 -0
  490. syncgram/objects/rich_block_slideshow.py +45 -0
  491. syncgram/objects/rich_block_table.py +57 -0
  492. syncgram/objects/rich_block_table_cell.py +53 -0
  493. syncgram/objects/rich_block_thinking.py +37 -0
  494. syncgram/objects/rich_block_video.py +47 -0
  495. syncgram/objects/rich_block_voice_note.py +43 -0
  496. syncgram/objects/rich_message.py +39 -0
  497. syncgram/objects/rich_message_button.py +83 -0
  498. syncgram/objects/rich_text.py +26 -0
  499. syncgram/objects/rich_text_anchor.py +33 -0
  500. syncgram/objects/rich_text_anchor_link.py +41 -0
  501. syncgram/objects/rich_text_bank_card_number.py +41 -0
  502. syncgram/objects/rich_text_bold.py +37 -0
  503. syncgram/objects/rich_text_bot_command.py +41 -0
  504. syncgram/objects/rich_text_button.py +37 -0
  505. syncgram/objects/rich_text_cashtag.py +41 -0
  506. syncgram/objects/rich_text_code.py +37 -0
  507. syncgram/objects/rich_text_custom_emoji.py +37 -0
  508. syncgram/objects/rich_text_date_time.py +45 -0
  509. syncgram/objects/rich_text_email_address.py +41 -0
  510. syncgram/objects/rich_text_hashtag.py +41 -0
  511. syncgram/objects/rich_text_italic.py +37 -0
  512. syncgram/objects/rich_text_marked.py +37 -0
  513. syncgram/objects/rich_text_mathematical_expression.py +33 -0
  514. syncgram/objects/rich_text_mention.py +41 -0
  515. syncgram/objects/rich_text_phone_number.py +41 -0
  516. syncgram/objects/rich_text_reference.py +41 -0
  517. syncgram/objects/rich_text_reference_link.py +41 -0
  518. syncgram/objects/rich_text_spoiler.py +37 -0
  519. syncgram/objects/rich_text_strikethrough.py +37 -0
  520. syncgram/objects/rich_text_subscript.py +37 -0
  521. syncgram/objects/rich_text_superscript.py +37 -0
  522. syncgram/objects/rich_text_text_mention.py +43 -0
  523. syncgram/objects/rich_text_underline.py +37 -0
  524. syncgram/objects/rich_text_url.py +41 -0
  525. syncgram/objects/sent_guest_message.py +29 -0
  526. syncgram/objects/sent_web_app_message.py +29 -0
  527. syncgram/objects/shared_user.py +51 -0
  528. syncgram/objects/shipping_address.py +49 -0
  529. syncgram/objects/shipping_option.py +43 -0
  530. syncgram/objects/shipping_query.py +47 -0
  531. syncgram/objects/star_amount.py +33 -0
  532. syncgram/objects/star_transaction.py +53 -0
  533. syncgram/objects/star_transactions.py +35 -0
  534. syncgram/objects/sticker.py +93 -0
  535. syncgram/objects/sticker_set.py +53 -0
  536. syncgram/objects/story.py +37 -0
  537. syncgram/objects/story_area.py +39 -0
  538. syncgram/objects/story_area_position.py +49 -0
  539. syncgram/objects/story_area_type.py +26 -0
  540. syncgram/objects/story_area_type_link.py +33 -0
  541. syncgram/objects/story_area_type_location.py +45 -0
  542. syncgram/objects/story_area_type_suggested_reaction.py +45 -0
  543. syncgram/objects/story_area_type_unique_gift.py +33 -0
  544. syncgram/objects/story_area_type_weather.py +41 -0
  545. syncgram/objects/successful_payment.py +69 -0
  546. syncgram/objects/suggested_post_approval_failed.py +39 -0
  547. syncgram/objects/suggested_post_approved.py +43 -0
  548. syncgram/objects/suggested_post_declined.py +37 -0
  549. syncgram/objects/suggested_post_info.py +41 -0
  550. syncgram/objects/suggested_post_paid.py +47 -0
  551. syncgram/objects/suggested_post_parameters.py +37 -0
  552. syncgram/objects/suggested_post_price.py +33 -0
  553. syncgram/objects/suggested_post_refunded.py +37 -0
  554. syncgram/objects/switch_inline_query_chosen_chat.py +45 -0
  555. syncgram/objects/text_quote.py +47 -0
  556. syncgram/objects/transaction_partner.py +26 -0
  557. syncgram/objects/transaction_partner_affiliate_program.py +41 -0
  558. syncgram/objects/transaction_partner_chat.py +43 -0
  559. syncgram/objects/transaction_partner_fragment.py +37 -0
  560. syncgram/objects/transaction_partner_other.py +29 -0
  561. syncgram/objects/transaction_partner_telegram_ads.py +29 -0
  562. syncgram/objects/transaction_partner_telegram_api.py +33 -0
  563. syncgram/objects/transaction_partner_user.py +77 -0
  564. syncgram/objects/unique_gift.py +85 -0
  565. syncgram/objects/unique_gift_backdrop.py +41 -0
  566. syncgram/objects/unique_gift_backdrop_colors.py +41 -0
  567. syncgram/objects/unique_gift_colors.py +49 -0
  568. syncgram/objects/unique_gift_info.py +73 -0
  569. syncgram/objects/unique_gift_model.py +45 -0
  570. syncgram/objects/unique_gift_symbol.py +41 -0
  571. syncgram/objects/update.py +179 -0
  572. syncgram/objects/user.py +97 -0
  573. syncgram/objects/user_chat_boosts.py +35 -0
  574. syncgram/objects/user_profile_audios.py +39 -0
  575. syncgram/objects/user_profile_photos.py +39 -0
  576. syncgram/objects/user_rating.py +41 -0
  577. syncgram/objects/users_shared.py +39 -0
  578. syncgram/objects/venue.py +57 -0
  579. syncgram/objects/video.py +83 -0
  580. syncgram/objects/video_chat_ended.py +29 -0
  581. syncgram/objects/video_chat_participants_invited.py +35 -0
  582. syncgram/objects/video_chat_scheduled.py +29 -0
  583. syncgram/objects/video_chat_started.py +26 -0
  584. syncgram/objects/video_note.py +53 -0
  585. syncgram/objects/video_quality.py +49 -0
  586. syncgram/objects/voice.py +45 -0
  587. syncgram/objects/web_app_data.py +33 -0
  588. syncgram/objects/web_app_info.py +29 -0
  589. syncgram/objects/webhook_info.py +61 -0
  590. syncgram/objects/write_access_allowed.py +37 -0
  591. syncgram/router.py +170 -0
  592. syncgram-0.0.1.dist-info/METADATA +74 -0
  593. syncgram-0.0.1.dist-info/RECORD +595 -0
  594. syncgram-0.0.1.dist-info/WHEEL +5 -0
  595. syncgram-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def approve_chat_join_request(bot: TelegramBot, chat_id: str | int, user_id: int) -> bool:
8
+ """Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'user_id': user_id,
12
+ }
13
+ return bot.request('approveChatJoinRequest', payload)
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def approve_suggested_post(bot: TelegramBot, chat_id: int, message_id: int, send_date: int | None = None) -> bool:
8
+ """Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'message_id': message_id,
12
+ 'send_date': send_date,
13
+ }
14
+ return bot.request('approveSuggestedPost', payload)
@@ -0,0 +1,15 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def ban_chat_member(bot: TelegramBot, chat_id: str | int, user_id: int, until_date: int | None = None, revoke_messages: bool | None = None) -> bool:
8
+ """Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'user_id': user_id,
12
+ 'until_date': until_date,
13
+ 'revoke_messages': revoke_messages,
14
+ }
15
+ return bot.request('banChatMember', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def ban_chat_sender_chat(bot: TelegramBot, chat_id: str | int, sender_chat_id: int) -> bool:
8
+ """Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'sender_chat_id': sender_chat_id,
12
+ }
13
+ return bot.request('banChatSenderChat', payload)
@@ -0,0 +1,11 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def close(bot: TelegramBot) -> bool:
8
+ """Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters."""
9
+ payload = {
10
+ }
11
+ return bot.request('close', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def close_forum_topic(bot: TelegramBot, chat_id: str | int, message_thread_id: int) -> bool:
8
+ """Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'message_thread_id': message_thread_id,
12
+ }
13
+ return bot.request('closeForumTopic', payload)
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def close_general_forum_topic(bot: TelegramBot, chat_id: str | int) -> bool:
8
+ """Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ }
12
+ return bot.request('closeGeneralForumTopic', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def convert_gift_to_stars(bot: TelegramBot, business_connection_id: str, owned_gift_id: str) -> bool:
8
+ """Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success."""
9
+ payload = {
10
+ 'business_connection_id': business_connection_id,
11
+ 'owned_gift_id': owned_gift_id,
12
+ }
13
+ return bot.request('convertGiftToStars', payload)
@@ -0,0 +1,36 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.force_reply import ForceReply
6
+ from ..objects.inline_keyboard_markup import InlineKeyboardMarkup
7
+ from ..objects.message_entity import MessageEntity
8
+ from ..objects.message_id import MessageId
9
+ from ..objects.reply_keyboard_markup import ReplyKeyboardMarkup
10
+ from ..objects.reply_keyboard_remove import ReplyKeyboardRemove
11
+ from ..objects.reply_parameters import ReplyParameters
12
+ from ..objects.suggested_post_parameters import SuggestedPostParameters
13
+ from ..bot import TelegramBot
14
+
15
+ def copy_message(bot: TelegramBot, chat_id: str | int, from_chat_id: str | int, message_id: int, message_thread_id: int | None = None, direct_messages_topic_id: int | None = None, video_start_timestamp: int | None = None, caption: str | None = None, parse_mode: str | None = None, caption_entities: list[MessageEntity] | None = None, show_caption_above_media: bool | None = None, disable_notification: bool | None = None, protect_content: bool | None = None, allow_paid_broadcast: bool | None = None, message_effect_id: str | None = None, suggested_post_parameters: SuggestedPostParameters | None = None, reply_parameters: ReplyParameters | None = None, reply_markup: ReplyKeyboardRemove | ReplyKeyboardMarkup | InlineKeyboardMarkup | ForceReply | None = None) -> MessageId:
16
+ """Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_ids is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success."""
17
+ payload = {
18
+ 'chat_id': chat_id,
19
+ 'from_chat_id': from_chat_id,
20
+ 'message_id': message_id,
21
+ 'message_thread_id': message_thread_id,
22
+ 'direct_messages_topic_id': direct_messages_topic_id,
23
+ 'video_start_timestamp': video_start_timestamp,
24
+ 'caption': caption,
25
+ 'parse_mode': parse_mode,
26
+ 'caption_entities': caption_entities,
27
+ 'show_caption_above_media': show_caption_above_media,
28
+ 'disable_notification': disable_notification,
29
+ 'protect_content': protect_content,
30
+ 'allow_paid_broadcast': allow_paid_broadcast,
31
+ 'message_effect_id': message_effect_id,
32
+ 'suggested_post_parameters': suggested_post_parameters,
33
+ 'reply_parameters': reply_parameters,
34
+ 'reply_markup': reply_markup,
35
+ }
36
+ return bot.request('copyMessage', payload)
@@ -0,0 +1,20 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.message_id import MessageId
6
+ from ..bot import TelegramBot
7
+
8
+ def copy_messages(bot: TelegramBot, chat_id: str | int, from_chat_id: str | int, message_ids: list[int], message_thread_id: int | None = None, direct_messages_topic_id: int | None = None, disable_notification: bool | None = None, protect_content: bool | None = None, remove_caption: bool | None = None) -> list[MessageId]:
9
+ """Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_ids is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an Array of MessageId of the sent messages is returned."""
10
+ payload = {
11
+ 'chat_id': chat_id,
12
+ 'from_chat_id': from_chat_id,
13
+ 'message_ids': message_ids,
14
+ 'message_thread_id': message_thread_id,
15
+ 'direct_messages_topic_id': direct_messages_topic_id,
16
+ 'disable_notification': disable_notification,
17
+ 'protect_content': protect_content,
18
+ 'remove_caption': remove_caption,
19
+ }
20
+ return bot.request('copyMessages', payload)
@@ -0,0 +1,17 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.chat_invite_link import ChatInviteLink
6
+ from ..bot import TelegramBot
7
+
8
+ def create_chat_invite_link(bot: TelegramBot, chat_id: str | int, name: str | None = None, expire_date: int | None = None, member_limit: int | None = None, creates_join_request: bool | None = None) -> ChatInviteLink:
9
+ """Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object."""
10
+ payload = {
11
+ 'chat_id': chat_id,
12
+ 'name': name,
13
+ 'expire_date': expire_date,
14
+ 'member_limit': member_limit,
15
+ 'creates_join_request': creates_join_request,
16
+ }
17
+ return bot.request('createChatInviteLink', payload)
@@ -0,0 +1,16 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.chat_invite_link import ChatInviteLink
6
+ from ..bot import TelegramBot
7
+
8
+ def create_chat_subscription_invite_link(bot: TelegramBot, chat_id: str | int, subscription_period: int, subscription_price: int, name: str | None = None) -> ChatInviteLink:
9
+ """Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object."""
10
+ payload = {
11
+ 'chat_id': chat_id,
12
+ 'subscription_period': subscription_period,
13
+ 'subscription_price': subscription_price,
14
+ 'name': name,
15
+ }
16
+ return bot.request('createChatSubscriptionInviteLink', payload)
@@ -0,0 +1,16 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.forum_topic import ForumTopic
6
+ from ..bot import TelegramBot
7
+
8
+ def create_forum_topic(bot: TelegramBot, chat_id: str | int, name: str, icon_color: int | None = None, icon_custom_emoji_id: str | None = None) -> ForumTopic:
9
+ """Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object."""
10
+ payload = {
11
+ 'chat_id': chat_id,
12
+ 'name': name,
13
+ 'icon_color': icon_color,
14
+ 'icon_custom_emoji_id': icon_custom_emoji_id,
15
+ }
16
+ return bot.request('createForumTopic', payload)
@@ -0,0 +1,34 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.labeled_price import LabeledPrice
6
+ from ..bot import TelegramBot
7
+
8
+ def create_invoice_link(bot: TelegramBot, title: str, description: str, payload: str, currency: str, prices: list[LabeledPrice], business_connection_id: str | None = None, provider_token: str | None = None, subscription_period: int | None = None, max_tip_amount: int | None = None, suggested_tip_amounts: list[int] | None = None, provider_data: str | None = None, photo_url: str | None = None, photo_size: int | None = None, photo_width: int | None = None, photo_height: int | None = None, need_name: bool | None = None, need_phone_number: bool | None = None, need_email: bool | None = None, need_shipping_address: bool | None = None, send_phone_number_to_provider: bool | None = None, send_email_to_provider: bool | None = None, is_flexible: bool | None = None) -> str:
9
+ """Use this method to create a link for an invoice. Returns the created invoice link as String on success."""
10
+ payload = {
11
+ 'title': title,
12
+ 'description': description,
13
+ 'payload': payload,
14
+ 'currency': currency,
15
+ 'prices': prices,
16
+ 'business_connection_id': business_connection_id,
17
+ 'provider_token': provider_token,
18
+ 'subscription_period': subscription_period,
19
+ 'max_tip_amount': max_tip_amount,
20
+ 'suggested_tip_amounts': suggested_tip_amounts,
21
+ 'provider_data': provider_data,
22
+ 'photo_url': photo_url,
23
+ 'photo_size': photo_size,
24
+ 'photo_width': photo_width,
25
+ 'photo_height': photo_height,
26
+ 'need_name': need_name,
27
+ 'need_phone_number': need_phone_number,
28
+ 'need_email': need_email,
29
+ 'need_shipping_address': need_shipping_address,
30
+ 'send_phone_number_to_provider': send_phone_number_to_provider,
31
+ 'send_email_to_provider': send_email_to_provider,
32
+ 'is_flexible': is_flexible,
33
+ }
34
+ return bot.request('createInvoiceLink', payload)
@@ -0,0 +1,18 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.input_sticker import InputSticker
6
+ from ..bot import TelegramBot
7
+
8
+ def create_new_sticker_set(bot: TelegramBot, user_id: int, name: str, title: str, stickers: list[InputSticker], sticker_type: str | None = None, needs_repainting: bool | None = None) -> bool:
9
+ """Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success."""
10
+ payload = {
11
+ 'user_id': user_id,
12
+ 'name': name,
13
+ 'title': title,
14
+ 'stickers': stickers,
15
+ 'sticker_type': sticker_type,
16
+ 'needs_repainting': needs_repainting,
17
+ }
18
+ return bot.request('createNewStickerSet', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def decline_chat_join_request(bot: TelegramBot, chat_id: str | int, user_id: int) -> bool:
8
+ """Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'user_id': user_id,
12
+ }
13
+ return bot.request('declineChatJoinRequest', payload)
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def decline_suggested_post(bot: TelegramBot, chat_id: int, message_id: int, comment: str | None = None) -> bool:
8
+ """Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'message_id': message_id,
12
+ 'comment': comment,
13
+ }
14
+ return bot.request('declineSuggestedPost', payload)
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_all_message_reactions(bot: TelegramBot, chat_id: str | int, user_id: int | None = None, actor_chat_id: int | None = None) -> bool:
8
+ """Use this method to remove up to 10000 recent reactions in a group or a supergroup chat added by a given user or chat. The bot must have the 'can_delete_messages' administrator right in the chat. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'user_id': user_id,
12
+ 'actor_chat_id': actor_chat_id,
13
+ }
14
+ return bot.request('deleteAllMessageReactions', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_business_messages(bot: TelegramBot, business_connection_id: str, message_ids: list[int]) -> bool:
8
+ """Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success."""
9
+ payload = {
10
+ 'business_connection_id': business_connection_id,
11
+ 'message_ids': message_ids,
12
+ }
13
+ return bot.request('deleteBusinessMessages', payload)
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_chat_photo(bot: TelegramBot, chat_id: str | int) -> bool:
8
+ """Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ }
12
+ return bot.request('deleteChatPhoto', payload)
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_chat_sticker_set(bot: TelegramBot, chat_id: str | int) -> bool:
8
+ """Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ }
12
+ return bot.request('deleteChatStickerSet', payload)
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_ephemeral_message(bot: TelegramBot, chat_id: str | int, receiver_user_id: int, ephemeral_message_id: int) -> bool:
8
+ """Use this method to delete an ephemeral message. Note that it is not guaranteed that the user will receive the message deletion event, especially if they are offline. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'receiver_user_id': receiver_user_id,
12
+ 'ephemeral_message_id': ephemeral_message_id,
13
+ }
14
+ return bot.request('deleteEphemeralMessage', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_forum_topic(bot: TelegramBot, chat_id: str | int, message_thread_id: int) -> bool:
8
+ """Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'message_thread_id': message_thread_id,
12
+ }
13
+ return bot.request('deleteForumTopic', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_message(bot: TelegramBot, chat_id: str | int, message_id: int) -> bool:
8
+ """Use this method to delete a message, including service messages, with the following limitations: - A message can only be deleted if it was sent less than 48 hours ago. - Service messages about a supergroup, channel, or forum topic creation can't be deleted. - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - Bots can delete outgoing messages in private chats, groups, and supergroups. - Bots can delete incoming messages in private chats. - Bots granted can_post_messages permissions can delete outgoing messages in channels. - If the bot is an administrator of a group, it can delete any message there. - If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there. - If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'message_id': message_id,
12
+ }
13
+ return bot.request('deleteMessage', payload)
@@ -0,0 +1,15 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_message_reaction(bot: TelegramBot, chat_id: str | int, message_id: int, user_id: int | None = None, actor_chat_id: int | None = None) -> bool:
8
+ """Use this method to remove a reaction from a message in a group or a supergroup chat. The bot must have the 'can_delete_messages' administrator right in the chat. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'message_id': message_id,
12
+ 'user_id': user_id,
13
+ 'actor_chat_id': actor_chat_id,
14
+ }
15
+ return bot.request('deleteMessageReaction', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_messages(bot: TelegramBot, chat_id: str | int, message_ids: list[int]) -> bool:
8
+ """Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success."""
9
+ payload = {
10
+ 'chat_id': chat_id,
11
+ 'message_ids': message_ids,
12
+ }
13
+ return bot.request('deleteMessages', payload)
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.bot_command_scope import BotCommandScope
6
+ from ..bot import TelegramBot
7
+
8
+ def delete_my_commands(bot: TelegramBot, scope: BotCommandScope | None = None, language_code: str | None = None) -> bool:
9
+ """Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success."""
10
+ payload = {
11
+ 'scope': scope,
12
+ 'language_code': language_code,
13
+ }
14
+ return bot.request('deleteMyCommands', payload)
@@ -0,0 +1,15 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_sticker_from_set(bot: TelegramBot, sticker_: str) -> bool:
8
+ """Use this method to delete a sticker from a set created by the bot. Returns True on success."""
9
+ payload = {
10
+ }
11
+ files = {
12
+ 'sticker': sticker_,
13
+ }
14
+ files = {k: v for k, v in files.items() if v is not None}
15
+ return bot.request('deleteStickerFromSet', payload, files=files if files else None)
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_sticker_set(bot: TelegramBot, name: str) -> bool:
8
+ """Use this method to delete a sticker set that was created by the bot. Returns True on success."""
9
+ payload = {
10
+ 'name': name,
11
+ }
12
+ return bot.request('deleteStickerSet', payload)
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_story(bot: TelegramBot, business_connection_id: str, story_id: int) -> bool:
8
+ """Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success."""
9
+ payload = {
10
+ 'business_connection_id': business_connection_id,
11
+ 'story_id': story_id,
12
+ }
13
+ return bot.request('deleteStory', payload)
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..bot import TelegramBot
6
+
7
+ def delete_webhook(bot: TelegramBot, drop_pending_updates: bool | None = None) -> bool:
8
+ """Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success."""
9
+ payload = {
10
+ 'drop_pending_updates': drop_pending_updates,
11
+ }
12
+ return bot.request('deleteWebhook', payload)
@@ -0,0 +1,18 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.chat_invite_link import ChatInviteLink
6
+ from ..bot import TelegramBot
7
+
8
+ def edit_chat_invite_link(bot: TelegramBot, chat_id: str | int, invite_link: str, name: str | None = None, expire_date: int | None = None, member_limit: int | None = None, creates_join_request: bool | None = None) -> ChatInviteLink:
9
+ """Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object."""
10
+ payload = {
11
+ 'chat_id': chat_id,
12
+ 'invite_link': invite_link,
13
+ 'name': name,
14
+ 'expire_date': expire_date,
15
+ 'member_limit': member_limit,
16
+ 'creates_join_request': creates_join_request,
17
+ }
18
+ return bot.request('editChatInviteLink', payload)
@@ -0,0 +1,15 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.chat_invite_link import ChatInviteLink
6
+ from ..bot import TelegramBot
7
+
8
+ def edit_chat_subscription_invite_link(bot: TelegramBot, chat_id: str | int, invite_link: str, name: str | None = None) -> ChatInviteLink:
9
+ """Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object."""
10
+ payload = {
11
+ 'chat_id': chat_id,
12
+ 'invite_link': invite_link,
13
+ 'name': name,
14
+ }
15
+ return bot.request('editChatSubscriptionInviteLink', payload)
@@ -0,0 +1,21 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.inline_keyboard_markup import InlineKeyboardMarkup
6
+ from ..objects.message_entity import MessageEntity
7
+ from ..bot import TelegramBot
8
+
9
+ def edit_ephemeral_message_caption(bot: TelegramBot, chat_id: str | int, receiver_user_id: int, ephemeral_message_id: int, caption: str | None = None, parse_mode: str | None = None, caption_entities: list[MessageEntity] | None = None, show_caption_above_media: bool | None = None, reply_markup: InlineKeyboardMarkup | None = None) -> bool:
10
+ """Use this method to edit the caption of an ephemeral message. Note that it is not guaranteed that the user will receive the message edit event, especially if they are offline. On success, True is returned."""
11
+ payload = {
12
+ 'chat_id': chat_id,
13
+ 'receiver_user_id': receiver_user_id,
14
+ 'ephemeral_message_id': ephemeral_message_id,
15
+ 'caption': caption,
16
+ 'parse_mode': parse_mode,
17
+ 'caption_entities': caption_entities,
18
+ 'show_caption_above_media': show_caption_above_media,
19
+ 'reply_markup': reply_markup,
20
+ }
21
+ return bot.request('editEphemeralMessageCaption', payload)
@@ -0,0 +1,18 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.inline_keyboard_markup import InlineKeyboardMarkup
6
+ from ..objects.input_media import InputMedia
7
+ from ..bot import TelegramBot
8
+
9
+ def edit_ephemeral_message_media(bot: TelegramBot, chat_id: str | int, receiver_user_id: int, ephemeral_message_id: int, media: InputMedia, reply_markup: InlineKeyboardMarkup | None = None) -> bool:
10
+ """Use this method to edit the media of an ephemeral message. Note that it is not guaranteed that the user will receive the message edit event, especially if they are offline. On success, True is returned."""
11
+ payload = {
12
+ 'chat_id': chat_id,
13
+ 'receiver_user_id': receiver_user_id,
14
+ 'ephemeral_message_id': ephemeral_message_id,
15
+ 'media': media,
16
+ 'reply_markup': reply_markup,
17
+ }
18
+ return bot.request('editEphemeralMessageMedia', payload)
@@ -0,0 +1,16 @@
1
+ from __future__ import annotations
2
+ from typing import TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from ..objects.inline_keyboard_markup import InlineKeyboardMarkup
6
+ from ..bot import TelegramBot
7
+
8
+ def edit_ephemeral_message_reply_markup(bot: TelegramBot, chat_id: str | int, receiver_user_id: int, ephemeral_message_id: int, reply_markup: InlineKeyboardMarkup | None = None) -> bool:
9
+ """Use this method to edit only the reply markup of an ephemeral message. Note that it is not guaranteed that the user will receive the message edit event, especially if they are offline. On success, True is returned."""
10
+ payload = {
11
+ 'chat_id': chat_id,
12
+ 'receiver_user_id': receiver_user_id,
13
+ 'ephemeral_message_id': ephemeral_message_id,
14
+ 'reply_markup': reply_markup,
15
+ }
16
+ return bot.request('editEphemeralMessageReplyMarkup', payload)