Interface MetadataForwarder
- 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.
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 TypeMethodDescriptionvoid
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 linkhasSpoiler
- indicates whether the link has a spoiler- Throws:
IOException
- if an I/O error occurs while forwardingorg.telegram.telegrambots.meta.exceptions.TelegramApiException
- if an error occurs while sending the message to Telegram
-