copyTo method

Future<MessageId> copyTo(
  1. int chatId, {
  2. int? messageThreadId,
  3. int? replyToMessageId,
  4. String? caption,
  5. String? parseMode,
  6. List<MessageEntity>? captionEntities,
  7. bool? disableNotification,
  8. bool? protectContent,
  9. bool? allowSendingWithoutReply,
  10. ReplyMarkup? replyMarkup,
})

Copy the recieved message to a channel or chat.

A wrapper around TeleDart.copyMessage. On success, returns the sent MessageId.

Apart from a chatId to copy the message to, it can also take some options that control the message

Check Telegram API documentation for more information about those options.

Implementation

Future<MessageId> copyTo(
  int chatId, {
  int? messageThreadId,
  int? replyToMessageId,
  String? caption,
  String? parseMode,
  List<MessageEntity>? captionEntities,
  bool? disableNotification,
  bool? protectContent,
  bool? allowSendingWithoutReply,
  ReplyMarkup? replyMarkup,
}) =>
    _teledart.copyMessage(chatId, chat.id, messageId,
        messageThreadId: messageThreadId,
        caption: caption,
        parseMode: parseMode,
        captionEntities: captionEntities,
        disableNotification: disableNotification,
        protectContent: protectContent,
        replyToMessageId: replyToMessageId,
        allowSendingWithoutReply: allowSendingWithoutReply,
        replyMarkup: replyMarkup);