Shortcut for:: await bot.send_poll( update.effective_message.chat_id, message_thread_id=update.effective_message.message_thread_id, business_connection_id=self.business_connection_id, *args, **kwargs,
(
self,
question: str,
options: Sequence["str | InputPollOption"],
is_anonymous: bool | None = None,
type: str | None = None, # pylint: disable=redefined-builtin
allows_multiple_answers: bool | None = None,
correct_option_id: CorrectOptionID | None = None,
is_closed: bool | None = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_markup: "ReplyMarkup | None" = None,
explanation: str | None = None,
explanation_parse_mode: ODVInput[str] = DEFAULT_NONE,
open_period: TimePeriod | None = None,
close_date: int | (dtm.datetime | None) = None,
explanation_entities: Sequence["MessageEntity"] | None = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: ODVInput[int] = DEFAULT_NONE,
reply_parameters: "ReplyParameters | None" = None,
question_parse_mode: ODVInput[str] = DEFAULT_NONE,
question_entities: Sequence["MessageEntity"] | None = None,
message_effect_id: str | None = None,
allow_paid_broadcast: bool | None = None,
shuffle_options: bool | None = None,
allows_revoting: bool | None = None,
correct_option_ids: CorrectOptionIds | None = None,
allow_adding_options: bool | None = None,
hide_results_until_closes: bool | None = None,
description: str | None = None,
description_parse_mode: ODVInput[str] | None = None,
description_entities: Sequence["MessageEntity"] | None = None,
members_only: bool | None = None,
country_codes: Sequence[str] | None = None,
explanation_media: "InputPollMedia | None" = None,
media: "InputPollMedia | None" = None,
*,
reply_to_message_id: int | None = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
do_quote: bool | (_ReplyKwargs | None) = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
pool_timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict | None = None,
)
| 3657 | ) |
| 3658 | |
| 3659 | async def reply_poll( |
| 3660 | self, |
| 3661 | question: str, |
| 3662 | options: Sequence["str | InputPollOption"], |
| 3663 | is_anonymous: bool | None = None, |
| 3664 | type: str | None = None, # pylint: disable=redefined-builtin |
| 3665 | allows_multiple_answers: bool | None = None, |
| 3666 | correct_option_id: CorrectOptionID | None = None, |
| 3667 | is_closed: bool | None = None, |
| 3668 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 3669 | reply_markup: "ReplyMarkup | None" = None, |
| 3670 | explanation: str | None = None, |
| 3671 | explanation_parse_mode: ODVInput[str] = DEFAULT_NONE, |
| 3672 | open_period: TimePeriod | None = None, |
| 3673 | close_date: int | (dtm.datetime | None) = None, |
| 3674 | explanation_entities: Sequence["MessageEntity"] | None = None, |
| 3675 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 3676 | message_thread_id: ODVInput[int] = DEFAULT_NONE, |
| 3677 | reply_parameters: "ReplyParameters | None" = None, |
| 3678 | question_parse_mode: ODVInput[str] = DEFAULT_NONE, |
| 3679 | question_entities: Sequence["MessageEntity"] | None = None, |
| 3680 | message_effect_id: str | None = None, |
| 3681 | allow_paid_broadcast: bool | None = None, |
| 3682 | shuffle_options: bool | None = None, |
| 3683 | allows_revoting: bool | None = None, |
| 3684 | correct_option_ids: CorrectOptionIds | None = None, |
| 3685 | allow_adding_options: bool | None = None, |
| 3686 | hide_results_until_closes: bool | None = None, |
| 3687 | description: str | None = None, |
| 3688 | description_parse_mode: ODVInput[str] | None = None, |
| 3689 | description_entities: Sequence["MessageEntity"] | None = None, |
| 3690 | members_only: bool | None = None, |
| 3691 | country_codes: Sequence[str] | None = None, |
| 3692 | explanation_media: "InputPollMedia | None" = None, |
| 3693 | media: "InputPollMedia | None" = None, |
| 3694 | *, |
| 3695 | reply_to_message_id: int | None = None, |
| 3696 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 3697 | do_quote: bool | (_ReplyKwargs | None) = None, |
| 3698 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3699 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3700 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3701 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3702 | api_kwargs: JSONDict | None = None, |
| 3703 | ) -> "Message": |
| 3704 | """Shortcut for:: |
| 3705 | |
| 3706 | await bot.send_poll( |
| 3707 | update.effective_message.chat_id, |
| 3708 | message_thread_id=update.effective_message.message_thread_id, |
| 3709 | business_connection_id=self.business_connection_id, |
| 3710 | *args, |
| 3711 | **kwargs, |
| 3712 | ) |
| 3713 | |
| 3714 | For the documentation of the arguments, please see :meth:`telegram.Bot.send_poll`. |
| 3715 | |
| 3716 | .. versionchanged:: 21.1 |