Pytdbot 0.9.10__tar.gz → 0.9.10.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/PKG-INFO +2 -2
  2. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/Pytdbot.egg-info/PKG-INFO +2 -2
  3. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/README.md +1 -1
  4. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/__init__.py +4 -4
  5. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/methods/td_functions.py +111 -144
  6. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/__init__.py +39 -133
  7. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/td_types.py +714 -2409
  8. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/__init__.py +29 -32
  9. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/LICENSE +0 -0
  10. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/MANIFEST.in +0 -0
  11. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/Pytdbot.egg-info/SOURCES.txt +0 -0
  12. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/Pytdbot.egg-info/dependency_links.txt +0 -0
  13. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/Pytdbot.egg-info/requires.txt +0 -0
  14. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/Pytdbot.egg-info/top_level.txt +0 -0
  15. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/client.py +0 -0
  16. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/client_manager.py +0 -0
  17. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/exception/__init__.py +0 -0
  18. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/filters.py +0 -0
  19. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/handlers/__init__.py +0 -0
  20. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/handlers/decorators.py +0 -0
  21. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/handlers/handler.py +0 -0
  22. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/handlers/td_updates.py +0 -0
  23. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/methods/__init__.py +0 -0
  24. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/methods/methods.py +0 -0
  25. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/tdjson/__init__.py +0 -0
  26. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/tdjson/tdjson.py +0 -0
  27. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/bound_methods/__init__.py +0 -0
  28. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/bound_methods/callback_query.py +0 -0
  29. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/bound_methods/chatActions.py +0 -0
  30. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/bound_methods/file.py +0 -0
  31. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/bound_methods/message.py +0 -0
  32. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/bound_methods/sender_id.py +0 -0
  33. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/plugins/__init__.py +0 -0
  34. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/tdserver/__init__.py +0 -0
  35. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/tdserver/schedule.py +0 -0
  36. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/types/tdserver/stats.py +0 -0
  37. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/asyncio_utils.py +0 -0
  38. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/escape.py +0 -0
  39. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/json_utils.py +0 -0
  40. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/obj_encoder.py +0 -0
  41. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/strings.py +0 -0
  42. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/text_format.py +0 -0
  43. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/pytdbot/utils/webapps.py +0 -0
  44. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/requirements.txt +0 -0
  45. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/setup.cfg +0 -0
  46. {pytdbot-0.9.10 → pytdbot-0.9.10.dev0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Pytdbot
3
- Version: 0.9.10
3
+ Version: 0.9.10.dev0
4
4
  Summary: Easy-to-use asynchronous TDLib wrapper for Python.
5
5
  Home-page: https://github.com/pytdbot/client
6
6
  Author: AYMEN Mohammed
@@ -30,7 +30,7 @@ Dynamic: requires-dist
30
30
  Dynamic: requires-python
31
31
  Dynamic: summary
32
32
 
33
- # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.61-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot) [![Telegram Chat](https://img.shields.io/badge/Pytdbot%20chat-blue?logo=telegram&label=Telegram)](https://t.me/pytdbotchat)
33
+ # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.60-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot) [![Telegram Chat](https://img.shields.io/badge/Pytdbot%20chat-blue?logo=telegram&label=Telegram)](https://t.me/pytdbotchat)
34
34
 
35
35
  <a href="https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL&n=AYMEN&t=5&c=You+deserve+a+Cup+of+TON+for+Pytdbot%2521" target="_blank" rel="noopener">
36
36
  <img src="https://cupofton.pages.dev/assets/badge-1.svg" alt="Buy me a Cup of TON" style="width: 600px; height: auto;">
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Pytdbot
3
- Version: 0.9.10
3
+ Version: 0.9.10.dev0
4
4
  Summary: Easy-to-use asynchronous TDLib wrapper for Python.
5
5
  Home-page: https://github.com/pytdbot/client
6
6
  Author: AYMEN Mohammed
@@ -30,7 +30,7 @@ Dynamic: requires-dist
30
30
  Dynamic: requires-python
31
31
  Dynamic: summary
32
32
 
33
- # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.61-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot) [![Telegram Chat](https://img.shields.io/badge/Pytdbot%20chat-blue?logo=telegram&label=Telegram)](https://t.me/pytdbotchat)
33
+ # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.60-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot) [![Telegram Chat](https://img.shields.io/badge/Pytdbot%20chat-blue?logo=telegram&label=Telegram)](https://t.me/pytdbotchat)
34
34
 
35
35
  <a href="https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL&n=AYMEN&t=5&c=You+deserve+a+Cup+of+TON+for+Pytdbot%2521" target="_blank" rel="noopener">
36
36
  <img src="https://cupofton.pages.dev/assets/badge-1.svg" alt="Buy me a Cup of TON" style="width: 600px; height: auto;">
@@ -1,4 +1,4 @@
1
- # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.61-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot) [![Telegram Chat](https://img.shields.io/badge/Pytdbot%20chat-blue?logo=telegram&label=Telegram)](https://t.me/pytdbotchat)
1
+ # Pytdbot [![Version](https://img.shields.io/pypi/v/Pytdbot?style=flat&logo=pypi)](https://pypi.org/project/Pytdbot) [![TDLib version](https://img.shields.io/badge/TDLib-v1.8.60-blue?logo=telegram)](https://github.com/tdlib/td) [![Downloads](https://static.pepy.tech/personalized-badge/pytdbot?period=month&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/pytdbot) [![Telegram Chat](https://img.shields.io/badge/Pytdbot%20chat-blue?logo=telegram&label=Telegram)](https://t.me/pytdbotchat)
2
2
 
3
3
  <a href="https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL&n=AYMEN&t=5&c=You+deserve+a+Cup+of+TON+for+Pytdbot%2521" target="_blank" rel="noopener">
4
4
  <img src="https://cupofton.pages.dev/assets/badge-1.svg" alt="Buy me a Cup of TON" style="width: 600px; height: auto;">
@@ -1,7 +1,7 @@
1
- from . import exception, filters, types, utils
2
- from .client import Client
3
- from .client_manager import ClientManager
1
+ from . import types, utils, filters, exception
4
2
  from .tdjson import TdJson
3
+ from .client_manager import ClientManager
4
+ from .client import Client
5
5
 
6
6
  __all__ = [
7
7
  "types",
@@ -13,7 +13,7 @@ __all__ = [
13
13
  "Client",
14
14
  ]
15
15
 
16
- __version__ = "0.9.10"
16
+ __version__ = "0.9.10dev0"
17
17
  __copyright__ = "Copyright (c) 2022-2026 Pytdbot, AYMENJD"
18
18
  __license__ = "MIT License"
19
19
 
@@ -2739,7 +2739,7 @@ class TDLibFunctions:
2739
2739
  The maximum number of messages to be returned; up to 100\. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
2740
2740
 
2741
2741
  star_count (:class:`int`):
2742
- The Telegram Star amount the user agreed to pay for the search; pass 0 for free searches
2742
+ The amount of Telegram Stars the user agreed to pay for the search; pass 0 for free searches
2743
2743
 
2744
2744
  Returns:
2745
2745
  :class:`~pytdbot.types.FoundPublicPosts`
@@ -5289,7 +5289,7 @@ class TDLibFunctions:
5289
5289
  async def getBusinessAccountStarAmount(
5290
5290
  self, business_connection_id: str = ""
5291
5291
  ) -> Union["pytdbot.types.Error", "pytdbot.types.StarAmount"]:
5292
- r"""Returns the Telegram Star amount owned by a business account; for bots only
5292
+ r"""Returns the amount of Telegram Stars owned by a business account; for bots only
5293
5293
 
5294
5294
  Parameters:
5295
5295
  business_connection_id (:class:`str`):
@@ -7075,7 +7075,7 @@ class TDLibFunctions:
7075
7075
  Button identifier
7076
7076
 
7077
7077
  allow_write_access (:class:`bool`):
7078
- Pass true to allow the bot to send messages to the current user\. Phone number access can't be requested using the button
7078
+ Pass true to allow the bot to send messages to the current user
7079
7079
 
7080
7080
  Returns:
7081
7081
  :class:`~pytdbot.types.HttpUrl`
@@ -7230,7 +7230,7 @@ class TDLibFunctions:
7230
7230
  Identifier of the inline query
7231
7231
 
7232
7232
  is_personal (:class:`bool`):
7233
- Pass true if results may be cached and returned only for the user who sent the query\. By default, results may be returned to any user who sends the same query
7233
+ Pass true if results may be cached and returned only for the user that sent the query\. By default, results may be returned to any user who sends the same query
7234
7234
 
7235
7235
  button (:class:`~pytdbot.types.InlineQueryResultsButton`):
7236
7236
  Button to be shown above inline query results; pass null if none
@@ -7938,7 +7938,7 @@ class TDLibFunctions:
7938
7938
  Chat identifier
7939
7939
 
7940
7940
  topic_id (:class:`~pytdbot.types.MessageTopic`):
7941
- Identifier of the topic in which the action is performed; pass null if none
7941
+ Identifier of the topic in which the action is performed
7942
7942
 
7943
7943
  business_connection_id (:class:`str`):
7944
7944
  Unique identifier of business connection on behalf of which to send the request; for bots only
@@ -8161,22 +8161,16 @@ class TDLibFunctions:
8161
8161
  return await self.invoke({"@type": "getExternalLinkInfo", "link": link})
8162
8162
 
8163
8163
  async def getExternalLink(
8164
- self,
8165
- link: str = "",
8166
- allow_write_access: bool = False,
8167
- allow_phone_number_access: bool = False,
8164
+ self, link: str = "", allow_write_access: bool = False
8168
8165
  ) -> Union["pytdbot.types.Error", "pytdbot.types.HttpUrl"]:
8169
- r"""Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link\. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed\. May return an empty link if just a toast about successful login has to be shown
8166
+ r"""Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link\. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed
8170
8167
 
8171
8168
  Parameters:
8172
8169
  link (:class:`str`):
8173
8170
  The HTTP link
8174
8171
 
8175
8172
  allow_write_access (:class:`bool`):
8176
- Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to send them messages
8177
-
8178
- allow_phone_number_access (:class:`bool`):
8179
- Pass true if the current user allowed the bot that was returned in getExternalLinkInfo, to access their phone number
8173
+ Pass true if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages
8180
8174
 
8181
8175
  Returns:
8182
8176
  :class:`~pytdbot.types.HttpUrl`
@@ -8187,7 +8181,6 @@ class TDLibFunctions:
8187
8181
  "@type": "getExternalLink",
8188
8182
  "link": link,
8189
8183
  "allow_write_access": allow_write_access,
8190
- "allow_phone_number_access": allow_phone_number_access,
8191
8184
  }
8192
8185
  )
