2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Add missing parameters in Message.reply_poll (#507)

This commit is contained in:
Shrimadhav U K 2020-10-31 21:56:10 +05:30 committed by GitHub
parent 740bcd145a
commit a2b8658153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1801,8 +1801,13 @@ class Message(Object, Update):
question: str, question: str,
options: List[str], options: List[str],
quote: bool = None, quote: bool = None,
is_anonymous: bool = True,
allows_multiple_answers: bool = None,
type: str = "regular",
correct_option_id: int = None,
disable_notification: bool = None, disable_notification: bool = None,
reply_to_message_id: int = None, reply_to_message_id: int = None,
schedule_date: int = None,
reply_markup: Union[ reply_markup: Union[
"types.InlineKeyboardMarkup", "types.InlineKeyboardMarkup",
"types.ReplyKeyboardMarkup", "types.ReplyKeyboardMarkup",
@ -1839,6 +1844,22 @@ class Message(Object, Update):
If *reply_to_message_id* is passed, this parameter will be ignored. If *reply_to_message_id* is passed, this parameter will be ignored.
Defaults to ``True`` in group chats and ``False`` in private chats. Defaults to ``True`` in group chats and ``False`` in private chats.
is_anonymous (``bool``, *optional*):
True, if the poll needs to be anonymous.
Defaults to True.
type (``str``, *optional*):
Poll type, "quiz" or "regular".
Defaults to "regular"
allows_multiple_answers (``bool``, *optional*):
True, if the poll allows multiple answers, ignored for polls in quiz mode.
Defaults to False
correct_option_id (``int``, *optional*):
0-based identifier of the correct answer option (the index of the correct option)
Required for polls in quiz mode.
disable_notification (``bool``, *optional*): disable_notification (``bool``, *optional*):
Sends the message silently. Sends the message silently.
Users will receive a notification with no sound. Users will receive a notification with no sound.
@ -1846,6 +1867,9 @@ class Message(Object, Update):
reply_to_message_id (``int``, *optional*): reply_to_message_id (``int``, *optional*):
If the message is a reply, ID of the original message. If the message is a reply, ID of the original message.
schedule_date (``int``, *optional*):
Date when the message will be automatically sent. Unix time.
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*): reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
Additional interface options. An object for an inline keyboard, custom reply keyboard, Additional interface options. An object for an inline keyboard, custom reply keyboard,
instructions to remove reply keyboard or to force a reply from the user. instructions to remove reply keyboard or to force a reply from the user.
@ -1866,8 +1890,13 @@ class Message(Object, Update):
chat_id=self.chat.id, chat_id=self.chat.id,
question=question, question=question,
options=options, options=options,
is_anonymous=is_anonymous,
allows_multiple_answers=allows_multiple_answers,
type=type,
correct_option_id=correct_option_id,
disable_notification=disable_notification, disable_notification=disable_notification,
reply_to_message_id=reply_to_message_id, reply_to_message_id=reply_to_message_id,
schedule_date=schedule_date,
reply_markup=reply_markup reply_markup=reply_markup
) )