Class SendPhoto


public class SendPhoto extends SendBuilder<SendPhoto,Message>
SendPhoto class. Returns Message on success.
Since:
3 March 2025
  • Constructor Details

  • Method Details

    • caption

      public SendPhoto caption(String caption)
      Optional
      Parameters:
      caption - Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
      Returns:
      SendPhoto
    • captionEntities

      public SendPhoto captionEntities(MessageEntity[] captionEntities)
      Optional
      Parameters:
      captionEntities - A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
      Returns:
      SendPhoto
    • hasSpoiler

      public SendPhoto hasSpoiler(boolean hasSpoiler)
      Optional
      Parameters:
      hasSpoiler - Pass True if the photo needs to be covered with a spoiler animation
      Returns:
      SendPhoto
    • showCaptionAboveMedia

      public SendPhoto showCaptionAboveMedia(boolean showCaptionAboveMedia)
      Optional
      Parameters:
      showCaptionAboveMedia - Pass True, if the caption must be shown above the message media
      Returns:
      SendPhoto