Struct telexide::model::raw::RawChat

source ·
pub struct RawChat {
Show 29 fields pub id: i64, pub chat_type: ChatType, pub title: Option<String>, pub username: Option<String>, pub first_name: Option<String>, pub last_name: Option<String>, pub is_forum: bool, pub photo: Option<ChatPhoto>, pub active_usernames: Vec<String>, pub emoji_status_custom_emoji_id: Option<String>, pub emoji_status_expiration_date: Option<DateTime<Utc>>, pub bio: Option<String>, pub has_private_forwards: bool, pub has_restricted_voice_and_video_messages: Option<bool>, pub join_to_send_messages: bool, pub join_by_request: bool, pub description: Option<String>, pub invite_link: Option<String>, pub pinned_message: Option<Box<RawMessage>>, pub permissions: Option<ChatPermissions>, pub slow_mode_delay: Option<usize>, pub message_auto_delete_time: Option<usize>, pub has_aggressive_anti_spam_enabled: bool, pub has_hidden_members: bool, pub has_protected_content: bool, pub sticker_set_name: Option<String>, pub can_set_sticker_set: bool, pub linked_chat_id: Option<i64>, pub location: Option<ChatLocation>,
}
Expand description

The raw chat, for most usages the Chat object is easier to use

Fields§

§id: i64

Unique identifier for this chat

§chat_type: ChatType§title: Option<String>

Title, for supergroups, channels and group chats

§username: Option<String>

Username, for private chats, supergroups and channels if available

§first_name: Option<String>

First name of the other party in a private chat

§last_name: Option<String>

Last name of the other party in a private chat

§is_forum: bool

True, if the supergroup chat is a forum

§photo: Option<ChatPhoto>

Chat photo. Returned only in getChat.

§active_usernames: Vec<String>

If non-empty, the list of all active chat usernames. Returned only in get_chat.

§emoji_status_custom_emoji_id: Option<String>

Custom emoji identifier of emoji status of the other party in a private chat. Returned only in get_chat.

§emoji_status_expiration_date: Option<DateTime<Utc>>

Expiration date of the emoji status of the other party in a private chat, if any. Returned only in get_chat.

§bio: Option<String>

Bio of the other party in a private chat. Returned only in get_chat.

§has_private_forwards: bool

True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in get_chat.

§has_restricted_voice_and_video_messages: Option<bool>

True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat.Returned only in get_chat.

§join_to_send_messages: bool

True, if users need to join the supergroup before they can send messages.Returned only in get_chat.

§join_by_request: bool

True, if all users directly joining the supergroup need to be approved by supergroup administrators.Returned only in get_chat.

§description: Option<String>

Description, for groups, supergroups and channel chats. Returned only in get_chat.

§invite_link: Option<String>

Chat invite link, for groups, supergroups and channel chats.

§pinned_message: Option<Box<RawMessage>>

Pinned message, for groups, supergroups and channels. Returned only in get_chat.

§permissions: Option<ChatPermissions>

Default chat member permissions, for groups and supergroups. Returned only in get_chat.

§slow_mode_delay: Option<usize>

For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in get_chat.

§message_auto_delete_time: Option<usize>

The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in get_chat.

§has_aggressive_anti_spam_enabled: bool

True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in get_chat.

§has_hidden_members: bool

True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in get_chat.

§has_protected_content: bool

True, if messages from the chat can’t be forwarded to other chats. Returned only in get_chat.

§sticker_set_name: Option<String>

For supergroups, name of group sticker set. Returned only in get_chat.

§can_set_sticker_set: bool

True, if the bot can change the group sticker set. Returned only in get_chat.

§linked_chat_id: Option<i64>

Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in get_chat.

§location: Option<ChatLocation>

For supergroups, the location to which the supergroup is connected. Returned only in get_chat.

Trait Implementations§

source§

impl Clone for RawChat

source§

fn clone(&self) -> RawChat

Returns a copy 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 RawChat

source§

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

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

impl<'de> Deserialize<'de> for RawChat

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 From<Chat> for RawChat

source§

fn from(chat: Chat) -> RawChat

Converts to this type from the input type.
source§

impl From<RawChat> for Chat

source§

fn from(raw: RawChat) -> Chat

Converts to this type from the input type.
source§

impl PartialEq for RawChat

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RawChat

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 RawChat

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> CloneDebuggableStorage for Twhere T: DebuggableStorage + Clone,

source§

impl<T> CloneableStorage for Twhere T: Any + Send + Sync + Clone,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DebuggableStorage for Twhere T: Any + Send + Sync + Debug,

source§

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