8193
8186
 
@@ -9708,7 +9701,7 @@ class TDLibFunctions:
9708
9701
  Point in time \(Unix timestamp\) when the user will be unbanned; 0 if never\. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever\. Ignored in basic groups and if a chat is banned
9709
9702
 
9710
9703
  revoke_messages (:class:`bool`):
9711
- Pass true to delete all messages in the chat for the user who is being removed\. Always true for supergroups and channels
9704
+ Pass true to delete all messages in the chat for the user that is being removed\. Always true for supergroups and channels
9712
9705
 
9713
9706
  Returns:
9714
9707
  :class:`~pytdbot.types.Ok`
@@ -9767,23 +9760,6 @@ class TDLibFunctions:
9767
9760
  }
9768
9761
  )
9769
9762
 
9770
- async def getChatOwnerAfterLeaving(
9771
- self, chat_id: int = 0
9772
- ) -> Union["pytdbot.types.Error", "pytdbot.types.User"]:
9773
- r"""Returns the user who will become the owner of the chat after 7 days if the current user does not return to the chat during that period; requires owner privileges in the chat\. Available only for supergroups and channel chats
9774
-
9775
- Parameters:
9776
- chat_id (:class:`int`):
9777
- Chat identifier
9778
-
9779
- Returns:
9780
- :class:`~pytdbot.types.User`
9781
- """
9782
-
9783
- return await self.invoke(
9784
- {"@type": "getChatOwnerAfterLeaving", "chat_id": chat_id}
9785
- )
9786
-
9787
9763
  async def getChatMember(
9788
9764
  self, chat_id: int = 0, member_id: "pytdbot.types.MessageSender" = None
9789
9765
  ) -> Union["pytdbot.types.Error", "pytdbot.types.ChatMember"]:
