Pytdbot 0.9.0.dev4__tar.gz → 0.9.0.dev5__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.
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/PKG-INFO +4 -5
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/Pytdbot.egg-info/PKG-INFO +4 -5
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/Pytdbot.egg-info/SOURCES.txt +1 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/README.md +1 -1
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/__init__.py +11 -11
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/methods/td_functions.py +215 -4
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/types/__init__.py +87 -51
- pytdbot-0.9.0.dev5/pytdbot/types/td_types/bound_methods/__init__.py +4 -0
- pytdbot-0.9.0.dev5/pytdbot/types/td_types/bound_methods/callback_query.py +100 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/types/td_types/bound_methods/message.py +8 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/types/td_types/types.py +1459 -440
- Pytdbot-0.9.0.dev4/pytdbot/types/td_types/bound_methods/__init__.py +0 -3
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/LICENSE +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/MANIFEST.in +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/Pytdbot.egg-info/dependency_links.txt +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/Pytdbot.egg-info/requires.txt +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/Pytdbot.egg-info/top_level.txt +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/client.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/exception/__init__.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/filters.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/handlers/__init__.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/handlers/decorators.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/handlers/handler.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/handlers/td_updates.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/methods/__init__.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/methods/methods.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/tdjson/__init__.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/tdjson/tdjson.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/types/plugins/__init__.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/types/td_types/__init__.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/types/td_types/bound_methods/chatActions.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/types/td_types/bound_methods/file.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/utils/__init__.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/utils/escape.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/utils/json_utils.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/utils/obj_encoder.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/utils/strings.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/utils/text_format.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/pytdbot/utils/webapps.py +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/requirements.txt +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/setup.cfg +0 -0
- {Pytdbot-0.9.0.dev4 → pytdbot-0.9.0.dev5}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Pytdbot
|
|
3
|
-
Version: 0.9.0.
|
|
3
|
+
Version: 0.9.0.dev5
|
|
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
|
|
@@ -9,12 +9,13 @@ License: MIT
|
|
|
9
9
|
Project-URL: Source, https://github.com/pytdbot/client
|
|
10
10
|
Project-URL: Tracker, https://github.com/pytdbot/client/issues
|
|
11
11
|
Keywords: telegram,tdlib,bot,telegram-client,telegram-bot,bot-api,telegram-bot,tdlib-python,tdlib-bot
|
|
12
|
-
Platform: UNKNOWN
|
|
13
12
|
Requires-Python: >=3.9
|
|
14
13
|
Description-Content-Type: text/markdown
|
|
15
14
|
License-File: LICENSE
|
|
15
|
+
Requires-Dist: deepdiff
|
|
16
|
+
Requires-Dist: aio-pika
|
|
16
17
|
|
|
17
|
-
# Pytdbot [](https://pypi.org/project/Pytdbot) [](https://pypi.org/project/Pytdbot) [](https://github.com/tdlib/td) [](https://pepy.tech/project/pytdbot)
|
|
18
19
|
|
|
19
20
|
Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
20
21
|
|
|
@@ -102,5 +103,3 @@ For more examples, check the [examples](https://github.com/pytdbot/client/tree/m
|
|
|
102
103
|
# License
|
|
103
104
|
|
|
104
105
|
MIT [License](https://github.com/pytdbot/client/blob/main/LICENSE)
|
|
105
|
-
|
|
106
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Pytdbot
|
|
3
|
-
Version: 0.9.0.
|
|
3
|
+
Version: 0.9.0.dev5
|
|
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
|
|
@@ -9,12 +9,13 @@ License: MIT
|
|
|
9
9
|
Project-URL: Source, https://github.com/pytdbot/client
|
|
10
10
|
Project-URL: Tracker, https://github.com/pytdbot/client/issues
|
|
11
11
|
Keywords: telegram,tdlib,bot,telegram-client,telegram-bot,bot-api,telegram-bot,tdlib-python,tdlib-bot
|
|
12
|
-
Platform: UNKNOWN
|
|
13
12
|
Requires-Python: >=3.9
|
|
14
13
|
Description-Content-Type: text/markdown
|
|
15
14
|
License-File: LICENSE
|
|
15
|
+
Requires-Dist: deepdiff
|
|
16
|
+
Requires-Dist: aio-pika
|
|
16
17
|
|
|
17
|
-
# Pytdbot [](https://pypi.org/project/Pytdbot) [](https://pypi.org/project/Pytdbot) [](https://github.com/tdlib/td) [](https://pepy.tech/project/pytdbot)
|
|
18
19
|
|
|
19
20
|
Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
20
21
|
|
|
@@ -102,5 +103,3 @@ For more examples, check the [examples](https://github.com/pytdbot/client/tree/m
|
|
|
102
103
|
# License
|
|
103
104
|
|
|
104
105
|
MIT [License](https://github.com/pytdbot/client/blob/main/LICENSE)
|
|
105
|
-
|
|
106
|
-
|
|
@@ -26,6 +26,7 @@ pytdbot/types/plugins/__init__.py
|
|
|
26
26
|
pytdbot/types/td_types/__init__.py
|
|
27
27
|
pytdbot/types/td_types/types.py
|
|
28
28
|
pytdbot/types/td_types/bound_methods/__init__.py
|
|
29
|
+
pytdbot/types/td_types/bound_methods/callback_query.py
|
|
29
30
|
pytdbot/types/td_types/bound_methods/chatActions.py
|
|
30
31
|
pytdbot/types/td_types/bound_methods/file.py
|
|
31
32
|
pytdbot/types/td_types/bound_methods/message.py
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Pytdbot [](https://pypi.org/project/Pytdbot) [](https://pypi.org/project/Pytdbot) [](https://github.com/tdlib/td) [](https://pepy.tech/project/pytdbot)
|
|
2
2
|
|
|
3
3
|
Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
4
4
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from . import types, utils, filters, exception
|
|
2
|
-
from .tdjson import TdJson
|
|
3
|
-
from .client import Client
|
|
4
|
-
|
|
5
|
-
__all__ = ["types", "utils", "filters", "exception", "TdJson", "Client"]
|
|
6
|
-
|
|
7
|
-
__version__ = "0.9.
|
|
8
|
-
__copyright__ = "Copyright (c) 2022-2024 AYMEN Mohammed ~ https://github.com/AYMENJD"
|
|
9
|
-
__license__ = "MIT License"
|
|
10
|
-
|
|
11
|
-
VERSION = __version__
|
|
1
|
+
from . import types, utils, filters, exception
|
|
2
|
+
from .tdjson import TdJson
|
|
3
|
+
from .client import Client
|
|
4
|
+
|
|
5
|
+
__all__ = ["types", "utils", "filters", "exception", "TdJson", "Client"]
|
|
6
|
+
|
|
7
|
+
__version__ = "0.9.0dev5"
|
|
8
|
+
__copyright__ = "Copyright (c) 2022-2024 AYMEN Mohammed ~ https://github.com/AYMENJD"
|
|
9
|
+
__license__ = "MIT License"
|
|
10
|
+
|
|
11
|
+
VERSION = __version__
|
|
@@ -5826,7 +5826,7 @@ class TDLibFunctions:
|
|
|
5826
5826
|
async def getPreparedInlineMessage(
|
|
5827
5827
|
self, bot_user_id: int = 0, prepared_message_id: str = ""
|
|
5828
5828
|
) -> Union["types.Error", "types.PreparedInlineMessage"]:
|
|
5829
|
-
r"""Saves an inline message to be sent by the given user
|
|
5829
|
+
r"""Saves an inline message to be sent by the given user
|
|
5830
5830
|
|
|
5831
5831
|
Parameters:
|
|
5832
5832
|
bot_user_id (:class:`int`):
|
|
@@ -10928,7 +10928,7 @@ class TDLibFunctions:
|
|
|
10928
10928
|
Point in time \(Unix timestamp\) when the group call is expected to be started by an administrator; 0 to start the video chat immediately\. The date must be at least 10 seconds and at most 8 days in the future
|
|
10929
10929
|
|
|
10930
10930
|
is_rtmp_stream (:class:`bool`):
|
|
10931
|
-
Pass true to create an RTMP stream instead of an ordinary video chat
|
|
10931
|
+
Pass true to create an RTMP stream instead of an ordinary video chat
|
|
10932
10932
|
|
|
10933
10933
|
Returns:
|
|
10934
10934
|
:class:`~pytdbot.types.GroupCallId`
|
|
@@ -12112,7 +12112,13 @@ class TDLibFunctions:
|
|
|
12112
12112
|
)
|
|
12113
12113
|
|
|
12114
12114
|
async def searchStickers(
|
|
12115
|
-
self,
|
|
12115
|
+
self,
|
|
12116
|
+
sticker_type: "types.StickerType" = None,
|
|
12117
|
+
emojis: str = "",
|
|
12118
|
+
query: str = "",
|
|
12119
|
+
input_language_codes: List[str] = None,
|
|
12120
|
+
offset: int = 0,
|
|
12121
|
+
limit: int = 0,
|
|
12116
12122
|
) -> Union["types.Error", "types.Stickers"]:
|
|
12117
12123
|
r"""Searches for stickers from public sticker sets that correspond to any of the given emoji
|
|
12118
12124
|
|
|
@@ -12121,7 +12127,16 @@ class TDLibFunctions:
|
|
|
12121
12127
|
Type of the stickers to return
|
|
12122
12128
|
|
|
12123
12129
|
emojis (:class:`str`):
|
|
12124
|
-
Space\-separated list of emojis to search for
|
|
12130
|
+
Space\-separated list of emojis to search for
|
|
12131
|
+
|
|
12132
|
+
query (:class:`str`):
|
|
12133
|
+
Query to search for; may be empty to search for emoji only
|
|
12134
|
+
|
|
12135
|
+
input_language_codes (:class:`List[str]`):
|
|
12136
|
+
List of possible IETF language tags of the user's input language; may be empty if unknown
|
|
12137
|
+
|
|
12138
|
+
offset (:class:`int`):
|
|
12139
|
+
The offset from which to return the stickers; must be non\-negative
|
|
12125
12140
|
|
|
12126
12141
|
limit (:class:`int`):
|
|
12127
12142
|
The maximum number of stickers to be returned; 0\-100
|
|
@@ -12135,6 +12150,9 @@ class TDLibFunctions:
|
|
|
12135
12150
|
"@type": "searchStickers",
|
|
12136
12151
|
"sticker_type": sticker_type,
|
|
12137
12152
|
"emojis": emojis,
|
|
12153
|
+
"query": query,
|
|
12154
|
+
"input_language_codes": input_language_codes,
|
|
12155
|
+
"offset": offset,
|
|
12138
12156
|
"limit": limit,
|
|
12139
12157
|
}
|
|
12140
12158
|
)
|
|
@@ -12784,6 +12802,19 @@ class TDLibFunctions:
|
|
|
12784
12802
|
}
|
|
12785
12803
|
)
|
|
12786
12804
|
|
|
12805
|
+
async def getOwnedBots(self) -> Union["types.Error", "types.Users"]:
|
|
12806
|
+
r"""Returns the list of owned by the current user bots
|
|
12807
|
+
|
|
12808
|
+
Returns:
|
|
12809
|
+
:class:`~pytdbot.types.Users`
|
|
12810
|
+
"""
|
|
12811
|
+
|
|
12812
|
+
return await self.invoke(
|
|
12813
|
+
{
|
|
12814
|
+
"@type": "getOwnedBots",
|
|
12815
|
+
}
|
|
12816
|
+
)
|
|
12817
|
+
|
|
12787
12818
|
async def searchHashtags(
|
|
12788
12819
|
self, prefix: str = "", limit: int = 0
|
|
12789
12820
|
) -> Union["types.Error", "types.Hashtags"]:
|
|
@@ -17630,6 +17661,186 @@ class TDLibFunctions:
|
|
|
17630
17661
|
{"@type": "reuseStarSubscription", "subscription_id": subscription_id}
|
|
17631
17662
|
)
|
|
17632
17663
|
|
|
17664
|
+
async def setChatAffiliateProgram(
|
|
17665
|
+
self, chat_id: int = 0, parameters: "types.AffiliateProgramParameters" = None
|
|
17666
|
+
) -> Union["types.Error", "types.Ok"]:
|
|
17667
|
+
r"""Changes affiliate program for a bot
|
|
17668
|
+
|
|
17669
|
+
Parameters:
|
|
17670
|
+
chat_id (:class:`int`):
|
|
17671
|
+
Identifier of the chat with an owned bot for which affiliate program is changed
|
|
17672
|
+
|
|
17673
|
+
parameters (:class:`"types.AffiliateProgramParameters"`):
|
|
17674
|
+
Parameters of the affiliate program; pass null to close the currently active program\. If there is an active program, then commission and program duration can only be increased\. If the active program is scheduled to be closed, then it can't be changed anymore
|
|
17675
|
+
|
|
17676
|
+
Returns:
|
|
17677
|
+
:class:`~pytdbot.types.Ok`
|
|
17678
|
+
"""
|
|
17679
|
+
|
|
17680
|
+
return await self.invoke(
|
|
17681
|
+
{
|
|
17682
|
+
"@type": "setChatAffiliateProgram",
|
|
17683
|
+
"chat_id": chat_id,
|
|
17684
|
+
"parameters": parameters,
|
|
17685
|
+
}
|
|
17686
|
+
)
|
|
17687
|
+
|
|
17688
|
+
async def searchChatAffiliateProgram(
|
|
17689
|
+
self, username: str = "", referrer: str = ""
|
|
17690
|
+
) -> Union["types.Error", "types.Chat"]:
|
|
17691
|
+
r"""Searches a chat with an affiliate program\. Returns the chat if found and the program is active
|
|
17692
|
+
|
|
17693
|
+
Parameters:
|
|
17694
|
+
username (:class:`str`):
|
|
17695
|
+
Username of the chat
|
|
17696
|
+
|
|
17697
|
+
referrer (:class:`str`):
|
|
17698
|
+
The referrer from an internalLinkTypeChatAffiliateProgram link
|
|
17699
|
+
|
|
17700
|
+
Returns:
|
|
17701
|
+
:class:`~pytdbot.types.Chat`
|
|
17702
|
+
"""
|
|
17703
|
+
|
|
17704
|
+
return await self.invoke(
|
|
17705
|
+
{
|
|
17706
|
+
"@type": "searchChatAffiliateProgram",
|
|
17707
|
+
"username": username,
|
|
17708
|
+
"referrer": referrer,
|
|
17709
|
+
}
|
|
17710
|
+
)
|
|
17711
|
+
|
|
17712
|
+
async def searchAffiliatePrograms(
|
|
17713
|
+
self,
|
|
17714
|
+
chat_id: int = 0,
|
|
17715
|
+
sort_order: "types.AffiliateProgramSortOrder" = None,
|
|
17716
|
+
offset: str = "",
|
|
17717
|
+
limit: int = 0,
|
|
17718
|
+
) -> Union["types.Error", "types.FoundAffiliatePrograms"]:
|
|
17719
|
+
r"""Searches affiliate programs that can be applied to the given chat
|
|
17720
|
+
|
|
17721
|
+
Parameters:
|
|
17722
|
+
chat_id (:class:`int`):
|
|
17723
|
+
Identifier of the chat for which affiliate programs are searched for\. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can\_post\_messages administrator right
|
|
17724
|
+
|
|
17725
|
+
sort_order (:class:`"types.AffiliateProgramSortOrder"`):
|
|
17726
|
+
Sort order for the results
|
|
17727
|
+
|
|
17728
|
+
offset (:class:`str`):
|
|
17729
|
+
Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results
|
|
17730
|
+
|
|
17731
|
+
limit (:class:`int`):
|
|
17732
|
+
The maximum number of affiliate programs to return
|
|
17733
|
+
|
|
17734
|
+
Returns:
|
|
17735
|
+
:class:`~pytdbot.types.FoundAffiliatePrograms`
|
|
17736
|
+
"""
|
|
17737
|
+
|
|
17738
|
+
return await self.invoke(
|
|
17739
|
+
{
|
|
17740
|
+
"@type": "searchAffiliatePrograms",
|
|
17741
|
+
"chat_id": chat_id,
|
|
17742
|
+
"sort_order": sort_order,
|
|
17743
|
+
"offset": offset,
|
|
17744
|
+
"limit": limit,
|
|
17745
|
+
}
|
|
17746
|
+
)
|
|
17747
|
+
|
|
17748
|
+
async def connectChatAffiliateProgram(
|
|
17749
|
+
self, chat_id: int = 0, bot_user_id: int = 0
|
|
17750
|
+
) -> Union["types.Error", "types.ChatAffiliateProgram"]:
|
|
17751
|
+
r"""Connects an affiliate program to the given chat\. Returns information about the connected affiliate program
|
|
17752
|
+
|
|
17753
|
+
Parameters:
|
|
17754
|
+
chat_id (:class:`int`):
|
|
17755
|
+
Identifier of the chat to which the affiliate program will be connected\. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can\_post\_messages administrator right
|
|
17756
|
+
|
|
17757
|
+
bot_user_id (:class:`int`):
|
|
17758
|
+
Identifier of the bot, which affiliate program is connected
|
|
17759
|
+
|
|
17760
|
+
Returns:
|
|
17761
|
+
:class:`~pytdbot.types.ChatAffiliateProgram`
|
|
17762
|
+
"""
|
|
17763
|
+
|
|
17764
|
+
return await self.invoke(
|
|
17765
|
+
{
|
|
17766
|
+
"@type": "connectChatAffiliateProgram",
|
|
17767
|
+
"chat_id": chat_id,
|
|
17768
|
+
"bot_user_id": bot_user_id,
|
|
17769
|
+
}
|
|
17770
|
+
)
|
|
17771
|
+
|
|
17772
|
+
async def disconnectChatAffiliateProgram(
|
|
17773
|
+
self, chat_id: int = 0, url: str = ""
|
|
17774
|
+
) -> Union["types.Error", "types.ChatAffiliateProgram"]:
|
|
17775
|
+
r"""Disconnects an affiliate program from the given chat and immediately deactivates its referral link\. Returns updated information about the disconnected affiliate program
|
|
17776
|
+
|
|
17777
|
+
Parameters:
|
|
17778
|
+
chat_id (:class:`int`):
|
|
17779
|
+
Identifier of the chat for which the affiliate program is connected
|
|
17780
|
+
|
|
17781
|
+
url (:class:`str`):
|
|
17782
|
+
The referral link of the affiliate program
|
|
17783
|
+
|
|
17784
|
+
Returns:
|
|
17785
|
+
:class:`~pytdbot.types.ChatAffiliateProgram`
|
|
17786
|
+
"""
|
|
17787
|
+
|
|
17788
|
+
return await self.invoke(
|
|
17789
|
+
{"@type": "disconnectChatAffiliateProgram", "chat_id": chat_id, "url": url}
|
|
17790
|
+
)
|
|
17791
|
+
|
|
17792
|
+
async def getChatAffiliateProgram(
|
|
17793
|
+
self, chat_id: int = 0, bot_user_id: int = 0
|
|
17794
|
+
) -> Union["types.Error", "types.ChatAffiliateProgram"]:
|
|
17795
|
+
r"""Returns an affiliate program that were connected to the given chat by identifier of the bot that created the program
|
|
17796
|
+
|
|
17797
|
+
Parameters:
|
|
17798
|
+
chat_id (:class:`int`):
|
|
17799
|
+
Identifier of the chat for which the affiliate program was connected\. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can\_post\_messages administrator right
|
|
17800
|
+
|
|
17801
|
+
bot_user_id (:class:`int`):
|
|
17802
|
+
Identifier of the bot that created the program
|
|
17803
|
+
|
|
17804
|
+
Returns:
|
|
17805
|
+
:class:`~pytdbot.types.ChatAffiliateProgram`
|
|
17806
|
+
"""
|
|
17807
|
+
|
|
17808
|
+
return await self.invoke(
|
|
17809
|
+
{
|
|
17810
|
+
"@type": "getChatAffiliateProgram",
|
|
17811
|
+
"chat_id": chat_id,
|
|
17812
|
+
"bot_user_id": bot_user_id,
|
|
17813
|
+
}
|
|
17814
|
+
)
|
|
17815
|
+
|
|
17816
|
+
async def getChatAffiliatePrograms(
|
|
17817
|
+
self, chat_id: int = 0, offset: str = "", limit: int = 0
|
|
17818
|
+
) -> Union["types.Error", "types.ChatAffiliatePrograms"]:
|
|
17819
|
+
r"""Returns affiliate programs that were connected to the given chat
|
|
17820
|
+
|
|
17821
|
+
Parameters:
|
|
17822
|
+
chat_id (:class:`int`):
|
|
17823
|
+
Identifier of the chat for which the affiliate programs were connected\. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can\_post\_messages administrator right
|
|
17824
|
+
|
|
17825
|
+
offset (:class:`str`):
|
|
17826
|
+
Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results
|
|
17827
|
+
|
|
17828
|
+
limit (:class:`int`):
|
|
17829
|
+
The maximum number of affiliate programs to return
|
|
17830
|
+
|
|
17831
|
+
Returns:
|
|
17832
|
+
:class:`~pytdbot.types.ChatAffiliatePrograms`
|
|
17833
|
+
"""
|
|
17834
|
+
|
|
17835
|
+
return await self.invoke(
|
|
17836
|
+
{
|
|
17837
|
+
"@type": "getChatAffiliatePrograms",
|
|
17838
|
+
"chat_id": chat_id,
|
|
17839
|
+
"offset": offset,
|
|
17840
|
+
"limit": limit,
|
|
17841
|
+
}
|
|
17842
|
+
)
|
|
17843
|
+
|
|
17633
17844
|
async def getBusinessFeatures(
|
|
17634
17845
|
self, source: "types.BusinessFeature" = None
|
|
17635
17846
|
) -> Union["types.Error", "types.BusinessFeatures"]:
|
|
@@ -18,11 +18,9 @@ __all__ = [
|
|
|
18
18
|
"ChatPhotoStickerType",
|
|
19
19
|
"InputChatPhoto",
|
|
20
20
|
"StarSubscriptionType",
|
|
21
|
+
"AffiliateProgramSortOrder",
|
|
21
22
|
"StarTransactionDirection",
|
|
22
|
-
"
|
|
23
|
-
"ChatTransactionPurpose",
|
|
24
|
-
"UserTransactionPurpose",
|
|
25
|
-
"StarTransactionPartner",
|
|
23
|
+
"StarTransactionType",
|
|
26
24
|
"GiveawayParticipantStatus",
|
|
27
25
|
"GiveawayInfo",
|
|
28
26
|
"GiveawayPrize",
|
|
@@ -299,11 +297,22 @@ __all__ = [
|
|
|
299
297
|
"InputChatPhotoSticker",
|
|
300
298
|
"ChatPermissions",
|
|
301
299
|
"ChatAdministratorRights",
|
|
300
|
+
"StarAmount",
|
|
302
301
|
"StarSubscriptionTypeChannel",
|
|
303
302
|
"StarSubscriptionTypeBot",
|
|
304
303
|
"StarSubscriptionPricing",
|
|
305
304
|
"StarSubscription",
|
|
306
305
|
"StarSubscriptions",
|
|
306
|
+
"AffiliateProgramSortOrderProfitability",
|
|
307
|
+
"AffiliateProgramSortOrderCreationDate",
|
|
308
|
+
"AffiliateProgramSortOrderRevenue",
|
|
309
|
+
"AffiliateProgramParameters",
|
|
310
|
+
"AffiliateProgramInfo",
|
|
311
|
+
"AffiliateInfo",
|
|
312
|
+
"FoundAffiliateProgram",
|
|
313
|
+
"FoundAffiliatePrograms",
|
|
314
|
+
"ChatAffiliateProgram",
|
|
315
|
+
"ChatAffiliatePrograms",
|
|
307
316
|
"ProductInfo",
|
|
308
317
|
"PremiumPaymentOption",
|
|
309
318
|
"PremiumStatePaymentOption",
|
|
@@ -321,27 +330,31 @@ __all__ = [
|
|
|
321
330
|
"UserGifts",
|
|
322
331
|
"StarTransactionDirectionIncoming",
|
|
323
332
|
"StarTransactionDirectionOutgoing",
|
|
324
|
-
"
|
|
325
|
-
"
|
|
326
|
-
"
|
|
327
|
-
"
|
|
328
|
-
"
|
|
329
|
-
"
|
|
330
|
-
"
|
|
331
|
-
"
|
|
332
|
-
"
|
|
333
|
-
"
|
|
334
|
-
"
|
|
335
|
-
"
|
|
336
|
-
"
|
|
337
|
-
"
|
|
338
|
-
"
|
|
339
|
-
"
|
|
340
|
-
"
|
|
341
|
-
"
|
|
342
|
-
"
|
|
343
|
-
"
|
|
344
|
-
"
|
|
333
|
+
"StarTransactionTypePremiumBotDeposit",
|
|
334
|
+
"StarTransactionTypeAppStoreDeposit",
|
|
335
|
+
"StarTransactionTypeGooglePlayDeposit",
|
|
336
|
+
"StarTransactionTypeFragmentDeposit",
|
|
337
|
+
"StarTransactionTypeUserDeposit",
|
|
338
|
+
"StarTransactionTypeGiveawayDeposit",
|
|
339
|
+
"StarTransactionTypeFragmentWithdrawal",
|
|
340
|
+
"StarTransactionTypeTelegramAdsWithdrawal",
|
|
341
|
+
"StarTransactionTypeTelegramApiUsage",
|
|
342
|
+
"StarTransactionTypeBotPaidMediaPurchase",
|
|
343
|
+
"StarTransactionTypeBotPaidMediaSale",
|
|
344
|
+
"StarTransactionTypeChannelPaidMediaPurchase",
|
|
345
|
+
"StarTransactionTypeChannelPaidMediaSale",
|
|
346
|
+
"StarTransactionTypeBotInvoicePurchase",
|
|
347
|
+
"StarTransactionTypeBotInvoiceSale",
|
|
348
|
+
"StarTransactionTypeBotSubscriptionPurchase",
|
|
349
|
+
"StarTransactionTypeBotSubscriptionSale",
|
|
350
|
+
"StarTransactionTypeChannelSubscriptionPurchase",
|
|
351
|
+
"StarTransactionTypeChannelSubscriptionSale",
|
|
352
|
+
"StarTransactionTypeGiftPurchase",
|
|
353
|
+
"StarTransactionTypeGiftSale",
|
|
354
|
+
"StarTransactionTypeChannelPaidReactionSend",
|
|
355
|
+
"StarTransactionTypeChannelPaidReactionReceive",
|
|
356
|
+
"StarTransactionTypeAffiliateProgramCommission",
|
|
357
|
+
"StarTransactionTypeUnsupported",
|
|
345
358
|
"StarTransaction",
|
|
346
359
|
"StarTransactions",
|
|
347
360
|
"GiveawayParticipantStatusEligible",
|
|
@@ -1474,6 +1487,7 @@ __all__ = [
|
|
|
1474
1487
|
"InternalLinkTypeBusinessChat",
|
|
1475
1488
|
"InternalLinkTypeBuyStars",
|
|
1476
1489
|
"InternalLinkTypeChangePhoneNumber",
|
|
1490
|
+
"InternalLinkTypeChatAffiliateProgram",
|
|
1477
1491
|
"InternalLinkTypeChatBoost",
|
|
1478
1492
|
"InternalLinkTypeChatFolderInvite",
|
|
1479
1493
|
"InternalLinkTypeChatFolderSettings",
|
|
@@ -1527,6 +1541,10 @@ __all__ = [
|
|
|
1527
1541
|
"FileTypeSecret",
|
|
1528
1542
|
"FileTypeSecretThumbnail",
|
|
1529
1543
|
"FileTypeSecure",
|
|
1544
|
+
"FileTypeSelfDestructingPhoto",
|
|
1545
|
+
"FileTypeSelfDestructingVideo",
|
|
1546
|
+
"FileTypeSelfDestructingVideoNote",
|
|
1547
|
+
"FileTypeSelfDestructingVoiceNote",
|
|
1530
1548
|
"FileTypeSticker",
|
|
1531
1549
|
"FileTypeThumbnail",
|
|
1532
1550
|
"FileTypeUnknown",
|
|
@@ -1830,11 +1848,9 @@ from .td_types import (
|
|
|
1830
1848
|
ChatPhotoStickerType,
|
|
1831
1849
|
InputChatPhoto,
|
|
1832
1850
|
StarSubscriptionType,
|
|
1851
|
+
AffiliateProgramSortOrder,
|
|
1833
1852
|
StarTransactionDirection,
|
|
1834
|
-
|
|
1835
|
-
ChatTransactionPurpose,
|
|
1836
|
-
UserTransactionPurpose,
|
|
1837
|
-
StarTransactionPartner,
|
|
1853
|
+
StarTransactionType,
|
|
1838
1854
|
GiveawayParticipantStatus,
|
|
1839
1855
|
GiveawayInfo,
|
|
1840
1856
|
GiveawayPrize,
|
|
@@ -2111,11 +2127,22 @@ from .td_types import (
|
|
|
2111
2127
|
InputChatPhotoSticker,
|
|
2112
2128
|
ChatPermissions,
|
|
2113
2129
|
ChatAdministratorRights,
|
|
2130
|
+
StarAmount,
|
|
2114
2131
|
StarSubscriptionTypeChannel,
|
|
2115
2132
|
StarSubscriptionTypeBot,
|
|
2116
2133
|
StarSubscriptionPricing,
|
|
2117
2134
|
StarSubscription,
|
|
2118
2135
|
StarSubscriptions,
|
|
2136
|
+
AffiliateProgramSortOrderProfitability,
|
|
2137
|
+
AffiliateProgramSortOrderCreationDate,
|
|
2138
|
+
AffiliateProgramSortOrderRevenue,
|
|
2139
|
+
AffiliateProgramParameters,
|
|
2140
|
+
AffiliateProgramInfo,
|
|
2141
|
+
AffiliateInfo,
|
|
2142
|
+
FoundAffiliateProgram,
|
|
2143
|
+
FoundAffiliatePrograms,
|
|
2144
|
+
ChatAffiliateProgram,
|
|
2145
|
+
ChatAffiliatePrograms,
|
|
2119
2146
|
ProductInfo,
|
|
2120
2147
|
PremiumPaymentOption,
|
|
2121
2148
|
PremiumStatePaymentOption,
|
|
@@ -2133,27 +2160,31 @@ from .td_types import (
|
|
|
2133
2160
|
UserGifts,
|
|
2134
2161
|
StarTransactionDirectionIncoming,
|
|
2135
2162
|
StarTransactionDirectionOutgoing,
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2163
|
+
StarTransactionTypePremiumBotDeposit,
|
|
2164
|
+
StarTransactionTypeAppStoreDeposit,
|
|
2165
|
+
StarTransactionTypeGooglePlayDeposit,
|
|
2166
|
+
StarTransactionTypeFragmentDeposit,
|
|
2167
|
+
StarTransactionTypeUserDeposit,
|
|
2168
|
+
StarTransactionTypeGiveawayDeposit,
|
|
2169
|
+
StarTransactionTypeFragmentWithdrawal,
|
|
2170
|
+
StarTransactionTypeTelegramAdsWithdrawal,
|
|
2171
|
+
StarTransactionTypeTelegramApiUsage,
|
|
2172
|
+
StarTransactionTypeBotPaidMediaPurchase,
|
|
2173
|
+
StarTransactionTypeBotPaidMediaSale,
|
|
2174
|
+
StarTransactionTypeChannelPaidMediaPurchase,
|
|
2175
|
+
StarTransactionTypeChannelPaidMediaSale,
|
|
2176
|
+
StarTransactionTypeBotInvoicePurchase,
|
|
2177
|
+
StarTransactionTypeBotInvoiceSale,
|
|
2178
|
+
StarTransactionTypeBotSubscriptionPurchase,
|
|
2179
|
+
StarTransactionTypeBotSubscriptionSale,
|
|
2180
|
+
StarTransactionTypeChannelSubscriptionPurchase,
|
|
2181
|
+
StarTransactionTypeChannelSubscriptionSale,
|
|
2182
|
+
StarTransactionTypeGiftPurchase,
|
|
2183
|
+
StarTransactionTypeGiftSale,
|
|
2184
|
+
StarTransactionTypeChannelPaidReactionSend,
|
|
2185
|
+
StarTransactionTypeChannelPaidReactionReceive,
|
|
2186
|
+
StarTransactionTypeAffiliateProgramCommission,
|
|
2187
|
+
StarTransactionTypeUnsupported,
|
|
2157
2188
|
StarTransaction,
|
|
2158
2189
|
StarTransactions,
|
|
2159
2190
|
GiveawayParticipantStatusEligible,
|
|
@@ -3286,6 +3317,7 @@ from .td_types import (
|
|
|
3286
3317
|
InternalLinkTypeBusinessChat,
|
|
3287
3318
|
InternalLinkTypeBuyStars,
|
|
3288
3319
|
InternalLinkTypeChangePhoneNumber,
|
|
3320
|
+
InternalLinkTypeChatAffiliateProgram,
|
|
3289
3321
|
InternalLinkTypeChatBoost,
|
|
3290
3322
|
InternalLinkTypeChatFolderInvite,
|
|
3291
3323
|
InternalLinkTypeChatFolderSettings,
|
|
@@ -3339,6 +3371,10 @@ from .td_types import (
|
|
|
3339
3371
|
FileTypeSecret,
|
|
3340
3372
|
FileTypeSecretThumbnail,
|
|
3341
3373
|
FileTypeSecure,
|
|
3374
|
+
FileTypeSelfDestructingPhoto,
|
|
3375
|
+
FileTypeSelfDestructingVideo,
|
|
3376
|
+
FileTypeSelfDestructingVideoNote,
|
|
3377
|
+
FileTypeSelfDestructingVoiceNote,
|
|
3342
3378
|
FileTypeSticker,
|
|
3343
3379
|
FileTypeThumbnail,
|
|
3344
3380
|
FileTypeUnknown,
|
|
@@ -3624,4 +3660,4 @@ from .td_types import (
|
|
|
3624
3660
|
)
|
|
3625
3661
|
from .plugins import Plugins
|
|
3626
3662
|
|
|
3627
|
-
TDLIB_VERSION = "1.8.
|
|
3663
|
+
TDLIB_VERSION = "1.8.41"
|