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 input_message_content to send a message with the specified content instead of the photo.
- Since:
- 3 March 2025
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionInlineQueryResultPhoto
(String id, String photo_url, String thumbnail_url) Required -
Method Summary
Modifier and TypeMethodDescriptionOptionalcaptionEntities
(MessageEntity[] caption_entities) Optionaldescription
(String description) OptionalinputMessageContent
(InputTextMessageContent input_message_content) OptionalOptionalphotoHeight
(int photo_height) OptionalphotoWidth
(int photo_width) OptionalreplyMarkup
(InlineKeyboardMarkup keyboard) OptionalshowCaptionAboveMedia
(boolean show_caption_above_media) OptionalOptional
-
Field Details
-
type
-
id
-
caption
-
parse_mode
-
caption_entities
-
input_message_content
-
reply_markup
-
-
Constructor Details
-
InlineQueryResultPhoto
Required- Parameters:
id
- Unique identifier for this result, 1-64 bytesphoto_url
- A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MBthumbnail_url
- URL of the thumbnail for the photo
-
-
Method Details
-
title
Optional- Parameters:
title
- Title for the result- Returns:
InlineQueryResultPhoto
-
photoWidth
Optional- Parameters:
photo_width
- Width of the photo- Returns:
InlineQueryResultPhoto
-
description
Optional- Parameters:
description
- Short description of the result- Returns:
InlineQueryResultPhoto
-
showCaptionAboveMedia
Optional- Parameters:
show_caption_above_media
- Pass True, if the caption must be shown above the message media- Returns:
InlineQueryResultPhoto
-
photoHeight
Optional- Parameters:
photo_height
- Height of the photo- Returns:
InlineQueryResultPhoto
-
inputMessageContent
Optional- Parameters:
input_message_content
- Content of the message to be sent instead of the media(photo, audio, voice, etc)- Returns:
T
-
replyMarkup
Optional- Parameters:
keyboard
-Inline keyboard
attached to the message- Returns:
T
-
caption
Optional- Parameters:
caption
- Caption of the photo to be sent, 0-1024 characters after entities parsing- Returns:
T
-
captionEntities
Optional- Parameters:
caption_entities
- List of special entities that appear in the caption, which can be specified instead ofparseMode(io.github.natanimn.telebof.enums.ParseMode)
- Returns:
T
-
parseMode
Optional- Parameters:
parse_mode
- Mode for parsing entities in the caption- Returns:
T
-