@@ -12474,7 +12450,7 @@ class TDLibFunctions:
12474
12450
  Chat identifier
12475
12451
 
12476
12452
  user_id (:class:`int`):
12477
- Identifier of the user who sent the request
12453
+ Identifier of the user that sent the request
12478
12454
 
12479
12455
  approve (:class:`bool`):
12480
12456
  Pass true to approve the request; pass false to decline it
@@ -18015,7 +17991,7 @@ class TDLibFunctions:
18015
17991
  The number of Telegram Stars to place in the bid
18016
17992
 
18017
17993
  user_id (:class:`int`):
18018
- Identifier of the user who will receive the gift
17994
+ Identifier of the user that will receive the gift
18019
17995
 
18020
17996
  text (:class:`~pytdbot.types.FormattedText`):
18021
17997
  Text to show along with the gift; 0\-getOption\(\"gift\_text\_length\_max\"\) characters\. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed\. Must be empty if the receiver enabled paid messages
@@ -18161,51 +18137,35 @@ class TDLibFunctions:
18161
18137
  )
18162
18138
 
18163
18139
  async def getGiftUpgradePreview(
18164
- self, regular_gift_id: int = 0
18140
+ self, gift_id: int = 0
18165
18141
  ) -> Union["pytdbot.types.Error", "pytdbot.types.GiftUpgradePreview"]:
