From 1a9b9e10200ed60e72d0be3d5deb161a61ad31d5 Mon Sep 17 00:00:00 2001 From: khoben Date: Mon, 5 Oct 2020 22:06:35 +0700 Subject: [PATCH] Fix documentation Co-authored-by: Lonami --- telethon/tl/custom/message.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/telethon/tl/custom/message.py b/telethon/tl/custom/message.py index 69b04194..91356901 100644 --- a/telethon/tl/custom/message.py +++ b/telethon/tl/custom/message.py @@ -794,16 +794,16 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC): *, text=None, filter=None, data=None, share_phone=None, share_geo=None): """ - Calls `` with the specified poll option + Calls :tl:`SendVote` with the specified poll option or `button.click ` on the specified button. - Does nothing if the message has no buttons and poll. + Does nothing if the message is not a poll or has no buttons. Args: i (`int` | `list`): Clicks the i'th button or poll option (starting from the index 0). - For multiple-choice poll indices can be passed as list. + For multiple-choice polls, a list with the indices should be used. Will ``raise IndexError`` if out of bounds. Example: >>> message = ... # get the message somehow @@ -910,7 +910,7 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC): def find_options(): answers = self.poll.poll.answers if i is not None: - if isinstance(i, list): + if utils.is_list_like(i): return [answers[idx].option for idx in i] return [answers[i].option] if text is not None: