Skip to main content

MessageProperties

Struct MessageProperties 

Source
pub struct MessageProperties {
Show 35 fields pub can_add_offer: bool, pub can_add_tasks: bool, pub can_be_approved: bool, pub can_be_copied: bool, pub can_be_copied_to_secret_chat: bool, pub can_be_declined: bool, pub can_be_deleted_only_for_self: bool, pub can_be_deleted_for_all_users: bool, pub can_be_edited: bool, pub can_be_forwarded: bool, pub can_be_paid: bool, pub can_be_pinned: bool, pub can_be_replied: bool, pub can_be_replied_in_another_chat: bool, pub can_be_saved: bool, pub can_be_shared_in_story: bool, pub can_edit_media: bool, pub can_edit_scheduling_state: bool, pub can_edit_suggested_post_info: bool, pub can_get_author: bool, pub can_get_embedding_code: bool, pub can_get_link: bool, pub can_get_media_timestamp_links: bool, pub can_get_message_thread: bool, pub can_get_read_date: bool, pub can_get_statistics: bool, pub can_get_video_advertisements: bool, pub can_get_viewers: bool, pub can_mark_tasks_as_done: bool, pub can_recognize_speech: bool, pub can_report_chat: bool, pub can_report_reactions: bool, pub can_report_supergroup_spam: bool, pub can_set_fact_check: bool, pub need_show_statistics: bool,
}
Expand description

Contains properties of a message and describes actions that can be done with the message right now

Fields§

§can_add_offer: bool

True, if an offer can be added to the message using addOffer

§can_add_tasks: bool

True, if tasks can be added to the message’s checklist using addChecklistTasks if the current user has Telegram Premium subscription

§can_be_approved: bool

True, if the message is a suggested post that can be approved by the user using approveSuggestedPost

§can_be_copied: bool

True, if content of the message can be copied using inputMessageForwarded or forwardMessages with copy options

§can_be_copied_to_secret_chat: bool

True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options

§can_be_declined: bool

True, if the message is a suggested post that can be declined by the user using declineSuggestedPost

§can_be_deleted_only_for_self: bool

True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false

§can_be_deleted_for_all_users: bool

True, if the message can be deleted for all users using the method deleteMessages with revoke == true

§can_be_edited: bool

True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location, poll, and checklist messages this fields shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message

§can_be_forwarded: bool

True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options

§can_be_paid: bool

True, if the message can be paid using inputInvoiceMessage

§can_be_pinned: bool

True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage

§can_be_replied: bool

True, if the message can be replied in the same chat and forum topic using inputMessageReplyToMessage

§can_be_replied_in_another_chat: bool

True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage

§can_be_saved: bool

True, if content of the message can be saved locally

§can_be_shared_in_story: bool

True, if the message can be shared in a story using inputStoryAreaTypeMessage

§can_edit_media: bool

True, if the message can be edited using the method editMessageMedia

§can_edit_scheduling_state: bool

True, if scheduling state of the message can be edited

§can_edit_suggested_post_info: bool

True, if another price or post send time can be suggested using addOffer

§can_get_author: bool

True, if author of the message sent on behalf of a chat can be received through getMessageAuthor

§can_get_embedding_code: bool

True, if code for message embedding can be received using getMessageEmbeddingCode

§can_get_link: bool

True, if a link can be generated for the message using getMessageLink

§can_get_media_timestamp_links: bool

True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink

§can_get_message_thread: bool

True, if information about the message thread is available through getMessageThread and getMessageThreadHistory

§can_get_read_date: bool

True, if read date of the message can be received through getMessageReadDate

§can_get_statistics: bool

True, if message statistics are available through getMessageStatistics and message forwards can be received using getMessagePublicForwards

§can_get_video_advertisements: bool

True, if advertisements for video of the message can be received though getVideoMessageAdvertisements

§can_get_viewers: bool

True, if chat members already viewed the message can be received through getMessageViewers

§can_mark_tasks_as_done: bool

True, if tasks can be marked as done or not done in the message’s checklist using markChecklistTasksAsDone if the current user has Telegram Premium subscription

§can_recognize_speech: bool

True, if speech can be recognized for the message through recognizeSpeech

§can_report_chat: bool

True, if the message can be reported using reportChat

§can_report_reactions: bool

True, if reactions on the message can be reported through reportMessageReactions

§can_report_supergroup_spam: bool

True, if the message can be reported using reportSupergroupSpam

§can_set_fact_check: bool

True, if fact check for the message can be changed through setMessageFactCheck

§need_show_statistics: bool

True, if message statistics must be available from context menu of the message

Trait Implementations§

Source§

impl Clone for MessageProperties

Source§

fn clone(&self) -> MessageProperties

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MessageProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MessageProperties

Source§

fn default() -> MessageProperties

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MessageProperties

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for MessageProperties

Source§

fn eq(&self, other: &MessageProperties) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MessageProperties

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MessageProperties

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,