Class InlineQueryResultPhoto
java.lang.Object
io.github.natanimn.telebof.types.inline.InlineQueryResultPhoto
- All Implemented Interfaces:
InlineQueryResult,Serializable
Represents a link to a photo. By default, this photo will be sent by the user with optional caption.
Alternatively, you can use setInputMessageContent to send a message with the specified content instead of the photo.
- Since:
- 3 March 2025
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInlineQueryResultPhoto(String id, String photoUrl, String thumbnailUrl) Required -
Method Summary
Modifier and TypeMethodDescriptionsetCaption(String caption) OptionalsetCaptionEntities(MessageEntity[] captionEntities) OptionalsetDescription(String description) OptionalsetInputMessageContent(InputTextMessageContent inputMessageContent) OptionalsetParseMode(ParseMode parseMode) OptionalsetPhotoHeight(Integer photoHeight) OptionalsetPhotoWidth(Integer photoWidth) OptionalsetReplyMarkup(InlineKeyboardMarkup replyMarkup) OptionalsetShowCaptionAboveMedia(Boolean showCaptionAboveMedia) OptionalOptional
-
Constructor Details
-
InlineQueryResultPhoto
Required- Parameters:
id- Unique identifier for this result, 1-64 bytesphotoUrl- A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MBthumbnailUrl- URL of the thumbnail for the photo
-
-
Method Details
-
setTitle
Optional- Parameters:
title- Title for the result- Returns:
InlineQueryResultPhoto
-
setPhotoWidth
Optional- Parameters:
photoWidth- Width of the photo- Returns:
InlineQueryResultPhoto
-
setDescription
Optional- Parameters:
description- Short description of the result- Returns:
InlineQueryResultPhoto
-
setShowCaptionAboveMedia
Optional- Parameters:
showCaptionAboveMedia- Pass True, if the caption must be shown above the message media- Returns:
InlineQueryResultPhoto
-
setPhotoHeight
Optional- Parameters:
photoHeight- Height of the photo- Returns:
InlineQueryResultPhoto
-
setInputMessageContent
Optional- Parameters:
inputMessageContent- Content of the message to be sent instead of the media(photo, audio, voice, etc)- Returns:
InlineQueryMediaResult
-
setReplyMarkup
Optional- Parameters:
replyMarkup-Inline keyboardattached to the message- Returns:
InlineQueryMediaResult
-
setCaption
Optional- Parameters:
caption- Caption of the photo to be sent, 0-1024 characters after entities parsing- Returns:
InlineQueryMediaResult
-
setCaptionEntities
Optional- Parameters:
captionEntities- List of special entities that appear in the caption, which can be specified instead ofsetParseMode(io.github.natanimn.telebof.enums.ParseMode)- Returns:
InlineQueryMediaResult
-
setParseMode
Optional- Parameters:
parseMode- Mode for parsing entities in the caption- Returns:
InlineQueryMediaResult
-