Class InlineQueryResultCachedVoice
java.lang.Object
io.github.natanimn.telebof.types.inline.InlineQueryResultCachedVoice
- All Implemented Interfaces:
InlineQueryResult,Serializable
Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user.
Alternatively, you can use
setInputMessageContent(io.github.natanimn.telebof.types.input.InputTextMessageContent) to send a message with the specified content instead of the voice message.- Since:
- 3 March 2025
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInlineQueryResultCachedVoice(String id, String voiceFileId, String title) Required -
Method Summary
Modifier and TypeMethodDescriptionsetCaption(String caption) OptionalsetCaptionEntities(MessageEntity[] captionEntities) OptionalsetInputMessageContent(InputTextMessageContent inputMessageContent) OptionalsetParseMode(ParseMode parseMode) OptionalsetReplyMarkup(InlineKeyboardMarkup replyMarkup) Optional
-
Constructor Details
-
InlineQueryResultCachedVoice
Required- Parameters:
id- Unique identifier for this result, 1-64 bytesvoiceFileId- A valid file identifier for the voice messagetitle- Voice message title
-
-
Method Details
-
setInputMessageContent
public InlineQueryResultCachedVoice setInputMessageContent(InputTextMessageContent inputMessageContent) 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
-