sendAnimation method

Future<Message> sendAnimation(
  1. ChatID chatId,
  2. HttpFile animation, {
  3. int? duration,
  4. int? width,
  5. int? height,
  6. HttpFile? thumb,
  7. String? caption,
  8. ParseMode? parseMode,
  9. List<MessageEntity>? captionEntities,
  10. bool? disableNotification,
  11. bool? protectContent,
  12. int? replyToMessageId,
  13. bool? allowSendingWithoutReply,
  14. ReplyMarkup? replyMarkup,
})
inherited

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound).

On success, the sent Message is returned.

Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

Implementation

Future<Message> sendAnimation(
  ChatID chatId,
  HttpFile animation, {
  int? duration,
  int? width,
  int? height,
  HttpFile? thumb,
  String? caption,
  ParseMode? parseMode,
  List<MessageEntity>? captionEntities,
  bool? disableNotification,
  bool? protectContent,
  int? replyToMessageId,
  bool? allowSendingWithoutReply,
  ReplyMarkup? replyMarkup,
}) {
  return _client.apiCall(_token, 'sendAnimation', {
    'chat_id': chatId,
    'animation': animation,
    'duration': duration,
    'width': width,
    'height': height,
    'thumb': thumb,
    '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,
  });
}