diff --git a/pyrogram/methods/messages/vote_poll.py b/pyrogram/methods/messages/vote_poll.py index 620fac5a..ad8ed8b0 100644 --- a/pyrogram/methods/messages/vote_poll.py +++ b/pyrogram/methods/messages/vote_poll.py @@ -43,7 +43,7 @@ class VotePoll: message_id (``int``): Identifier of the original message with the poll. - options (``Int`` | List of ``int``): + options (``int`` | List of ``int``): Index or list of indexes (for multiple answers) of the poll option(s) you want to vote for (0 to 9). Returns: diff --git a/pyrogram/methods/stories/increment_story_views.py b/pyrogram/methods/stories/increment_story_views.py index c0fa937c..3ae6281b 100644 --- a/pyrogram/methods/stories/increment_story_views.py +++ b/pyrogram/methods/stories/increment_story_views.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -from typing import Union +from typing import Union, List import pyrogram from pyrogram import raw @@ -26,7 +26,7 @@ class IncrementStoryViews: async def increment_story_views( self: "pyrogram.Client", chat_id: Union[int, str], - story_id: int, + story_id: Union[int, List[int]], ) -> bool: """Increment story views. @@ -37,8 +37,8 @@ class IncrementStoryViews: Unique identifier (int) or username (str) of the target chat. For a contact that exists in your Telegram address book you can use his phone number (str). - story_id (``int``): - Unique identifier of the target story. + story_id (``int`` | List of ``int``): + Identifier or list of story identifiers of the target story. Returns: ``bool``: On success, True is returned. @@ -49,10 +49,12 @@ class IncrementStoryViews: # Increment story views await app.increment_story_views(chat_id, 1) """ + ids = [story_id] if not isinstance(story_id, list) else story_id + r = await self.invoke( raw.functions.stories.IncrementStoryViews( peer=await self.resolve_peer(chat_id), - id=story_id + id=ids ) )