sendMessage method

Future<Message> sendMessage(
  1. ChatID chatId,
  2. String text, {
  3. ParseMode? parseMode,
  4. List<MessageEntity>? entities,
  5. bool? disableWebPagePreview,
  6. bool? disableNotification,
  7. bool? protectContent,
  8. int? replyToMessageId,
  9. bool? allowSendingWithoutReply,
  10. 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,
  });
}