[][src]Enum tgbot::types::MessageData

pub enum MessageData {
    Animation(Animation),
    Audio {
        caption: Option<Text>,
        data: Audio,
    },
    ChannelChatCreated,
    ConnectedWebsite(String),
    Contact(Contact),
    DeleteChatPhoto,
    Document {
        caption: Option<Text>,
        data: Document,
    },
    Empty,
    Game(Game),
    GroupChatCreated,
    Invoice(Invoice),
    LeftChatMember(User),
    Location(Location),
    MigrateFromChatId(Integer),
    MigrateToChatId(Integer),
    NewChatMembers(Vec<User>),
    NewChatPhoto(Vec<PhotoSize>),
    NewChatTitle(String),
    PassportData(PassportData),
    PinnedMessage(Box<Message>),
    Photo {
        caption: Option<Text>,
        data: Vec<PhotoSize>,
    },
    Poll(Poll),
    Sticker(Sticker),
    SuccessfulPayment(SuccessfulPayment),
    SupergroupChatCreated,
    Text(Text),
    Venue(Venue),
    Video {
        caption: Option<Text>,
        data: Video,
    },
    VideoNote(VideoNote),
    Voice {
        caption: Option<Text>,
        data: Voice,
    },
}

Contains message data

Variants

Animation(Animation)

Message is an animation, information about the animation

Audio

Audio message

Fields of Audio

caption: Option<Text>

Audio caption

data: Audio

Audio data

ChannelChatCreated

Service message: 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 reply_to_message if someone replies to a very first message in a channel

ConnectedWebsite(String)

The domain name of the website on which the user has logged in

Contact(Contact)

Message is a shared contact, information about the contact

DeleteChatPhoto

Service message: the chat photo was deleted

Document

Document message

Fields of Document

caption: Option<Text>

Document caption

data: Document

Document data

Empty

Message has no data

Game(Game)

Message is a game, information about the game

GroupChatCreated

Service message: the group has been created

Invoice(Invoice)

Message is an invoice for a payment, information about the invoice

LeftChatMember(User)

A member was removed from the group (this member may be the bot itself)

Location(Location)

Message is a shared location, information about the location

MigrateFromChatId(Integer)

The supergroup has been migrated from a group with the specified identifier

MigrateToChatId(Integer)

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(Box<Message>)

Specified message was pinned Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply

Photo

Message is a photo, available sizes of the photo

Fields of Photo

caption: Option<Text>

Photo caption

data: Vec<PhotoSize>

Photos

Poll(Poll)

Message is a native poll, information about the poll

Sticker(Sticker)

Message is a sticker, information about the sticker

SuccessfulPayment(SuccessfulPayment)

Message is a service message about a successful payment, information about the payment

SupergroupChatCreated

Service message: 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 reply_to_message if someone replies to a very first message in a directly created supergroup

Text(Text)

The actual UTF-8 text of the message, 0-4096 characters

Venue(Venue)

Message is a venue, information about the venue

Video

Message is a video, information about the video

Fields of Video

caption: Option<Text>

Video caption

data: Video

Video data

VideoNote(VideoNote)

Message is a video note, information about the video message

Voice

Message is a voice message, information about the file

Fields of Voice

caption: Option<Text>

Voice caption

data: Voice

Voice data

Trait Implementations

impl Clone for MessageData[src]

impl Debug for MessageData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.