sendMessage method
Future<Message>
sendMessage(
- ChatID chatId,
- String text, {
- ParseMode? parseMode,
- List<
MessageEntity> ? entities, - bool? disableWebPagePreview,
- bool? disableNotification,
- bool? protectContent,
- int? replyToMessageId,
- bool? allowSendingWithoutReply,
- ReplyMarkup? replyMarkup,
inherited
Use this method to send text messages.
On success, the sent Message
is returned.
Implementation
Future<Message> sendMessage(
ChatID chatId,
String text, {
ParseMode? parseMode,
List<MessageEntity>? entities,
bool? disableWebPagePreview,
bool? disableNotification,
bool? protectContent,
int? replyToMessageId,
bool? allowSendingWithoutReply,
ReplyMarkup? replyMarkup,
}) {
return _client.apiCall(_token, 'sendMessage', {
'chat_id': chatId,
'text': text,
'parse_mode': parseMode,
'entities': entities,
'disable_web_page_preview': disableWebPagePreview,
'disable_notification': disableNotification,
'protect_content': protectContent,
'reply_to_message_id': replyToMessageId,
'allow_sending_without_reply': allowSendingWithoutReply,
'reply_markup': replyMarkup,
});
}