18166
18142
  r"""Returns examples of possible upgraded gifts for a regular gift
18167
18143
 
18168
18144
  Parameters:
18169
- regular_gift_id (:class:`int`):
18170
- Identifier of the regular gift
18145
+ gift_id (:class:`int`):
18146
+ Identifier of the gift
18171
18147
 
18172
18148
  Returns:
18173
18149
  :class:`~pytdbot.types.GiftUpgradePreview`
18174
18150
  """
18175
18151
 
18176
- return await self.invoke(
18177
- {"@type": "getGiftUpgradePreview", "regular_gift_id": regular_gift_id}
18178
- )
18152
+ return await self.invoke({"@type": "getGiftUpgradePreview", "gift_id": gift_id})
18179
18153
 
18180
- async def getUpgradedGiftVariants(
18181
- self,
18182
- regular_gift_id: int = 0,
18183
- return_upgrade_models: bool = False,
18184
- return_craft_models: bool = False,
18154
+ async def getGiftUpgradeVariants(
18155
+ self, gift_id: int = 0
18185
18156
  ) -> Union["pytdbot.types.Error", "pytdbot.types.GiftUpgradeVariants"]:
18186
18157
  r"""Returns all possible variants of upgraded gifts for a regular gift
18187
18158
 
18188
18159
  Parameters:
18189
- regular_gift_id (:class:`int`):
18190
- Identifier of the regular gift
18191
-
18192
- return_upgrade_models (:class:`bool`):
18193
- Pass true to get models that can be obtained by upgrading a regular gift
18194
-
18195
- return_craft_models (:class:`bool`):
18196
- Pass true to get models that can be obtained by crafting a gift from upgraded gifts
18160
+ gift_id (:class:`int`):
18161
+ Identifier of the gift
18197
18162
 
18198
18163
  Returns:
18199
18164
  :class:`~pytdbot.types.GiftUpgradeVariants`
18200
18165
  """
18201
18166
 
18202
18167
  return await self.invoke(
18203
- {
18204
- "@type": "getUpgradedGiftVariants",
18205
- "regular_gift_id": regular_gift_id,
18206
- "return_upgrade_models": return_upgrade_models,
18207
- "return_craft_models": return_craft_models,
18208
- }
18168
+ {"@type": "getGiftUpgradeVariants", "gift_id": gift_id}
18209
18169
  )
18210
18170
 
18211
18171
  async def upgradeGift(
@@ -18228,7 +18188,7 @@ class TDLibFunctions:
18228
18188
  Pass true to keep the original gift text, sender and receiver in the upgraded gift
18229
18189
 
18230
18190
  star_count (:class:`int`):
18231
- The Telegram Star amount required to pay for the upgrade\. It the gift has prepaid\_upgrade\_star\_count \> 0, then pass 0, otherwise, pass gift\.upgrade\_star\_count
18191
+ The amount of Telegram Stars required to pay for the upgrade\. It the gift has prepaid\_upgrade\_star\_count \> 0, then pass 0, otherwise, pass gift\.upgrade\_star\_count
18232
18192
 
18233
18193
  Returns:
18234
18194
  :class:`~pytdbot.types.UpgradeGiftResult`
@@ -18260,7 +18220,7 @@ class TDLibFunctions:
18260
18220
  Prepaid upgrade hash as received along with the gift
18261
18221
 
18262
18222
  star_count (:class:`int`):
18263
- The Telegram Star amount the user agreed to pay for the upgrade; must be equal to gift\.upgrade\_star\_count
18223
+ The amount of Telegram Stars the user agreed to pay for the upgrade; must be equal to gift\.upgrade\_star\_count
18264
18224
 
18265
18225
  Returns:
18266
18226
  :class:`~pytdbot.types.Ok`
@@ -18275,23 +18235,6 @@ class TDLibFunctions:
18275
18235
  }
18276
18236
  )
