Rename toggle_pinned_stories

This commit is contained in:
KurimuzonAkuma 2023-10-13 22:28:54 +03:00
parent 60282c5aa2
commit db54c77cf3

View File

@ -20,10 +20,11 @@ from typing import List, Union, Iterable
import pyrogram import pyrogram
from pyrogram import raw from pyrogram import raw
from pyrogram import types
class ToggleStoriesPinned: class PinStories:
async def toggle_stories_pinned( async def pin_stories(
self: "pyrogram.Client", self: "pyrogram.Client",
chat_id: Union[int, str], chat_id: Union[int, str],
stories_ids: Union[int, Iterable[int]], stories_ids: Union[int, Iterable[int]],
@ -51,7 +52,7 @@ class ToggleStoriesPinned:
.. code-block:: python .. code-block:: python
# Pin a single story # Pin a single story
await app.toggle_stories_pinned(chat_id, 123456789, True) await app.pin_stories(chat_id, 123456789, True)
""" """
is_iterable = not isinstance(stories_ids, int) is_iterable = not isinstance(stories_ids, int)