Message.reply_poll()¶
- Message.reply_poll()¶
Shortcut for method
send_pollwill automatically fill method attributes:chat_id
message_thread_id
business_connection_id
reply_parameters
Example
await message.reply_poll("This is a poll", ["A", "B", "C"])- Parameters:
question (
str|FormattedText) – Poll question, 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users.options (List of
str| List ofFormattedText) – List of 2-12 answer options, each 1-100 characters.message_thread_id (
int, optional) – Unique identifier for the target message thread (topic) of the forum. For supergroups only.business_connection_id (
str, optional) – Unique identifier of the business connection on behalf of which the message will be sent.is_anonymous (
bool, optional) – True, if the poll needs to be anonymous. Defaults to True.type ( – obj`~pyrogram.enums.PollType`, optional): Poll type,
QUIZorREGULAR. Defaults toREGULAR.allows_multiple_answers (
bool, optional) – Pass True, if the poll allows multiple answers. Defaults to False.allows_revoting (
bool, optional) – Pass True, if the poll allows to change chosen answer options. Defaults to False for quizzes and to True for regular polls.shuffle_options (
bool, optional) – Pass True, if the poll options must be shown in random order.allow_adding_options (
bool, optional) – Pass True, if answer options can be added to the poll after creation, not supported for anonymous polls and quizzes.hide_results_until_closes (
bool, optional) – Pass True, if poll results must be shown only after the poll closes.correct_option_ids (List of
int, optional) – List of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode.explanation (
str|FormattedText, optional) – Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing.open_period (
int, optional) – Amount of time in seconds the poll will be active after creation, 5-2628000. Can’t be used together with close_date.close_date (
datetime, optional) – Point in time when the poll will be automatically closed. Must be at least 5 and no more than 2628000 seconds in the future. Can’t be used together with open_period.is_closed (
bool, optional) – Pass True, if the poll needs to be immediately closed. This can be useful for poll preview. For bots only.description (
str|FormattedText, optional) – Description of the poll to be sent, 0-1024 characters after entities parsing.disable_notification (
bool, optional) – Sends the message silently. Users will receive a notification with no sound.protect_content (
bool, optional) – Protects the contents of the sent message from forwarding and saving.allow_paid_broadcast (
bool, optional) – If True, you will be allowed to send up to 1000 messages per second. Ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balance. For bots only.effect_id (
int, optional) – Unique identifier of the message effect. For private chats only.reply_parameters (
ReplyParameters, optional) – Describes reply parameters for the message that is being sent.schedule_date (
datetime, optional) – Date when the message will be automatically sent.repeat_period (
int, optional) – Period after which the message will be sent again in seconds.paid_message_star_count (
int, optional) – The number of Telegram Stars the user agreed to pay to send the messages.reply_markup (
InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply, optional) – 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.
- Returns:
On success, the sent
Messageis returned.- Raises:
RPCError – In case of a Telegram RPC error.