replyVoice method

Future<Message> replyVoice(
  1. dynamic voice, {
  2. bool withQuote = false,
  3. String? caption,
  4. String? parseMode,
  5. List<MessageEntity>? captionEntities,
  6. bool? disableNotification,
  7. bool? allowSendingWithoutReply,
  8. ReplyMarkup? replyMarkup,
})

Reply to the recieved message with a voice message

A wrapper around TeleDart.sendVoice. On success, returns the sent Message.

Apart from a voice to reply with, it can also take some options that control the message appearance and behavior.

Check Telegram API documentation for more information about those options.

Implementation

Future<Message> replyVoice(
  dynamic voice, {
  bool withQuote = false,
  String? caption,
  String? parseMode,
  List<MessageEntity>? captionEntities,
  bool? disableNotification,
  bool? allowSendingWithoutReply,
  ReplyMarkup? replyMarkup,
}) =>
    _teledart.sendVoice(chat.id, voice,
        messageThreadId: messageThreadId,
        caption: caption,
        parseMode: parseMode,
        captionEntities: captionEntities,
        disableNotification: disableNotification,
        replyToMessageId: withQuote ? messageId : null,
        allowSendingWithoutReply: allowSendingWithoutReply,
        replyMarkup: replyMarkup);