18277
18237
 
18278
- async def craftGift(
18279
- self, received_gift_ids: List[str] = None
18280
- ) -> Union["pytdbot.types.Error", "pytdbot.types.CraftGiftResult"]:
18281
- r"""Crafts a new gift from other gifts that will be permanently lost
18282
-
18283
- Parameters:
18284
- received_gift_ids (List[:class:`str`]):
18285
- Identifier of the gifts to use for crafting
18286
-
18287
- Returns:
18288
- :class:`~pytdbot.types.CraftGiftResult`
18289
- """
18290
-
18291
- return await self.invoke(
18292
- {"@type": "craftGift", "received_gift_ids": received_gift_ids}
18293
- )
18294
-
18295
18238
  async def transferGift(
18296
18239
  self,
18297
18240
  business_connection_id: str = "",
@@ -18312,7 +18255,7 @@ class TDLibFunctions:
18312
18255
  Identifier of the user or the channel chat that will receive the gift
18313
18256
 
18314
18257
  star_count (:class:`int`):
18315
- The Telegram Star amount required to pay for the transfer
18258
+ The amount of Telegram Stars required to pay for the transfer
18316
18259
 
18317
18260
  Returns:
18318
18261
  :class:`~pytdbot.types.Ok`
@@ -18338,7 +18281,7 @@ class TDLibFunctions:
18338
18281
  Identifier of the gift
18339
18282
 
18340
18283
  star_count (:class:`int`):
18341
- The Telegram Star amount required to pay for the operation
18284
+ The amount of Telegram Stars required to pay for the operation
18342
18285
 
18343
18286
  Returns:
18344
18287
  :class:`~pytdbot.types.Ok`
@@ -18551,34 +18494,6 @@ class TDLibFunctions:
18551
18494
  {"@type": "getReceivedGift", "received_gift_id": received_gift_id}
18552
18495
  )
18553
18496
 
18554
- async def getGiftsForCrafting(
18555
- self, regular_gift_id: int = 0, offset: str = "", limit: int = 0
18556
- ) -> Union["pytdbot.types.Error", "pytdbot.types.GiftsForCrafting"]:
18557
- r"""Returns upgraded gifts of the current user who can be used to craft another gifts
18558
-
18559
- Parameters:
18560
- regular_gift_id (:class:`int`):
18561
- Identifier of the regular gift that will be used for crafting
18562
-
18563
- offset (:class:`str`):
18564
- Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
18565
-
18566
- limit (:class:`int`):
18567
- The maximum number of gifts to be returned; must be positive and can't be greater than 100\. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
18568
-
18569
- Returns:
18570
- :class:`~pytdbot.types.GiftsForCrafting`
18571
- """
18572
-
18573
- return await self.invoke(
18574
- {
18575
- "@type": "getGiftsForCrafting",
18576
- "regular_gift_id": regular_gift_id,
18577
- "offset": offset,
18578
- "limit": limit,
18579
- }
18580
- )
18581
-
18582
18497
  async def getUpgradedGift(
18583
18498
  self, name: str = ""
18584
18499
  ) -> Union["pytdbot.types.Error", "pytdbot.types.UpgradedGift"]:
@@ -18676,7 +18591,6 @@ class TDLibFunctions:
18676
18591
  self,
18677
18592
  gift_id: int = 0,
18678
18593
  order: "pytdbot.types.GiftForResaleOrder" = None,
18679
- for_crafting: bool = False,
18680
18594
  attributes: List["pytdbot.types.UpgradedGiftAttributeId"] = None,
18681
18595
  offset: str = "",
18682
18596
  limit: int = 0,
@@ -18690,9 +18604,6 @@ class TDLibFunctions:
18690
18604
  order (:class:`~pytdbot.types.GiftForResaleOrder`):
