Struct botapi::gen_types::InlineQueryResultVoiceBuilder
source · pub struct InlineQueryResultVoiceBuilder { /* private fields */ }
Expand description
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Implementations§
source§impl InlineQueryResultVoiceBuilder
impl InlineQueryResultVoiceBuilder
pub fn new(id: String, voice_url: String, title: String) -> Self
sourcepub fn set_voice_url(self, voice_url: String) -> Self
pub fn set_voice_url(self, voice_url: String) -> Self
A valid URL for the voice recording
sourcepub fn set_caption(self, caption: String) -> Self
pub fn set_caption(self, caption: String) -> Self
Optional. Caption, 0-1024 characters after entities parsing
sourcepub fn set_parse_mode(self, parse_mode: String) -> Self
pub fn set_parse_mode(self, parse_mode: String) -> Self
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
sourcepub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
pub fn set_caption_entities(self, caption_entities: Vec<MessageEntity>) -> Self
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
sourcepub fn set_voice_duration(self, voice_duration: i64) -> Self
pub fn set_voice_duration(self, voice_duration: i64) -> Self
Optional. Recording duration in seconds
sourcepub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
pub fn set_reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self
Optional. Inline keyboard attached to the message
sourcepub fn set_input_message_content(
self,
input_message_content: InputMessageContent
) -> Self
pub fn set_input_message_content( self, input_message_content: InputMessageContent ) -> Self
Optional. Content of the message to be sent instead of the voice recording
pub fn build(self) -> InlineQueryResultVoice
Trait Implementations§
source§impl Clone for InlineQueryResultVoiceBuilder
impl Clone for InlineQueryResultVoiceBuilder
source§fn clone(&self) -> InlineQueryResultVoiceBuilder
fn clone(&self) -> InlineQueryResultVoiceBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more