All Known Implementing Classes:
AnimationMetadataForwarder, PhotoMetadataForwarder
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MetadataForwarder
Functional interface for forwarding metadata from Reddit links to Telegram. Implementations should define how to handle the metadata and whether it has a spoiler.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    forward(Link.Metadata metadata, boolean hasSpoiler)
    Forwards the metadata of a Reddit link to Telegram.
  • Method Details

    • forward

      void forward(Link.Metadata metadata, boolean hasSpoiler) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException
      Forwards the metadata of a Reddit link to Telegram.
      Parameters:
      metadata - the metadata of the Reddit link
      hasSpoiler - indicates whether the link has a spoiler
      Throws:
      IOException - if an I/O error occurs while forwarding
      org.telegram.telegrambots.meta.exceptions.TelegramApiException - if an error occurs while sending the message to Telegram