18691
18605
  Order in which the results will be sorted
18692
18606
 
18693
- for_crafting (:class:`bool`):
18694
- Pass true to get only gifts suitable for crafting
18695
-
18696
18607
  attributes (List[:class:`~pytdbot.types.UpgradedGiftAttributeId`]):
18697
18608
  Attributes used to filter received gifts\. If multiple attributes of the same type are specified, then all of them are allowed\. If none attributes of specific type are specified, then all values for this attribute type are allowed
18698
18609
 
@@ -18711,7 +18622,6 @@ class TDLibFunctions:
18711
18622
  "@type": "searchGiftsForResale",
18712
18623
  "gift_id": gift_id,
18713
18624
  "order": order,
18714
- "for_crafting": for_crafting,
18715
18625
  "attributes": attributes,
18716
18626
  "offset": offset,
18717
18627
  "limit": limit,
@@ -18971,7 +18881,7 @@ class TDLibFunctions:
18971
18881
 
18972
18882
  Parameters:
18973
18883
  user_id (:class:`int`):
18974
- Identifier of the user who did the payment
18884
+ Identifier of the user that did the payment
18975
18885
 
18976
18886
  telegram_payment_charge_id (:class:`str`):
18977
18887
  Telegram payment identifier
@@ -18991,7 +18901,7 @@ class TDLibFunctions:
18991
18901
  async def getSupportUser(
18992
18902
  self,
18993
18903
  ) -> Union["pytdbot.types.Error", "pytdbot.types.User"]:
18994
- r"""Returns a user who can be contacted to get support
18904
+ r"""Returns a user that can be contacted to get support
18995
18905
 
18996
18906
  Returns:
18997
18907
  :class:`~pytdbot.types.User`
@@ -19530,7 +19440,7 @@ class TDLibFunctions:
19530
19440
  async def setChatPaidMessageStarCount(
19531
19441
  self, chat_id: int = 0, paid_message_star_count: int = 0
19532
19442
  ) -> Union["pytdbot.types.Error", "pytdbot.types.Ok"]:
19533
- r"""Changes the Telegram Star amount that must be paid to send a message to a supergroup chat; requires can\_restrict\_members administrator right and supergroupFullInfo\.can\_enable\_paid\_messages
19443
+ r"""Changes the amount of Telegram Stars that must be paid to send a message to a supergroup chat; requires can\_restrict\_members administrator right and supergroupFullInfo\.can\_enable\_paid\_messages
19534
19444
 
19535
19445
  Parameters:
19536
19446
  chat_id (:class:`int`):
@@ -20504,7 +20414,7 @@ class TDLibFunctions:
20504
20414
  user_id: int = 0,
20505
20415
  errors: List["pytdbot.types.InputPassportElementError"] = None,
20506
20416
  ) -> Union["pytdbot.types.Error", "pytdbot.types.Ok"]:
20507
- r"""Informs the user who some of the elements in their Telegram Passport contain errors; for bots only\. The user will not be able to resend the elements, until the errors are fixed
20417
+ r"""Informs the user that some of the elements in their Telegram Passport contain errors; for bots only\. The user will not be able to resend the elements, until the errors are fixed
20508
20418
 
20509
20419
  Parameters:
20510
20420
  user_id (:class:`int`):
@@ -21441,7 +21351,7 @@ class TDLibFunctions:
21441
21351
 
21442
21352
  Parameters:
21443
21353
  user_id (:class:`int`):
21444
- Identifier of the user who will receive Telegram Stars; pass 0 to get options for an unspecified user
21354
+ Identifier of the user that will receive Telegram Stars; pass 0 to get options for an unspecified user
21445
21355
 
21446
21356
  Returns:
21447
21357
  :class:`~pytdbot.types.StarPaymentOptions`
@@ -21777,7 +21687,7 @@ class TDLibFunctions:
21777
21687
  async def getConnectedAffiliateProgram(
21778
21688
  self, affiliate: "pytdbot.types.AffiliateType" = None, bot_user_id: int = 0
21779
21689
  ) -> Union["pytdbot.types.Error", "pytdbot.types.ConnectedAffiliateProgram"]:
21780
- r"""Returns an affiliate program that was connected to the given affiliate by identifier of the bot that created the program
21690
+ r"""Returns an affiliate program that were connected to the given affiliate by identifier of the bot that created the program
21781
21691
 
