java.lang.Object
io.github.yvasyliev.telegramforwarderbot.service.sender.PhotoSender

@Service public class PhotoSender extends Object
Sends a photo to a Telegram 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 send
      caption - the caption for the photo
      Returns:
      the sent message
      Throws:
      IOException - if an I/O error occurs
      org.telegram.telegrambots.meta.exceptions.TelegramApiException - if a Telegram API error occurs