sendPhoto method

Future<Message> sendPhoto(
  1. ChatID chatId,
  2. HttpFile photo, {
  3. String? caption,
  4. ParseMode? parseMode,
  5. List<MessageEntity>? captionEntities,
  6. bool? disableNotification,
  7. bool? protectContent,
  8. int? replyToMessageId,
  9. bool? allowSendingWithoutReply,
  10. ReplyMarkup? replyMarkup,
})
inherited

Use this method to send photos.

On success, the sent Message is returned.

Implementation

Future<Message> sendPhoto(
  ChatID chatId,
  HttpFile photo, {
  String? caption,
  ParseMode? parseMode,
  List<MessageEntity>? captionEntities,
  bool? disableNotification,
  bool? protectContent,
  int? replyToMessageId,
  bool? allowSendingWithoutReply,
  ReplyMarkup? replyMarkup,
}) {
  return _client.apiCall(_token, 'sendPhoto', {
    'chat_id': chatId,
    'photo': photo,
    'caption': caption,
    'parse_mode': parseMode,
    'caption_entities': captionEntities,
    'disable_notification': disableNotification,
    'protect_content': protectContent,
    'reply_to_message_id': replyToMessageId,
    'allow_sending_without_reply': allowSendingWithoutReply,
    'reply_markup': replyMarkup,
  });
}