Class PhotoSender
java.lang.Object
io.github.yvasyliev.telegramforwarderbot.service.sender.PhotoSender
Sends a photo to a Telegram chat.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.telegram.telegrambots.meta.api.objects.message.Message
sendPhoto
(InputFileDTO photo, String caption) Sends a photo to the admin chat.
-
Constructor Details
-
PhotoSender
public PhotoSender()
-
-
Method Details
-
sendPhoto
public org.telegram.telegrambots.meta.api.objects.message.Message sendPhoto(InputFileDTO photo, String caption) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException Sends a photo to the admin chat.- Parameters:
photo
- the photo to sendcaption
- the caption for the photo- Returns:
- the sent message
- Throws:
IOException
- if an I/O error occursorg.telegram.telegrambots.meta.exceptions.TelegramApiException
- if a Telegram API error occurs
-