pub struct Message {
pub id: MessageId,
pub thread_id: Option<ThreadId>,
pub from: Option<User>,
pub sender_chat: Option<Chat>,
pub date: DateTime<Utc>,
pub chat: Chat,
pub is_topic_message: bool,
pub via_bot: Option<User>,
pub sender_business_bot: Option<User>,
pub kind: MessageKind,
}Expand description
This object represents a message.
Fields§
§id: MessageIdUnique message identifier inside this chat.
thread_id: Option<ThreadId>Unique identifier of a message thread to which the message belongs; for supergroups only.
from: Option<User>Sender, empty for messages sent to channels.
sender_chat: Option<Chat>Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group
date: DateTime<Utc>Date the message was sent in Unix time.
chat: ChatConversation the message belongs to.
is_topic_message: booltrue, if the message is sent to a forum topic.
via_bot: Option<User>Bot through which the message was sent.
sender_business_bot: Option<User>The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.
kind: MessageKindImplementations§
Source§impl Message
Getters for Message fields from telegram docs.
impl Message
Getters for Message fields from telegram docs.
Sourcepub fn from(&self) -> Option<&User>
👎Deprecated since 0.13.0: use .from field instead
pub fn from(&self) -> Option<&User>
.from field insteadReturns the user who sent the message.
pub fn effect_id(&self) -> Option<&EffectId>
pub fn sender_chat(&self) -> Option<&Chat>
.sender_chat field insteadpub fn forward_origin(&self) -> Option<&MessageOrigin>
pub fn quote(&self) -> Option<&TextQuote>
pub fn reply_to_story(&self) -> Option<&Story>
pub fn sender_boost_count(&self) -> Option<u16>
pub fn forward_date(&self) -> Option<DateTime<Utc>>
pub fn forward_from_user(&self) -> Option<&User>
pub fn forward_from_chat(&self) -> Option<&Chat>
pub fn forward_from_sender_name(&self) -> Option<&str>
pub fn forward_from_message_id(&self) -> Option<MessageId>
Sourcepub fn reply_to_message(&self) -> Option<&Message>
pub fn reply_to_message(&self) -> Option<&Message>
Examples found in repository?
78async fn kick_user(bot: Bot, msg: Message) -> ResponseResult<()> {
79 match msg.reply_to_message() {
80 Some(replied) => {
81 // bot.unban_chat_member can also kicks a user from a group chat.
82 bot.unban_chat_member(msg.chat.id, replied.from.as_ref().unwrap().id).await?;
83 }
84 None => {
85 bot.send_message(msg.chat.id, "Use this command in reply to another message").await?;
86 }
87 }
88 Ok(())
89}
90
91// Ban a user with replied message.
92async fn ban_user(bot: Bot, msg: Message, time: Duration) -> ResponseResult<()> {
93 match msg.reply_to_message() {
94 Some(replied) => {
95 bot.kick_chat_member(
96 msg.chat.id,
97 replied.from.as_ref().expect("Must be MessageKind::Common").id,
98 )
99 .until_date(msg.date + time)
100 .await?;
101 }
102 None => {
103 bot.send_message(msg.chat.id, "Use this command in a reply to another message!")
104 .await?;
105 }
106 }
107 Ok(())
108}
109
110// Mute a user with a replied message.
111async fn mute_user(bot: Bot, msg: Message, time: Duration) -> ResponseResult<()> {
112 match msg.reply_to_message() {
113 Some(replied) => {
114 bot.restrict_chat_member(
115 msg.chat.id,
116 replied.from.as_ref().expect("Must be MessageKind::Common").id,
117 ChatPermissions::empty(),
118 )
119 .until_date(msg.date + time)
120 .await?;
121 }
122 None => {
123 bot.send_message(msg.chat.id, "Use this command in a reply to another message!")
124 .await?;
125 }
126 }
127 Ok(())
128}pub fn edit_date(&self) -> Option<&DateTime<Utc>>
pub fn media_group_id(&self) -> Option<&MediaGroupId>
Sourcepub fn text(&self) -> Option<&str>
pub fn text(&self) -> Option<&str>
Examples found in repository?
66async fn receive_full_name(bot: Bot, dialogue: MyDialogue, msg: Message) -> HandlerResult {
67 match msg.text() {
68 Some(text) => {
69 bot.send_message(msg.chat.id, "How old are you?").await?;
70 dialogue.update(State::ReceiveAge { full_name: text.into() }).await?;
71 }
72 None => {
73 bot.send_message(msg.chat.id, "Send me plain text.").await?;
74 }
75 }
76
77 Ok(())
78}
79
80async fn receive_age(
81 bot: Bot,
82 dialogue: MyDialogue,
83 full_name: String, // Available from `State::ReceiveAge`.
84 msg: Message,
85) -> HandlerResult {
86 match msg.text().map(|text| text.parse::<u8>()) {
87 Some(Ok(age)) => {
88 bot.send_message(msg.chat.id, "What's your location?").await?;
89 dialogue.update(State::ReceiveLocation { full_name, age }).await?;
90 }
91 _ => {
92 bot.send_message(msg.chat.id, "Send me a number.").await?;
93 }
94 }
95
96 Ok(())
97}
98
99async fn receive_location(
100 bot: Bot,
101 dialogue: MyDialogue,
102 (full_name, age): (String, u8), // Available from `State::ReceiveLocation`.
103 msg: Message,
104) -> HandlerResult {
105 match msg.text() {
106 Some(location) => {
107 let report = format!("Full name: {full_name}\nAge: {age}\nLocation: {location}");
108 bot.send_message(msg.chat.id, report).await?;
109 dialogue.exit().await?;
110 }
111 None => {
112 bot.send_message(msg.chat.id, "Send me plain text.").await?;
113 }
114 }
115
116 Ok(())
117}More examples
64async fn start(bot: Bot, dialogue: MyDialogue, msg: Message) -> HandlerResult {
65 match msg.text().map(|text| text.parse::<i32>()) {
66 Some(Ok(n)) => {
67 dialogue.update(State::GotNumber(n)).await?;
68 bot.send_message(
69 msg.chat.id,
70 format!("Remembered number {n}. Now use /get or /reset."),
71 )
72 .await?;
73 }
74 _ => {
75 bot.send_message(msg.chat.id, "Please, send me a number.").await?;
76 }
77 }
78
79 Ok(())
80}110async fn receive_full_name(bot: Bot, dialogue: MyDialogue, msg: Message) -> HandlerResult {
111 match msg.text().map(ToOwned::to_owned) {
112 Some(full_name) => {
113 let products = ["Apple", "Banana", "Orange", "Potato"]
114 .map(|product| InlineKeyboardButton::callback(product, product));
115
116 bot.send_message(msg.chat.id, "Select a product:")
117 .reply_markup(InlineKeyboardMarkup::new([products]))
118 .await?;
119 dialogue.update(State::ReceiveProductChoice { full_name }).await?;
120 }
121 None => {
122 bot.send_message(msg.chat.id, "Please, send me your full name.").await?;
123 }
124 }
125
126 Ok(())
127}63async fn message_handler(
64 bot: Bot,
65 msg: Message,
66 me: Me,
67) -> Result<(), Box<dyn Error + Send + Sync>> {
68 if let Some(text) = msg.text() {
69 match BotCommands::parse(text, me.username()) {
70 Ok(Command::Help) => {
71 // Just send the description of all commands.
72 bot.send_message(msg.chat.id, Command::descriptions().to_string()).await?;
73 }
74 Ok(Command::Start) => {
75 // Create a list of buttons and send them.
76 let keyboard = make_keyboard();
77 bot.send_message(msg.chat.id, "Debian versions:").reply_markup(keyboard).await?;
78 }
79
80 Err(_) => {
81 bot.send_message(msg.chat.id, "Command not found!").await?;
82 }
83 }
84 }
85
86 Ok(())
87}101pub async fn send_message(
102 bot: Bot,
103 id: ChatId, // Available from `State::WriteToSomeone`
104 msg: Message,
105 dialogue: MyDialogue,
106 me: Me,
107) -> HandlerResult {
108 match msg.text() {
109 Some(text) => {
110 // Trying to send a message to the user
111 let sent_result = bot
112 .send_message(id, format!("You have a new message!\n\n<i>{text}</i>"))
113 .parse_mode(ParseMode::Html)
114 .await;
115
116 // And if no error is returned, success!
117 if sent_result.is_ok() {
118 bot.send_message(
119 msg.chat.id,
120 format!(
121 "Message sent!\n\nYour link is: {}?start={}",
122 me.tme_url(),
123 msg.chat.id
124 ),
125 )
126 .await?;
127 } else {
128 bot.send_message(msg.chat.id, "Error sending message! Maybe user blocked the bot?")
129 .await?;
130 }
131 dialogue.exit().await?;
132 }
133 None => {
134 bot.send_message(msg.chat.id, "This bot can send only text.").await?;
135 }
136 };
137 Ok(())
138}Sourcepub fn entities(&self) -> Option<&[MessageEntity]>
pub fn entities(&self) -> Option<&[MessageEntity]>
Returns message entities that represent text formatting.
Note: you probably want to use parse_entities instead.
This function returns Some(entities) for text messages and
None for all other kinds of messages (including photos with
captions).
See also: caption_entities.
pub fn link_preview_options(&self) -> Option<&LinkPreviewOptions>
Sourcepub fn caption_entities(&self) -> Option<&[MessageEntity]>
pub fn caption_entities(&self) -> Option<&[MessageEntity]>
Returns message entities that represent text formatting.
Note: you probably want to use parse_caption_entities
instead.
This function returns Some(entities) for media messages and
None for all other kinds of messages (including text messages).
See also: entities.
Sourcepub fn show_caption_above_media(&self) -> bool
pub fn show_caption_above_media(&self) -> bool
Returns true if the caption must be shown above the message media.
Getter for MediaPhoto::show_caption_above_media,
MediaVideo::show_caption_above_media and
MediaAnimation::show_caption_above_media.
Sourcepub fn has_media_spoiler(&self) -> bool
pub fn has_media_spoiler(&self) -> bool
Returns true if the message media is covered by a spoiler
animation.
Getter for MediaPhoto::has_media_spoiler,
MediaVideo::has_media_spoiler and
MediaAnimation::has_media_spoiler.
pub fn audio(&self) -> Option<&Audio>
pub fn document(&self) -> Option<&Document>
pub fn paid_media(&self) -> Option<&PaidMediaInfo>
pub fn animation(&self) -> Option<&Animation>
pub fn game(&self) -> Option<&Game>
pub fn photo(&self) -> Option<&[PhotoSize]>
pub fn sticker(&self) -> Option<&Sticker>
pub fn story(&self) -> Option<&Story>
pub fn video(&self) -> Option<&Video>
pub fn voice(&self) -> Option<&Voice>
pub fn video_note(&self) -> Option<&VideoNote>
pub fn caption(&self) -> Option<&str>
pub fn contact(&self) -> Option<&Contact>
pub fn location(&self) -> Option<&Location>
pub fn venue(&self) -> Option<&Venue>
pub fn poll(&self) -> Option<&Poll>
pub fn checklist(&self) -> Option<&Checklist>
pub fn new_chat_members(&self) -> Option<&[User]>
pub fn left_chat_member(&self) -> Option<&User>
pub fn new_chat_title(&self) -> Option<&str>
pub fn new_chat_photo(&self) -> Option<&[PhotoSize]>
Sourcepub fn is_delete_chat_photo(&self) -> bool
pub fn is_delete_chat_photo(&self) -> bool
Returns true if the incoming Message contains the
delete_chat_photo Service message.
pub fn delete_chat_photo(&self) -> Option<&MessageDeleteChatPhoto>
Sourcepub fn is_group_chat_created(&self) -> bool
pub fn is_group_chat_created(&self) -> bool
Returns true if the incoming Message contains the
group_chat_created Service message.
pub fn group_chat_created(&self) -> Option<&MessageGroupChatCreated>
Sourcepub fn is_super_group_chat_created(&self) -> bool
pub fn is_super_group_chat_created(&self) -> bool
Returns true if the incoming Message contains the
supergroup_chat_created Service message.
pub fn super_group_chat_created(&self) -> Option<&MessageSupergroupChatCreated>
Sourcepub fn is_channel_chat_created(&self) -> bool
pub fn is_channel_chat_created(&self) -> bool
Returns true if the incoming Message contains the
channel_chat_created Service message.
pub fn channel_chat_created(&self) -> Option<&MessageChannelChatCreated>
pub fn message_auto_delete_timer_changed( &self, ) -> Option<&MessageAutoDeleteTimerChanged>
pub fn chat_migration(&self) -> Option<&ChatMigration>
pub fn migrate_to_chat_id(&self) -> Option<&ChatId>
pub fn migrate_from_chat_id(&self) -> Option<&ChatId>
pub fn pinned_message(&self) -> Option<&MaybeInaccessibleMessage>
pub fn invoice(&self) -> Option<&Invoice>
pub fn successful_payment(&self) -> Option<&SuccessfulPayment>
pub fn connected_website(&self) -> Option<&str>
pub fn write_access_allowed(&self) -> Option<&WriteAccessAllowed>
pub fn passport_data(&self) -> Option<&PassportData>
pub fn dice(&self) -> Option<&Dice>
pub fn proximity_alert_triggered(&self) -> Option<&ProximityAlertTriggered>
pub fn boost_added(&self) -> Option<&ChatBoostAdded>
pub fn chat_background_set(&self) -> Option<&ChatBackground>
pub fn checklist_tasks_done(&self) -> Option<&ChecklistTasksDone>
pub fn checklist_tasks_added(&self) -> Option<&ChecklistTasksAdded>
pub fn direct_message_price_changed(&self) -> Option<&DirectMessagePriceChanged>
pub fn forum_topic_created(&self) -> Option<&ForumTopicCreated>
pub fn forum_topic_edited(&self) -> Option<&ForumTopicEdited>
pub fn forum_topic_closed(&self) -> Option<&ForumTopicClosed>
pub fn forum_topic_reopened(&self) -> Option<&ForumTopicReopened>
pub fn giveaway(&self) -> Option<&Giveaway>
pub fn giveaway_completed(&self) -> Option<&GiveawayCompleted>
pub fn giveaway_created(&self) -> Option<&GiveawayCreated>
pub fn giveaway_winners(&self) -> Option<&GiveawayWinners>
pub fn paid_message_price_changed(&self) -> Option<&PaidMessagePriceChanged>
pub fn gift_info(&self) -> Option<&GiftInfo>
pub fn unique_gift_info(&self) -> Option<&UniqueGiftInfo>
pub fn gift_upgrade_sent(&self) -> Option<&GiftInfo>
pub fn video_chat_scheduled(&self) -> Option<&VideoChatScheduled>
pub fn video_chat_started(&self) -> Option<&VideoChatStarted>
pub fn video_chat_ended(&self) -> Option<&VideoChatEnded>
pub fn video_chat_participants_invited( &self, ) -> Option<&VideoChatParticipantsInvited>
pub fn web_app_data(&self) -> Option<&WebAppData>
pub fn reply_markup(&self) -> Option<&InlineKeyboardMarkup>
pub fn is_automatic_forward(&self) -> bool
pub fn has_protected_content(&self) -> bool
Source§impl Message
impl Message
Sourcepub fn url(&self) -> Option<Url>
pub fn url(&self) -> Option<Url>
Produces a direct link to this message.
Note that for private groups the link will only be accessible for group members.
Returns None for private chats (i.e.: DMs) and private groups (not
supergroups).
Sourcepub fn url_of(
chat_id: ChatId,
chat_username: Option<&str>,
message_id: MessageId,
) -> Option<Url>
pub fn url_of( chat_id: ChatId, chat_username: Option<&str>, message_id: MessageId, ) -> Option<Url>
Produces a direct link to a message in a chat.
If you have a Message object, use url instead.
This function should only be used if you have limited information about
the message (chat id, username of the chat, if any and its id).
Note that for private groups the link will only be accessible for group members.
Returns None for private chats (i.e.: DMs) and private groups (not
supergroups).
Sourcepub fn comment_url(&self, comment_id: MessageId) -> Option<Url>
pub fn comment_url(&self, comment_id: MessageId) -> Option<Url>
Produces a direct link to a comment on this post.
Note that for private channels the link will only be accessible for channel members.
Returns None for private chats (i.e.: DMs) and private groups (not
supergroups).
Sourcepub fn comment_url_of(
channel_id: ChatId,
channel_username: Option<&str>,
post_id: MessageId,
comment_id: MessageId,
) -> Option<Url>
pub fn comment_url_of( channel_id: ChatId, channel_username: Option<&str>, post_id: MessageId, comment_id: MessageId, ) -> Option<Url>
Produces a direct link to a comment on a post.
If you have a Message object of the channel post, use comment_url
instead. This function should only be used if you have limited
information about the message (channel id, username of the channel,
if any, post id and comment id).
Note that for private channels the link will only be accessible for channel members.
Returns None for private chats (i.e.: DMs) and private groups (not
supergroups).
Sourcepub fn url_in_thread(&self, thread_starter_msg_id: MessageId) -> Option<Url>
pub fn url_in_thread(&self, thread_starter_msg_id: MessageId) -> Option<Url>
Produces a direct link to this message in a given thread.
“Thread” is a group of messages that reply to each other in a tree-like
structure. thread_starter_msg_id is the id of the first message in
the thread, the root of the tree.
Note that for private groups the link will only be accessible for group members.
Returns None for private chats (i.e.: DMs) and private groups (not
supergroups).
Sourcepub fn url_in_thread_of(
chat_id: ChatId,
chat_username: Option<&str>,
thread_starter_msg_id: MessageId,
message_id: MessageId,
) -> Option<Url>
pub fn url_in_thread_of( chat_id: ChatId, chat_username: Option<&str>, thread_starter_msg_id: MessageId, message_id: MessageId, ) -> Option<Url>
Produces a direct link to a message in a given thread.
If you have a Message object of the channel post, use
url_in_thread instead. This function should only be used if you
have limited information about the message (chat id, username of the
chat, if any, thread starter id and message id).
“Thread” is a group of messages that reply to each other in a tree-like
structure. thread_starter_msg_id is the id of the first message in
the thread, the root of the tree.
Note that for private groups the link will only be accessible for group members.
Returns None for private chats (i.e.: DMs) and private groups (not
supergroups).
Sourcepub fn parse_entities(&self) -> Option<Vec<MessageEntityRef<'_>>>
pub fn parse_entities(&self) -> Option<Vec<MessageEntityRef<'_>>>
Returns message entities that represent text formatting.
This function returns Some(entities) for text messages and
None for all other kinds of messages (including photos with
captions).
See also: parse_caption_entities.
Sourcepub fn parse_caption_entities(&self) -> Option<Vec<MessageEntityRef<'_>>>
pub fn parse_caption_entities(&self) -> Option<Vec<MessageEntityRef<'_>>>
Returns message entities that represent text formatting.
This function returns Some(entities) for media messages and
None for all other kinds of messages (including text messages).
See also: parse_entities.
Sourcepub fn mentioned_users(&self) -> impl Iterator<Item = &User>
pub fn mentioned_users(&self) -> impl Iterator<Item = &User>
Returns all users that are “contained” in this Message structure.
This might be useful to track information about users.
Note that this function may return quite a few users as it scans replies, message entities and more. Also note that this function can return duplicate users.
In earlier versions of the teloixde-core, this function
returned mentioned users in chat from which the Message was
forwarded. E.g. from pinned messages in the chat. This functionality
was lost with the TBA 7.3 update.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Message, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Message, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<Message> for MessageId
Implemented for syntax sugar, see issue https://github.com/teloxide/teloxide/issues/1143
impl From<Message> for MessageId
Implemented for syntax sugar, see issue https://github.com/teloxide/teloxide/issues/1143
Source§impl<Out> MessageFilterExt<Out> for Message
impl<Out> MessageFilterExt<Out> for Message
Source§fn filter_from() -> Handler<'static, Out, DpHandlerDescription>
fn filter_from() -> Handler<'static, Out, DpHandlerDescription>
Message::from filter.Source§fn filter_animation() -> Handler<'static, Out, DpHandlerDescription>
fn filter_animation() -> Handler<'static, Out, DpHandlerDescription>
Message::animation filter.Source§fn filter_audio() -> Handler<'static, Out, DpHandlerDescription>
fn filter_audio() -> Handler<'static, Out, DpHandlerDescription>
Message::audio filter.Source§fn filter_contact() -> Handler<'static, Out, DpHandlerDescription>
fn filter_contact() -> Handler<'static, Out, DpHandlerDescription>
Message::contact filter.Source§fn filter_document() -> Handler<'static, Out, DpHandlerDescription>
fn filter_document() -> Handler<'static, Out, DpHandlerDescription>
Message::document filter.Source§fn filter_paid_media() -> Handler<'static, Out, DpHandlerDescription>
fn filter_paid_media() -> Handler<'static, Out, DpHandlerDescription>
Message::paid_media filter.Source§fn filter_game() -> Handler<'static, Out, DpHandlerDescription>
fn filter_game() -> Handler<'static, Out, DpHandlerDescription>
Message::game filter.Source§fn filter_venue() -> Handler<'static, Out, DpHandlerDescription>
fn filter_venue() -> Handler<'static, Out, DpHandlerDescription>
Message::venue filter.Source§fn filter_location() -> Handler<'static, Out, DpHandlerDescription>
fn filter_location() -> Handler<'static, Out, DpHandlerDescription>
Message::location filter.Source§fn filter_photo() -> Handler<'static, Out, DpHandlerDescription>
fn filter_photo() -> Handler<'static, Out, DpHandlerDescription>
Message::photo filter.Source§fn filter_poll() -> Handler<'static, Out, DpHandlerDescription>
fn filter_poll() -> Handler<'static, Out, DpHandlerDescription>
Message::poll filter.Source§fn filter_checklist() -> Handler<'static, Out, DpHandlerDescription>
fn filter_checklist() -> Handler<'static, Out, DpHandlerDescription>
Message::checklist filter.Source§fn filter_sticker() -> Handler<'static, Out, DpHandlerDescription>
fn filter_sticker() -> Handler<'static, Out, DpHandlerDescription>
Message::sticker filter.Source§fn filter_story() -> Handler<'static, Out, DpHandlerDescription>
fn filter_story() -> Handler<'static, Out, DpHandlerDescription>
Message::story filter.Source§fn filter_text() -> Handler<'static, Out, DpHandlerDescription>
fn filter_text() -> Handler<'static, Out, DpHandlerDescription>
Message::text filter.Source§fn filter_video() -> Handler<'static, Out, DpHandlerDescription>
fn filter_video() -> Handler<'static, Out, DpHandlerDescription>
Message::video filter.Source§fn filter_video_note() -> Handler<'static, Out, DpHandlerDescription>
fn filter_video_note() -> Handler<'static, Out, DpHandlerDescription>
Message::video_note filter.Source§fn filter_voice() -> Handler<'static, Out, DpHandlerDescription>
fn filter_voice() -> Handler<'static, Out, DpHandlerDescription>
Message::voice filter.Source§fn filter_migration() -> Handler<'static, Out, DpHandlerDescription>
fn filter_migration() -> Handler<'static, Out, DpHandlerDescription>
Message::chat_migration filter.Source§fn filter_migration_from() -> Handler<'static, Out, DpHandlerDescription>
fn filter_migration_from() -> Handler<'static, Out, DpHandlerDescription>
Message::migrate_from_chat_id filter.Source§fn filter_migration_to() -> Handler<'static, Out, DpHandlerDescription>
fn filter_migration_to() -> Handler<'static, Out, DpHandlerDescription>
Message::migrate_to_chat_id filter.Source§fn filter_reply_to_message() -> Handler<'static, Out, DpHandlerDescription>
fn filter_reply_to_message() -> Handler<'static, Out, DpHandlerDescription>
Message::reply_to_message filter.Source§fn filter_forward_origin() -> Handler<'static, Out, DpHandlerDescription>
fn filter_forward_origin() -> Handler<'static, Out, DpHandlerDescription>
Message::forward_origin filter.Source§fn filter_reply_to_story() -> Handler<'static, Out, DpHandlerDescription>
fn filter_reply_to_story() -> Handler<'static, Out, DpHandlerDescription>
Message::reply_to_story filter.Source§fn filter_new_chat_members() -> Handler<'static, Out, DpHandlerDescription>
fn filter_new_chat_members() -> Handler<'static, Out, DpHandlerDescription>
Message::new_chat_members filter.Source§fn filter_left_chat_member() -> Handler<'static, Out, DpHandlerDescription>
fn filter_left_chat_member() -> Handler<'static, Out, DpHandlerDescription>
Message::left_chat_member filter.Source§fn filter_new_chat_title() -> Handler<'static, Out, DpHandlerDescription>
fn filter_new_chat_title() -> Handler<'static, Out, DpHandlerDescription>
Message::new_chat_title filter.Source§fn filter_new_chat_photo() -> Handler<'static, Out, DpHandlerDescription>
fn filter_new_chat_photo() -> Handler<'static, Out, DpHandlerDescription>
Message::new_chat_photo filter.Source§fn filter_delete_chat_photo() -> Handler<'static, Out, DpHandlerDescription>
fn filter_delete_chat_photo() -> Handler<'static, Out, DpHandlerDescription>
Message::delete_chat_photo filter.Source§fn filter_group_chat_created() -> Handler<'static, Out, DpHandlerDescription>
fn filter_group_chat_created() -> Handler<'static, Out, DpHandlerDescription>
Message::group_chat_created filter.Source§fn filter_supergroup_chat_created() -> Handler<'static, Out, DpHandlerDescription>
fn filter_supergroup_chat_created() -> Handler<'static, Out, DpHandlerDescription>
Message::super_group_chat_created filter.Source§fn filter_channel_chat_created() -> Handler<'static, Out, DpHandlerDescription>
fn filter_channel_chat_created() -> Handler<'static, Out, DpHandlerDescription>
Message::channel_chat_created filter.Source§fn filter_message_auto_delete_timer_changed() -> Handler<'static, Out, DpHandlerDescription>
fn filter_message_auto_delete_timer_changed() -> Handler<'static, Out, DpHandlerDescription>
Message::message_auto_delete_timer_changed filter.Source§fn filter_pinned() -> Handler<'static, Out, DpHandlerDescription>
fn filter_pinned() -> Handler<'static, Out, DpHandlerDescription>
Message::pinned_message filter.Source§fn filter_invoice() -> Handler<'static, Out, DpHandlerDescription>
fn filter_invoice() -> Handler<'static, Out, DpHandlerDescription>
Message::invoice filter.Source§fn filter_successful_payment() -> Handler<'static, Out, DpHandlerDescription>
fn filter_successful_payment() -> Handler<'static, Out, DpHandlerDescription>
Message::successful_payment filter.Source§fn filter_connected_website() -> Handler<'static, Out, DpHandlerDescription>
fn filter_connected_website() -> Handler<'static, Out, DpHandlerDescription>
Message::connected_website filter.Source§fn filter_write_access_allowed() -> Handler<'static, Out, DpHandlerDescription>
fn filter_write_access_allowed() -> Handler<'static, Out, DpHandlerDescription>
Message::write_access_allowed filter.Source§fn filter_passport_data() -> Handler<'static, Out, DpHandlerDescription>
fn filter_passport_data() -> Handler<'static, Out, DpHandlerDescription>
Message::passport_data filter.Source§fn filter_dice() -> Handler<'static, Out, DpHandlerDescription>
fn filter_dice() -> Handler<'static, Out, DpHandlerDescription>
Message::dice filter.Source§fn filter_proximity_alert_triggered() -> Handler<'static, Out, DpHandlerDescription>
fn filter_proximity_alert_triggered() -> Handler<'static, Out, DpHandlerDescription>
Message::proximity_alert_triggered filter.Source§fn filter_boost_added() -> Handler<'static, Out, DpHandlerDescription>
fn filter_boost_added() -> Handler<'static, Out, DpHandlerDescription>
Message::boost_added filter.Source§fn filter_chat_background_set() -> Handler<'static, Out, DpHandlerDescription>
fn filter_chat_background_set() -> Handler<'static, Out, DpHandlerDescription>
Message::chat_background_set filter.Source§fn filter_checklist_tasks_done() -> Handler<'static, Out, DpHandlerDescription>
fn filter_checklist_tasks_done() -> Handler<'static, Out, DpHandlerDescription>
Message::checklist_tasks_done filter.Source§fn filter_checklist_tasks_added() -> Handler<'static, Out, DpHandlerDescription>
fn filter_checklist_tasks_added() -> Handler<'static, Out, DpHandlerDescription>
Message::checklist_tasks_added filter.Source§fn filter_direct_message_price_changed() -> Handler<'static, Out, DpHandlerDescription>
fn filter_direct_message_price_changed() -> Handler<'static, Out, DpHandlerDescription>
Message::direct_message_price_changed filter.Source§fn filter_forum_topic_created() -> Handler<'static, Out, DpHandlerDescription>
fn filter_forum_topic_created() -> Handler<'static, Out, DpHandlerDescription>
Message::forum_topic_created filter.Source§fn filter_forum_topic_edited() -> Handler<'static, Out, DpHandlerDescription>
fn filter_forum_topic_edited() -> Handler<'static, Out, DpHandlerDescription>
Message::forum_topic_edited filter.Source§fn filter_forum_topic_closed() -> Handler<'static, Out, DpHandlerDescription>
fn filter_forum_topic_closed() -> Handler<'static, Out, DpHandlerDescription>
Message::forum_topic_closed filter.Source§fn filter_forum_topic_reopened() -> Handler<'static, Out, DpHandlerDescription>
fn filter_forum_topic_reopened() -> Handler<'static, Out, DpHandlerDescription>
Message::forum_topic_reopened filter.Message::general_forum_topic_hidden filter.Message::general_forum_topic_unhidden filter.Source§fn filter_giveaway() -> Handler<'static, Out, DpHandlerDescription>
fn filter_giveaway() -> Handler<'static, Out, DpHandlerDescription>
Message::giveaway filter.Source§fn filter_giveaway_completed() -> Handler<'static, Out, DpHandlerDescription>
fn filter_giveaway_completed() -> Handler<'static, Out, DpHandlerDescription>
Message::giveaway_completed filter.Source§fn filter_giveaway_created() -> Handler<'static, Out, DpHandlerDescription>
fn filter_giveaway_created() -> Handler<'static, Out, DpHandlerDescription>
Message::giveaway_created filter.Source§fn filter_giveaway_winners() -> Handler<'static, Out, DpHandlerDescription>
fn filter_giveaway_winners() -> Handler<'static, Out, DpHandlerDescription>
Message::giveaway_winners filter.Source§fn filter_paid_message_price_changed() -> Handler<'static, Out, DpHandlerDescription>
fn filter_paid_message_price_changed() -> Handler<'static, Out, DpHandlerDescription>
Message::paid_message_price_changed filter.Source§fn filter_gift_info() -> Handler<'static, Out, DpHandlerDescription>
fn filter_gift_info() -> Handler<'static, Out, DpHandlerDescription>
Message::gift_info filter.Source§fn filter_unique_gift_info() -> Handler<'static, Out, DpHandlerDescription>
fn filter_unique_gift_info() -> Handler<'static, Out, DpHandlerDescription>
Message::unique_gift_info filter.Source§fn filter_video_chat_scheduled() -> Handler<'static, Out, DpHandlerDescription>
fn filter_video_chat_scheduled() -> Handler<'static, Out, DpHandlerDescription>
Message::video_chat_scheduled filter.Source§fn filter_video_chat_started() -> Handler<'static, Out, DpHandlerDescription>
fn filter_video_chat_started() -> Handler<'static, Out, DpHandlerDescription>
Message::video_chat_started filter.Source§fn filter_video_chat_ended() -> Handler<'static, Out, DpHandlerDescription>
fn filter_video_chat_ended() -> Handler<'static, Out, DpHandlerDescription>
Message::video_chat_ended filter.Source§fn filter_video_chat_participants_invited() -> Handler<'static, Out, DpHandlerDescription>
fn filter_video_chat_participants_invited() -> Handler<'static, Out, DpHandlerDescription>
Message::video_chat_participants_invited filter.Source§fn filter_web_app_data() -> Handler<'static, Out, DpHandlerDescription>
fn filter_web_app_data() -> Handler<'static, Out, DpHandlerDescription>
Message::web_app_data filter.Source§impl RenderMessageTextHelper for Message
impl RenderMessageTextHelper for Message
Source§fn html_text(&self) -> Option<String>
fn html_text(&self) -> Option<String>
Source§fn markdown_text(&self) -> Option<String>
fn markdown_text(&self) -> Option<String>
Source§fn html_caption(&self) -> Option<String>
fn html_caption(&self) -> Option<String>
Source§fn markdown_caption(&self) -> Option<String>
fn markdown_caption(&self) -> Option<String>
Source§impl Serialize for Message
impl Serialize for Message
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 Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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§impl<T> Erasable for T
impl<T> Erasable for 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