21782
21692
  Parameters:
21783
21693
  affiliate (:class:`~pytdbot.types.AffiliateType`):
@@ -22119,53 +22029,79 @@ class TDLibFunctions:
22119
22029
  )
22120
22030
 
22121
22031
  async def addProxy(
22122
- self, proxy: "pytdbot.types.Proxy" = None, enable: bool = False
22123
- ) -> Union["pytdbot.types.Error", "pytdbot.types.AddedProxy"]:
22032
+ self,
22033
+ server: str = "",
22034
+ port: int = 0,
22035
+ enable: bool = False,
22036
+ type: "pytdbot.types.ProxyType" = None,
22037
+ ) -> Union["pytdbot.types.Error", "pytdbot.types.Proxy"]:
22124
22038
  r"""Adds a proxy server for network requests\. Can be called before authorization
22125
22039
 
22126
22040
  Parameters:
22127
- proxy (:class:`~pytdbot.types.Proxy`):
22128
- The proxy to add
22041
+ server (:class:`str`):
22042
+ Proxy server domain or IP address
22043
+
22044
+ port (:class:`int`):
22045
+ Proxy server port
22129
22046
 
22130
22047
  enable (:class:`bool`):
22131
22048
  Pass true to immediately enable the proxy
22132
22049
 
22050
+ type (:class:`~pytdbot.types.ProxyType`):
22051
+ Proxy type
22052
+
22133
22053
  Returns:
22134
- :class:`~pytdbot.types.AddedProxy`
22054
+ :class:`~pytdbot.types.Proxy`
22135
22055
  """
22136
22056
 
22137
22057
  return await self.invoke(
22138
- {"@type": "addProxy", "proxy": proxy, "enable": enable}
22058
+ {
22059
+ "@type": "addProxy",
22060
+ "server": server,
22061
+ "port": port,
22062
+ "enable": enable,
22063
+ "type": type,
22064
+ }
22139
22065
  )
22140
22066
 
22141
22067
  async def editProxy(
22142
22068
  self,
22143
22069
  proxy_id: int = 0,
22144
- proxy: "pytdbot.types.Proxy" = None,
22070
+ server: str = "",
22071
+ port: int = 0,
22145
22072
  enable: bool = False,
22146
- ) -> Union["pytdbot.types.Error", "pytdbot.types.AddedProxy"]:
22073
+ type: "pytdbot.types.ProxyType" = None,
22074
+ ) -> Union["pytdbot.types.Error", "pytdbot.types.Proxy"]:
22147
22075
  r"""Edits an existing proxy server for network requests\. Can be called before authorization
22148
22076
 
22149
22077
  Parameters:
22150
22078
  proxy_id (:class:`int`):
22151
22079
  Proxy identifier
22152
22080
 
22153
- proxy (:class:`~pytdbot.types.Proxy`):
22154
- The new information about the proxy
22081
+ server (:class:`str`):
22082
+ Proxy server domain or IP address
22083
+
22084
+ port (:class:`int`):
22085
+ Proxy server port
22155
22086
 
22156
22087
  enable (:class:`bool`):
22157
22088
  Pass true to immediately enable the proxy
22158
22089
 
22090
+ type (:class:`~pytdbot.types.ProxyType`):
22091
+ Proxy type
22092
+
22159
22093
  Returns:
22160
- :class:`~pytdbot.types.AddedProxy`
22094
+ :class:`~pytdbot.types.Proxy`
22161
22095
  """
22162
22096
 
22163
22097
  return await self.invoke(
22164
22098
  {
22165
22099
  "@type": "editProxy",
22166
22100
  "proxy_id": proxy_id,
22167
- "proxy": proxy,
22101
+ "server": server,
22102
+ "port": port,
22168
22103
  "enable": enable,
22104
+ "type": type,
22169
22105
  }
22170
22106
  )
22171
22107
 
@@ -22212,13 +22148,11 @@ class TDLibFunctions:
22212
22148
 
22213
22149
  return await self.invoke({"@type": "removeProxy", "proxy_id": proxy_id})
22214
22150
 
