pub struct MessageBuilder { /* private fields */ }Expand description
Builder for the Message structure
Implementations§
Source§impl MessageBuilder
impl MessageBuilder
Sourcepub fn new(message_id: i64, date: i64, chat: Chat) -> Self
pub fn new(message_id: i64, date: i64, chat: Chat) -> Self
Instantiate the builder with the fields message_id, message_thread_id, from, sender_chat, date, chat, forward_from, forward_from_chat, forward_from_message_id, forward_signature, forward_sender_name, forward_date, is_topic_message, is_automatic_forward, reply_to_message, via_bot, edit_date, has_protected_content, media_group_id, author_signature, text, entities, animation, audio, document, photo, sticker, video, video_note, voice, caption, caption_entities, has_media_spoiler, contact, dice, game, poll, venue, location, new_chat_members, left_chat_member, new_chat_title, new_chat_photo, delete_chat_photo, group_chat_created, supergroup_chat_created, channel_chat_created, message_auto_delete_timer_changed, migrate_to_chat_id, migrate_from_chat_id, pinned_message, invoice, successful_payment, connected_website, write_access_allowed, passport_data, proximity_alert_triggered, forum_topic_created, forum_topic_edited, forum_topic_closed, forum_topic_reopened, general_forum_topic_hidden, general_forum_topic_unhidden, video_chat_scheduled, video_chat_started, video_chat_ended, video_chat_participants_invited, web_app_data, reply_markup
Sourcepub fn message_thread_id(self, val: i64) -> Self
pub fn message_thread_id(self, val: i64) -> Self
Set the field message_thread_id to the given value
Sourcepub fn sender_chat(self, val: Box<Chat>) -> Self
pub fn sender_chat(self, val: Box<Chat>) -> Self
Set the field sender_chat to the given value
Sourcepub fn forward_from(self, val: User) -> Self
pub fn forward_from(self, val: User) -> Self
Set the field forward_from to the given value
Sourcepub fn forward_from_chat(self, val: Box<Chat>) -> Self
pub fn forward_from_chat(self, val: Box<Chat>) -> Self
Set the field forward_from_chat to the given value
Sourcepub fn forward_from_message_id(self, val: i64) -> Self
pub fn forward_from_message_id(self, val: i64) -> Self
Set the field forward_from_message_id to the given value
Sourcepub fn forward_signature(self, val: String) -> Self
pub fn forward_signature(self, val: String) -> Self
Set the field forward_signature to the given value
Sourcepub fn forward_sender_name(self, val: String) -> Self
pub fn forward_sender_name(self, val: String) -> Self
Set the field forward_sender_name to the given value
Sourcepub fn forward_date(self, val: i64) -> Self
pub fn forward_date(self, val: i64) -> Self
Set the field forward_date to the given value
Sourcepub fn is_topic_message(self, val: i64) -> Self
pub fn is_topic_message(self, val: i64) -> Self
Set the field is_topic_message to the given value
Sourcepub fn is_automatic_forward(self, val: bool) -> Self
pub fn is_automatic_forward(self, val: bool) -> Self
Set the field is_automatic_forward to the given value
Sourcepub fn reply_to_message(self, val: Box<Message>) -> Self
pub fn reply_to_message(self, val: Box<Message>) -> Self
Set the field reply_to_message to the given value
Sourcepub fn has_protected_content(self, val: bool) -> Self
pub fn has_protected_content(self, val: bool) -> Self
Set the field has_protected_content to the given value
Sourcepub fn media_group_id(self, val: String) -> Self
pub fn media_group_id(self, val: String) -> Self
Set the field media_group_id to the given value
Set the field author_signature to the given value
Sourcepub fn entities(self, val: Vec<MessageEntity>) -> Self
pub fn entities(self, val: Vec<MessageEntity>) -> Self
Set the field entities to the given value
Sourcepub fn video_note(self, val: VideoNote) -> Self
pub fn video_note(self, val: VideoNote) -> Self
Set the field video_note to the given value
Sourcepub fn caption_entities(self, val: Vec<MessageEntity>) -> Self
pub fn caption_entities(self, val: Vec<MessageEntity>) -> Self
Set the field caption_entities to the given value
Sourcepub fn has_media_spoiler(self, val: bool) -> Self
pub fn has_media_spoiler(self, val: bool) -> Self
Set the field has_media_spoiler to the given value
Sourcepub fn new_chat_members(self, val: Vec<User>) -> Self
pub fn new_chat_members(self, val: Vec<User>) -> Self
Set the field new_chat_members to the given value
Sourcepub fn left_chat_member(self, val: User) -> Self
pub fn left_chat_member(self, val: User) -> Self
Set the field left_chat_member to the given value
Sourcepub fn new_chat_title(self, val: String) -> Self
pub fn new_chat_title(self, val: String) -> Self
Set the field new_chat_title to the given value
Sourcepub fn new_chat_photo(self, val: Vec<PhotoSize>) -> Self
pub fn new_chat_photo(self, val: Vec<PhotoSize>) -> Self
Set the field new_chat_photo to the given value
Sourcepub fn delete_chat_photo(self, val: bool) -> Self
pub fn delete_chat_photo(self, val: bool) -> Self
Set the field delete_chat_photo to the given value
Sourcepub fn group_chat_created(self, val: bool) -> Self
pub fn group_chat_created(self, val: bool) -> Self
Set the field group_chat_created to the given value
Sourcepub fn supergroup_chat_created(self, val: bool) -> Self
pub fn supergroup_chat_created(self, val: bool) -> Self
Set the field supergroup_chat_created to the given value
Sourcepub fn channel_chat_created(self, val: bool) -> Self
pub fn channel_chat_created(self, val: bool) -> Self
Set the field channel_chat_created to the given value
Sourcepub fn message_auto_delete_timer_changed(
self,
val: MessageAutoDeleteTimerChanged,
) -> Self
pub fn message_auto_delete_timer_changed( self, val: MessageAutoDeleteTimerChanged, ) -> Self
Set the field message_auto_delete_timer_changed to the given value
Sourcepub fn migrate_to_chat_id(self, val: i64) -> Self
pub fn migrate_to_chat_id(self, val: i64) -> Self
Set the field migrate_to_chat_id to the given value
Sourcepub fn migrate_from_chat_id(self, val: i64) -> Self
pub fn migrate_from_chat_id(self, val: i64) -> Self
Set the field migrate_from_chat_id to the given value
Sourcepub fn pinned_message(self, val: Box<Message>) -> Self
pub fn pinned_message(self, val: Box<Message>) -> Self
Set the field pinned_message to the given value
Sourcepub fn successful_payment(self, val: SuccessfulPayment) -> Self
pub fn successful_payment(self, val: SuccessfulPayment) -> Self
Set the field successful_payment to the given value
Sourcepub fn connected_website(self, val: String) -> Self
pub fn connected_website(self, val: String) -> Self
Set the field connected_website to the given value
Sourcepub fn write_access_allowed(self, val: WriteAccessAllowed) -> Self
pub fn write_access_allowed(self, val: WriteAccessAllowed) -> Self
Set the field write_access_allowed to the given value
Sourcepub fn passport_data(self, val: PassportData) -> Self
pub fn passport_data(self, val: PassportData) -> Self
Set the field passport_data to the given value
Sourcepub fn proximity_alert_triggered(self, val: ProximityAlertTriggered) -> Self
pub fn proximity_alert_triggered(self, val: ProximityAlertTriggered) -> Self
Set the field proximity_alert_triggered to the given value
Sourcepub fn forum_topic_created(self, val: ForumTopicCreated) -> Self
pub fn forum_topic_created(self, val: ForumTopicCreated) -> Self
Set the field forum_topic_created to the given value
Sourcepub fn forum_topic_edited(self, val: ForumTopicEdited) -> Self
pub fn forum_topic_edited(self, val: ForumTopicEdited) -> Self
Set the field forum_topic_edited to the given value
Sourcepub fn forum_topic_closed(self, val: ForumTopicClosed) -> Self
pub fn forum_topic_closed(self, val: ForumTopicClosed) -> Self
Set the field forum_topic_closed to the given value
Sourcepub fn forum_topic_reopened(self, val: ForumTopicReopened) -> Self
pub fn forum_topic_reopened(self, val: ForumTopicReopened) -> Self
Set the field forum_topic_reopened to the given value
Set the field general_forum_topic_hidden to the given value
Set the field general_forum_topic_unhidden to the given value
Sourcepub fn video_chat_scheduled(self, val: VideoChatScheduled) -> Self
pub fn video_chat_scheduled(self, val: VideoChatScheduled) -> Self
Set the field video_chat_scheduled to the given value
Sourcepub fn video_chat_started(self, val: VideoChatStarted) -> Self
pub fn video_chat_started(self, val: VideoChatStarted) -> Self
Set the field video_chat_started to the given value
Sourcepub fn video_chat_ended(self, val: VideoChatEnded) -> Self
pub fn video_chat_ended(self, val: VideoChatEnded) -> Self
Set the field video_chat_ended to the given value
Sourcepub fn video_chat_participants_invited(
self,
val: VideoChatParticipantsInvited,
) -> Self
pub fn video_chat_participants_invited( self, val: VideoChatParticipantsInvited, ) -> Self
Set the field video_chat_participants_invited to the given value
Sourcepub fn web_app_data(self, val: WebAppData) -> Self
pub fn web_app_data(self, val: WebAppData) -> Self
Set the field web_app_data to the given value
Sourcepub fn reply_markup(self, val: InlineKeyboardMarkup) -> Self
pub fn reply_markup(self, val: InlineKeyboardMarkup) -> Self
Set the field reply_markup to the given value