Struct botapi::gen_types::InputMediaPhotoBuilder
source · pub struct InputMediaPhotoBuilder { /* private fields */ }
Expand description
Represents a photo to be sent.
Implementations§
source§impl InputMediaPhotoBuilder
impl InputMediaPhotoBuilder
pub fn new(media: Option<InputFile>) -> Self
sourcepub fn set_media(self, media: Option<InputFile>) -> Self
pub fn set_media(self, media: Option<InputFile>) -> Self
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
sourcepub fn set_caption(self, caption: String) -> Self
pub fn set_caption(self, caption: String) -> Self
Optional. Caption of the photo to be sent, 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 photo 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_has_spoiler(self, has_spoiler: bool) -> Self
pub fn set_has_spoiler(self, has_spoiler: bool) -> Self
Optional. Pass True if the photo needs to be covered with a spoiler animation
pub fn build(self) -> InputMediaPhoto
Trait Implementations§
source§impl Clone for InputMediaPhotoBuilder
impl Clone for InputMediaPhotoBuilder
source§fn clone(&self) -> InputMediaPhotoBuilder
fn clone(&self) -> InputMediaPhotoBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more