Skip to content

Commit 19ac66f

Browse files
committed
Improve documentation of methods.
Add cashtag support in searchPublicHashtagMessages. Git-Origin-Commit-Id: 02ad126
1 parent bbd208c commit 19ac66f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pyrogram/methods/messages/search_public_hashtag_messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ async def search_public_hashtag_messages(
3131
offset_date: datetime = utils.zero_datetime(),
3232
limit: int = 0,
3333
) -> AsyncGenerator["types.Message", None]:
34-
"""Searches for public channel posts with the given hashtag. For optimal performance, the number of returned messages is chosen by Telegram Server and can be smaller than the specified limit.
34+
"""Searches for public channel posts with the given hashtag or cashtag. For optimal performance, the number of returned messages is chosen by Telegram Server and can be smaller than the specified limit.
3535
3636
If you want to get the posts count only, see :meth:`~pyrogram.Client.search_public_hashtag_messages_count`.
3737
3838
.. include:: /_includes/usable-by/users.rst
3939
4040
Parameters:
4141
hashtag (``str``, *optional*):
42-
Hashtag to search for.
42+
Hashtag or cashtag to search for.
4343
4444
offset_id (``int``, *optional*):
4545
Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results.
@@ -58,7 +58,7 @@ async def search_public_hashtag_messages(
5858
.. code-block:: python
5959
6060
# Search for "#pyrogram". Get the first 50 results
61-
async for message in app.search_public_hashtag_messages("#pyrogram"):
61+
async for message in app.search_public_hashtag_messages("pyrogram", limit=50):
6262
print(message.text)
6363
6464
"""

pyrogram/methods/messages/search_public_hashtag_messages_count.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ async def search_public_hashtag_messages_count(
2525
self: "pyrogram.Client",
2626
hashtag: str = "",
2727
) -> int:
28-
"""Get the count of messages with the provided hashtag.
28+
"""Get the count of messages with the provided hashtag or cashtag.
2929
3030
If you want to get the actual messages, see :meth:`~pyrogram.Client.search_public_hashtag_messages`.
3131
3232
.. include:: /_includes/usable-by/users.rst
3333
3434
Parameters:
3535
hashtag (``str``, *optional*):
36-
Hashtag to search for.
36+
Hashtag or cashtag to search for.
3737
3838
Returns:
3939
``int``: On success, the messages count is returned.

0 commit comments

Comments
 (0)