From db54c77cf334ae77a6345cf940d25617fdd37a10 Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Fri, 13 Oct 2023 22:28:54 +0300 Subject: [PATCH] Rename toggle_pinned_stories --- .../stories/{toggle_stories_pinned.py => pin_stories.py} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename pyrogram/methods/stories/{toggle_stories_pinned.py => pin_stories.py} (93%) diff --git a/pyrogram/methods/stories/toggle_stories_pinned.py b/pyrogram/methods/stories/pin_stories.py similarity index 93% rename from pyrogram/methods/stories/toggle_stories_pinned.py rename to pyrogram/methods/stories/pin_stories.py index eadc49c9..2e380fae 100644 --- a/pyrogram/methods/stories/toggle_stories_pinned.py +++ b/pyrogram/methods/stories/pin_stories.py @@ -20,10 +20,11 @@ from typing import List, Union, Iterable import pyrogram from pyrogram import raw +from pyrogram import types -class ToggleStoriesPinned: - async def toggle_stories_pinned( +class PinStories: + async def pin_stories( self: "pyrogram.Client", chat_id: Union[int, str], stories_ids: Union[int, Iterable[int]], @@ -51,7 +52,7 @@ class ToggleStoriesPinned: .. code-block:: python # 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)