forwardTo method

Future<Message> forwardTo(
  1. int chatId, {
  2. int? messageThreadId,
  3. bool? disableNotification,
  4. bool? protectContent,
})

Forward the recieved message to a channel or chat.

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

Apart from a chatId to forward 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<Message> forwardTo(
  int chatId, {
  int? messageThreadId,
  bool? disableNotification,
  bool? protectContent,
}) =>
    _teledart.forwardMessage(chatId, chat.id, messageId,
        messageThreadId: messageThreadId,
        disableNotification: disableNotification,
        protectContent: protectContent);