[][src]Enum tbot::types::message::Kind

pub enum Kind {
    Text(Text),
    Audio(AudioText),
    Document(DocumentText),
    Game(Game),
    Photo(Vec<PhotoSize>, TextOption<String>),
    Sticker(Sticker),
    Video(VideoTextOption<String>),
    Voice(VoiceText),
    VideoNote(VideoNote),
    Contact(Contact),
    Location(Location),
    Venue(Venue),
    Animation(AnimationText),
    Poll(Poll),
    NewChatMembers(Vec<User>),
    LeftChatMember(User),
    NewChatTitle(String),
    NewChatPhoto(Vec<PhotoSize>),
    ChatPhotoDeleted,
    GroupCreated,
    SupergroupCreated,
    ChannelCreated,
    MigrateTo(Id),
    MigrateFrom(Id),
    Pinned(Box<Message>),
    Invoice(Invoice),
    SuccessfulPayment(SuccessfulPayment),
    ConnectedWebsite(String),
    PassportData(Data),
    Unknown,
}

Represents kinds of messages.

Variants

Text(Text)

A text message.

Audio(AudioText)

An audio. The second item is the caption.

Document(DocumentText)

A document. The second item is the caption.

Game(Game)

An invitation to play a game.

A photo. The second item is the caption, the third one is media_group_id, i.e. this photo belongs to an album with this ID.

Sticker(Sticker)

A sticker.

Video(VideoTextOption<String>)

A video. The second item is the caption, the third one is media_group_id, i.e. this photo belongs to an album with this ID.

Voice(VoiceText)

A voice message. The second item is the caption.

VideoNote(VideoNote)

A video note.

Contact(Contact)

A contact.

Location(Location)

A location.

Venue(Venue)

A venue.

Animation(AnimationText)

An animation. The second item is the caption.

Poll(Poll)

A poll.

NewChatMembers(Vec<User>)

A service message about new chat members.

LeftChatMember(User)

A service message about a member who left.

NewChatTitle(String)

A service message about the new chat title.

NewChatPhoto(Vec<PhotoSize>)

A service message about the new chat photo.

ChatPhotoDeleted

A service message that the chat photo was deleted.

GroupCreated

A service message that the group was created.

SupergroupCreated

A service message that the supergroup was created.

ChannelCreated

A service message that the channel was created.

MigrateTo(Id)

A service message that the group migrated to a supergroup with this ID.

MigrateFrom(Id)

A service message that the supergroup used to be a group with this ID.

Pinned(Box<Message>)

A service message that this message was pinned.

Invoice(Invoice)

An invoice.

SuccessfulPayment(SuccessfulPayment)

A service message about a successful payment.

ConnectedWebsite(String)

A connected website.

PassportData(Data)

Passport data.

Unknown

Some unkonwn message kind. Probably means tbot is outdated.

Methods

impl Kind[src]

pub fn is_text(&self) -> bool[src]

Checks if self is Text.

pub fn is_audio(&self) -> bool[src]

Checks if self is Audio.

pub fn is_document(&self) -> bool[src]

Checks if self is Document.

pub fn is_game(&self) -> bool[src]

Checks if self is Game.

pub fn is_photo(&self) -> bool[src]

Checks if self is Photo.

pub fn is_sticker(&self) -> bool[src]

Checks if self is Sticker.

pub fn is_video(&self) -> bool[src]

Checks if self is Video.

pub fn is_voice(&self) -> bool[src]

Checks if self is Voice.

pub fn is_video_note(&self) -> bool[src]

Checks if self is VideoNote.

pub fn is_contact(&self) -> bool[src]

Checks if self is Contact.

pub fn is_location(&self) -> bool[src]

Checks if self is Location.

pub fn is_venue(&self) -> bool[src]

Checks if self is Venue.

pub fn is_animation(&self) -> bool[src]

Checks if self is Animation.

pub fn is_poll(&self) -> bool[src]

Checks if self is Poll.

pub fn is_new_chat_members(&self) -> bool[src]

Checks if self is NewChatMembers.

pub fn is_left_chat_member(&self) -> bool[src]

Checks if self is LeftChatMember.

pub fn is_new_chat_title(&self) -> bool[src]

Checks if self is NewChatTitle.

pub fn is_new_chat_photo(&self) -> bool[src]

Checks if self is NewChatPhoto.

pub fn is_chat_photo_deleted(&self) -> bool[src]

Checks if self is ChatPhotoDeleted.

pub fn is_group_created(&self) -> bool[src]

Checks if self is GroupCreated.

pub fn is_supergroup_created(&self) -> bool[src]

Checks if self is SupergroupCreated.

pub fn is_channel_created(&self) -> bool[src]

Checks if self is ChannelCreated.

pub fn is_migrate_to(&self) -> bool[src]

Checks if self is MigrateTo.

pub fn is_migrate_from(&self) -> bool[src]

Checks if self is MigrateFrom.

pub fn is_pinned(&self) -> bool[src]

Checks if self is Pinned.

pub fn is_invoice(&self) -> bool[src]

Checks if self is Invoice.

pub fn is_successful_payment(&self) -> bool[src]

Checks if self is SuccessfulPayment.

pub fn is_connected_website(&self) -> bool[src]

Checks if self is ConnectedWebsite.

pub fn is_passport_data(&self) -> bool[src]

Checks if self is PassportData.

Trait Implementations

impl Clone for Kind[src]

impl PartialEq<Kind> for Kind[src]

impl Debug for Kind[src]

Auto Trait Implementations

impl Send for Kind

impl Unpin for Kind

impl Sync for Kind

impl UnwindSafe for Kind

impl RefUnwindSafe for Kind

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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

impl<T> Erased for T