sendPoll method
Future<Message>
sendPoll(
- ChatID chatId,
- String question,
- List<
String> options, { - bool? isAnonymous,
- String? type,
- bool? allowsMultipleAnswers,
- int? correctOptionId,
- bool? isClosed,
- bool? disableNotification,
- int? replyToMessageId,
- bool? allowSendingWithoutReply,
- ReplyMarkup? replyMarkup,
inherited
Use this method to send a native poll.
On success, the sent Message is returned.
Implementation
Future<Message> sendPoll(
ChatID chatId,
String question,
List<String> options, {
bool? isAnonymous,
String? type,
bool? allowsMultipleAnswers,
int? correctOptionId,
bool? isClosed,
bool? disableNotification,
int? replyToMessageId,
bool? allowSendingWithoutReply,
ReplyMarkup? replyMarkup,
}) {
return _client.apiCall(
_token,
'sendPoll',
{
'chat_id': chatId,
'question': question,
'options': options,
'is_anonymous': isAnonymous,
'type': type,
'allows_multiple_answers': allowsMultipleAnswers,
'correct_option_id': correctOptionId,
'is_closed': isClosed,
'disable_notification': disableNotification,
'reply_to_message_id': replyToMessageId,
'allow_sending_without_reply': allowSendingWithoutReply,
'reply_markup': replyMarkup
},
);
}