22215
- async def getProxies(
22216
- self,
22217
- ) -> Union["pytdbot.types.Error", "pytdbot.types.AddedProxies"]:
22151
+ async def getProxies(self) -> Union["pytdbot.types.Error", "pytdbot.types.Proxies"]:
22218
22152
  r"""Returns the list of proxies that are currently set up\. Can be called before authorization
22219
22153
 
22220
22154
  Returns:
22221
- :class:`~pytdbot.types.AddedProxies`
22155
+ :class:`~pytdbot.types.Proxies`
22222
22156
  """
22223
22157
 
22224
22158
  return await self.invoke(
@@ -22227,20 +22161,35 @@ class TDLibFunctions:
22227
22161
  }
22228
22162
  )
22229
22163
 
22164
+ async def getProxyLink(
22165
+ self, proxy_id: int = 0
22166
+ ) -> Union["pytdbot.types.Error", "pytdbot.types.HttpUrl"]:
22167
+ r"""Returns an HTTPS link, which can be used to add a proxy\. Available only for SOCKS5 and MTProto proxies\. Can be called before authorization
22168
+
22169
+ Parameters:
22170
+ proxy_id (:class:`int`):
22171
+ Proxy identifier
22172
+
22173
+ Returns:
22174
+ :class:`~pytdbot.types.HttpUrl`
22175
+ """
22176
+
22177
+ return await self.invoke({"@type": "getProxyLink", "proxy_id": proxy_id})
22178
+
22230
22179
  async def pingProxy(
22231
- self, proxy: "pytdbot.types.Proxy" = None
22180
+ self, proxy_id: int = 0
22232
22181
  ) -> Union["pytdbot.types.Error", "pytdbot.types.Seconds"]:
22233
22182
  r"""Computes time needed to receive a response from a Telegram server through a proxy\. Can be called before authorization
22234
22183
 
22235
22184
  Parameters:
22236
- proxy (:class:`~pytdbot.types.Proxy`):
22237
- The proxy to test; pass null to ping a Telegram server without a proxy
22185
+ proxy_id (:class:`int`):
22186
+ Proxy identifier\. Use 0 to ping a Telegram server without a proxy
22238
22187
 
22239
22188
  Returns:
22240
22189
  :class:`~pytdbot.types.Seconds`
22241
22190
  """
22242
22191
 
22243
- return await self.invoke({"@type": "pingProxy", "proxy": proxy})
22192
+ return await self.invoke({"@type": "pingProxy", "proxy_id": proxy_id})
22244
22193
 
22245
22194
  async def setLogStream(
22246
22195
  self, log_stream: "pytdbot.types.LogStream" = None
@@ -22561,13 +22510,24 @@ class TDLibFunctions:
22561
22510
  )
22562
22511
 
22563
22512
  async def testProxy(
22564
- self, proxy: "pytdbot.types.Proxy" = None, dc_id: int = 0, timeout: float = 0.0
22513
+ self,
22514
+ server: str = "",
22515
+ port: int = 0,
22516
+ type: "pytdbot.types.ProxyType" = None,
22517
+ dc_id: int = 0,
22518
+ timeout: float = 0.0,
22565
22519
  ) -> Union["pytdbot.types.Error", "pytdbot.types.Ok"]:
22566
22520
  r"""Sends a simple network request to the Telegram servers via proxy; for testing only\. Can be called before authorization
22567
22521
 
22568
22522
  Parameters:
22569
- proxy (:class:`~pytdbot.types.Proxy`):
22570
- The proxy to test
22523
+ server (:class:`str`):
22524
+ Proxy server domain or IP address
22525
+
22526
+ port (:class:`int`):
22527
+ Proxy server port
22528
+
22529
+ type (:class:`~pytdbot.types.ProxyType`):
22530
+ Proxy type
22571
22531
 
22572
22532
  dc_id (:class:`int`):
22573
22533
  Identifier of a datacenter with which to test connection
@@ -22580,7 +22540,14 @@ class TDLibFunctions:
22580
22540
  """
22581
22541
 
22582
22542
  return await self.invoke(
22583
- {"@type": "testProxy", "proxy": proxy, "dc_id": dc_id, "timeout": timeout}
22543
+ {
22544
+ "@type": "testProxy",
22545
+ "server": server,
22546
+ "port": port,
22547
+ "type": type,
22548
+ "dc_id": dc_id,
22549
+ "timeout": timeout,
22550
+ }
22584
22551
  )
22585
22552
 
22586
22553
  async def testGetDifference(