Class PhotoMetadataForwarder
java.lang.Object
io.github.yvasyliev.telegramforwarderbot.reddit.service.forwarder.PhotoMetadataForwarder
- All Implemented Interfaces:
MetadataForwarder
Forwards a photo from a Reddit link metadata to a Telegram chat.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
forward
(Link.Metadata metadata, boolean hasSpoiler) Forwards the metadata of a Reddit link to Telegram.
-
Constructor Details
-
PhotoMetadataForwarder
public PhotoMetadataForwarder()
-
-
Method Details
-
forward
public void forward(Link.Metadata metadata, boolean hasSpoiler) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException Description copied from interface:MetadataForwarder
Forwards the metadata of a Reddit link to Telegram.- Specified by:
forward
in interfaceMetadataForwarder
- 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
-