Struct teloxide_core::payloads::SendMediaGroup
source · pub struct SendMediaGroup {
pub chat_id: Recipient,
pub media: Vec<InputMedia>,
pub message_thread_id: Option<ThreadId>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub reply_parameters: Option<ReplyParameters>,
}
Expand description
Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message
s that were sent is returned.
§Captions
You may want to set a “global” caption which renders in the message, underneath the set of media. However, global captions for a media group are not part of the Telegram API. They result from how the official clients (at least) render a media group where only one InputMedia
has a caption set. That captioned InputMedia
may be in any position of the group.
In order to set a “global” caption of a media group, set a caption for a single InputMedia
in the group with the contents you wish to display underneath all media.
If multiple InputMedia
have captions, including identical ones, the official clients will not render a global caption underneath the group. Each individual media will keep its own caption however, which can be shown by the client when viewing the media individually, or by separating the media in its own message (for example by forwarding a single media from the media group).
Fields§
§chat_id: Recipient
Unique identifier for the target chat or username of the target channel (in the format @channelusername
)
media: Vec<InputMedia>
A JSON-serialized array describing messages to be sent, must include 2-10 items
message_thread_id: Option<ThreadId>
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
disable_notification: Option<bool>
Sends the message silently. Users will receive a notification with no sound.
protect_content: Option<bool>
Protects the contents of sent messages from forwarding and saving
reply_parameters: Option<ReplyParameters>
Description of the message to reply to
Implementations§
source§impl SendMediaGroup
impl SendMediaGroup
pub fn new( chat_id: impl Into<Recipient>, media: impl IntoIterator<Item = InputMedia>, ) -> Self
Trait Implementations§
source§impl Clone for SendMediaGroup
impl Clone for SendMediaGroup
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SendMediaGroup
impl Debug for SendMediaGroup
source§impl MultipartPayload for SendMediaGroup
impl MultipartPayload for SendMediaGroup
fn copy_files(&self, into: &mut dyn FnMut(InputFile))
fn move_files(&mut self, into: &mut dyn FnMut(InputFile))
source§impl Payload for SendMediaGroup
impl Payload for SendMediaGroup
source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates
with
big timeout
), the minimum timeout that should be used.Auto Trait Implementations§
impl Freeze for SendMediaGroup
impl !RefUnwindSafe for SendMediaGroup
impl Send for SendMediaGroup
impl Sync for SendMediaGroup
impl Unpin for SendMediaGroup
impl !UnwindSafe for SendMediaGroup
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Erasable for T
impl<T> Erasable for T
source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<P> SendMediaGroupSetters for Pwhere
P: HasPayload<Payload = SendMediaGroup>,
impl<P> SendMediaGroupSetters for Pwhere
P: HasPayload<Payload = SendMediaGroup>,
source§fn media<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = InputMedia>,
fn media<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = InputMedia>,
media
field.source§fn message_thread_id(self, value: ThreadId) -> Self
fn message_thread_id(self, value: ThreadId) -> Self
message_thread_id
field.source§fn disable_notification(self, value: bool) -> Self
fn disable_notification(self, value: bool) -> Self
disable_notification
field.source§fn protect_content(self, value: bool) -> Self
fn protect_content(self, value: bool) -> Self
protect_content
field.source§fn reply_parameters(self, value: ReplyParameters) -> Self
fn reply_parameters(self, value: ReplyParameters) -> Self
reply_parameters
field.