Enum carapax::types::MessageData
source · pub enum MessageData {
Show 54 variants
Animation(Animation),
AutoDeleteTimerChanged(MessageDataAutoDeleteTimer),
BoostAdded(i64),
ChannelChatCreated,
ChatBackgroundSet(ChatBackground),
ChatShared(MessageDataChatShared),
ConnectedWebsite(String),
Contact(Contact),
DeleteChatPhoto,
Dice(Dice),
ForumTopicClosed,
ForumTopicCreated(MessageDataForumTopicCreated),
ForumTopicEdited(MessageDataForumTopicEdited),
ForumTopicReopened,
Game(Game),
GeneralForumTopicHidden,
GeneralForumTopicUnhidden,
Giveaway(Giveaway),
GiveawayCreated,
GiveawayCompleted(GiveawayCompleted),
GiveawayWinners(GiveawayWinners),
GroupChatCreated,
Invoice(Invoice),
LeftChatMember(User),
Location(Location),
MigrateFromChatId(i64),
MigrateToChatId(i64),
NewChatMembers(Vec<User>),
NewChatPhoto(Vec<PhotoSize>),
NewChatTitle(String),
PassportData(PassportData),
PinnedMessage(MaybeInaccessibleMessage),
Poll(Poll),
ProximityAlertTriggered(MessageDataProximityAlert),
Sticker(Sticker),
Story(Story),
SuccessfulPayment(SuccessfulPayment),
SupergroupChatCreated,
UsersShared(MessageDataUsersShared),
Venue(Venue),
VideoNote(VideoNote),
VideoChatEnded(MessageDataVideoChatEnded),
VideoChatParticipantsInvited(MessageDataVideoChatParticipantsInvited),
VideoChatScheduled(MessageDataVideoChatScheduled),
VideoChatStarted,
WebAppData(WebAppData),
WriteAccessAllowed(MessageDataWriteAccess),
Audio(MessageDataAudio),
Document(MessageDataDocument),
Photo(MessageDataPhoto),
Text(Text),
Video(MessageDataVideo),
Voice(MessageDataVoice),
Unknown(Value),
}
Expand description
Represents a message data.
Variants§
Animation(Animation)
Information about the animation.
AutoDeleteTimerChanged(MessageDataAutoDeleteTimer)
Auto-delete timer settings changed.
BoostAdded(i64)
Service message: user boosted the chat.
Contains a number of boosts added by the user.
ChannelChatCreated
The channel has been created.
This field can‘t be received in a message coming through updates,
because bot can’t be a member of a channel when it is created.
It can only be found in the reply_to
field of the crate::types::Message
struct
if someone replies to a very first message in a channel.
ChatBackgroundSet(ChatBackground)
Chat background set.
A chat was shared with the bot.
ConnectedWebsite(String)
The domain name of the website on which the user has logged in.
Contact(Contact)
Information about the shared contact.
DeleteChatPhoto
The chat photo was deleted.
Dice(Dice)
A dice with a random value.
ForumTopicClosed
Forum topic closed.
ForumTopicCreated(MessageDataForumTopicCreated)
Forum topic created.
ForumTopicEdited(MessageDataForumTopicEdited)
Forum topic edited.
ForumTopicReopened
Forum topic reopened.
Game(Game)
Information about the game.
GeneralForumTopicHidden
The ‘General’ forum topic hidden.
The ‘General’ forum topic unhidden.
Giveaway(Giveaway)
A scheduled giveaway.
GiveawayCreated
Service message: a scheduled giveaway was created.
GiveawayCompleted(GiveawayCompleted)
Service message: a giveaway without public winners was completed.
GiveawayWinners(GiveawayWinners)
A giveaway with public winners was completed.
GroupChatCreated
The group has been created.
Invoice(Invoice)
Information about the invoice for a payment.
LeftChatMember(User)
A member was removed from the group.
This member may be the bot itself.
Location(Location)
Information about the shared location.
MigrateFromChatId(i64)
The supergroup has been migrated from a group with the specified identifier.
MigrateToChatId(i64)
The group has been migrated to a supergroup with the specified identifier.
NewChatMembers(Vec<User>)
New members that were added to the group or supergroup.
The bot itself may be one of these members.
NewChatPhoto(Vec<PhotoSize>)
A chat photo was change to this value.
NewChatTitle(String)
A chat title was changed to this value.
PassportData(PassportData)
Telegram Passport data.
PinnedMessage(MaybeInaccessibleMessage)
Specified message was pinned.
Note that the Message object in variant will not contain
further reply_to
field even if it is itself a reply.
Poll(Poll)
Information about the native poll.
ProximityAlertTriggered(MessageDataProximityAlert)
A user in the chat triggered another user’s proximity alert while sharing Live Location.
Sticker(Sticker)
Information about the sticker.
Story(Story)
A forwarded story.
SuccessfulPayment(SuccessfulPayment)
Information about the successful payment.
SupergroupChatCreated
The supergroup has been created.
This field can‘t be received in a message coming through updates,
because bot can’t be a member of a supergroup when it is created
It can only be found in the reply_to
field of the crate::types::Message
struct
if someone replies to a very first message
in a directly created supergroup.
A user was shared with the bot.
Venue(Venue)
Information about the venue.
VideoNote(VideoNote)
Information about the video note.
VideoChatEnded(MessageDataVideoChatEnded)
A video chat ended in the chat.
VideoChatParticipantsInvited(MessageDataVideoChatParticipantsInvited)
New members invited to a video chat.
VideoChatScheduled(MessageDataVideoChatScheduled)
A video chat scheduled in the chat.
VideoChatStarted
A video chat started in the chat.
WebAppData(WebAppData)
Data sent by a Web App.
WriteAccessAllowed(MessageDataWriteAccess)
The user allowed the bot to write messages
after adding it to the attachment or side menu,
launching a Web App from a link,
or accepting an explicit request from a Web App
sent by the method requestWriteAccess
.
Audio(MessageDataAudio)
Describes the audio.
Document(MessageDataDocument)
Describes the document.
Photo(MessageDataPhoto)
Available sizes of the photo.
Text(Text)
The actual UTF-8 text of the message; 0-4096 characters.
Video(MessageDataVideo)
Describes the video.
Voice(MessageDataVoice)
Describes the voice.
Unknown(Value)
Contains arbitrary data for future variants.
Trait Implementations§
source§impl Clone for MessageData
impl Clone for MessageData
source§fn clone(&self) -> MessageData
fn clone(&self) -> MessageData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MessageData
impl Debug for MessageData
source§impl<'de> Deserialize<'de> for MessageData
impl<'de> Deserialize<'de> for MessageData
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<MessageData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MessageData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for MessageData
impl PartialEq for MessageData
source§fn eq(&self, other: &MessageData) -> bool
fn eq(&self, other: &MessageData) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MessageData
impl Serialize for MessageData
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for MessageData
Auto Trait Implementations§
impl Freeze for MessageData
impl RefUnwindSafe for MessageData
impl Send for MessageData
impl Sync for MessageData
impl Unpin for MessageData
impl UnwindSafe for MessageData
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> 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 more