Skip to main content

ChatFullInfo

Struct ChatFullInfo 

Source
pub struct ChatFullInfo {
Show 25 fields pub active_usernames: Option<Vec<String>>, pub id: ChatId, pub kind: ChatFullInfoKind, pub photo: Option<ChatPhoto>, pub pinned_message: Option<Box<Message>>, pub message_auto_delete_time: Option<Seconds>, pub has_hidden_members: bool, pub has_aggressive_anti_spam_enabled: bool, pub accepted_gift_types: AcceptedGiftTypes, pub rating: Option<UserRating>, pub first_profile_audio: Option<Audio>, pub paid_message_star_count: Option<u32>, pub unique_gift_colors: Option<UniqueGiftColors>, pub accent_color_id: u8, pub background_custom_emoji_id: Option<CustomEmojiId>, pub profile_accent_color_id: Option<u8>, pub profile_background_custom_emoji_id: Option<CustomEmojiId>, pub emoji_status_custom_emoji_id: Option<CustomEmojiId>, pub emoji_status_expiration_date: Option<DateTime<Utc>>, pub has_visible_history: bool, pub max_reaction_count: u8, pub guard_bot: Option<User>, pub community: Option<Community>, pub ton_wallet_card: Option<TonWalletCard>, pub share_theme: Option<ChatShareTheme>,
}
Expand description

This object contains full information about a chat.

Fields§

§active_usernames: Option<Vec<String>>

Active usernames, if any.

§id: ChatId

A unique identifier for this chat.

§kind: ChatFullInfoKind§photo: Option<ChatPhoto>

A chat photo.

§pinned_message: Option<Box<Message>>

The most recent pinned message (by sending date).

§message_auto_delete_time: Option<Seconds>

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

§has_hidden_members: bool

true, if non-administrators can only get the list of bots and administrators in the 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.

§accepted_gift_types: AcceptedGiftTypes

Information about types of gifts that are accepted by the chat or by the corresponding user for private chats

§rating: Option<UserRating>

For private chats, the rating of the user if any

§first_profile_audio: Option<Audio>

For private chats, the first audio added to the profile of the user

§paid_message_star_count: Option<u32>

The number of Telegram Stars a general user have to pay to send a message to the chat

§unique_gift_colors: Option<UniqueGiftColors>

The color scheme based on a unique gift that must be used for the chat’s name, message replies and link previews

§accent_color_id: u8

Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details.

§background_custom_emoji_id: Option<CustomEmojiId>

Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background

§profile_accent_color_id: Option<u8>

Identifier of the accent color for the chat’s profile background. See profile accent colors for more details.

§profile_background_custom_emoji_id: Option<CustomEmojiId>

Custom emoji identifier of the emoji chosen by the chat for its profile background

§emoji_status_custom_emoji_id: Option<CustomEmojiId>

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

§emoji_status_expiration_date: Option<DateTime<Utc>>

Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any

§has_visible_history: bool

True, if new chat members will have access to old messages; available only to chat administrators.

§max_reaction_count: u8

The maximum number of reactions that can be set on a message in the chat

§guard_bot: Option<User>

The bot that processes join request queries in the chat. The field is only available to chat administrators.

§community: Option<Community>

Information about the community to which the chat belongs.

§ton_wallet_card: Option<TonWalletCard>

For private chats, the TON wallet card displayed on the user’s profile.

§share_theme: Option<ChatShareTheme>

Theme shown when sharing a link to a user or chat, if not the default.

Implementations§

Source§

impl ChatFullInfo

Source

pub fn is_private(&self) -> bool

Source

pub fn is_group(&self) -> bool

Note that Group and Supergroup are two similar but still different types of chat groups! Use is_group_chat to check if it’s any kind of group chat.

See blog post

Source

pub fn is_supergroup(&self) -> bool

Note that Group and Supergroup are two similar but still different types of chat groups! Use is_group_chat to check if it’s any kind of group chat.

See blog post

Source

pub fn is_channel(&self) -> bool

Source

pub fn is_chat(&self) -> bool

Source

pub fn is_group_chat(&self) -> bool

Source§

impl ChatFullInfo

Getters

Source

pub fn title(&self) -> Option<&str>

A title, for supergroups, channels and group chats.

Source

pub fn username(&self) -> Option<&str>

A username, for private chats, supergroups and channels if available.

Source

pub fn linked_chat_id(&self) -> Option<i64>

Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa.

Source

pub fn permissions(&self) -> Option<ChatPermissions>

A default chat member permissions, for groups and supergroups.

Source

pub fn sticker_set_name(&self) -> Option<&str>

For supergroups, name of group sticker set.

Source

pub fn can_set_sticker_set(&self) -> bool

true, if the bot can change the group sticker set.

Source

pub fn custom_emoji_sticker_set_name(&self) -> Option<&str>

For supergroups, the name of the group’s custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.

Source

pub fn slow_mode_delay(&self) -> Option<Seconds>

The minimum allowed delay between consecutive messages sent by each unpriviledged user.

Source

pub fn unrestrict_boost_count(&self) -> Option<u16>

Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa.

Source

pub fn location(&self) -> Option<&ChatLocation>

The location to which the supergroup is connected.

Source

pub fn join_to_send_messages(&self) -> bool

true, if users need to join the supergroup before they can send messages.

Source

pub fn join_by_request(&self) -> bool

true, if all users directly joining the supergroup need to be approved by supergroup administrators.

Source

pub fn description(&self) -> Option<&str>

A description, for groups, supergroups and channel chats.

A chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using ExportChatInviteLink.

Source

pub fn has_protected_content(&self) -> bool

true, if messages from the chat can’t be forwarded to other chats.

Source

pub fn available_reactions(&self) -> Option<&[ReactionType]>

List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.

Source

pub fn first_name(&self) -> Option<&str>

A first name of the other party in a private chat.

Source

pub fn last_name(&self) -> Option<&str>

A last name of the other party in a private chat.

Source

pub fn bio(&self) -> Option<&str>

Bio of the other party in a private chat.

Source

pub fn has_private_forwards(&self) -> 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.

Source

pub fn mentioned_users(&self) -> impl Iterator<Item = &User>

Returns all users that are “contained” in this Chat structure.

This might be useful to track information about users.

Note that this function can return duplicate users.

Trait Implementations§

Source§

impl Clone for ChatFullInfo

Source§

fn clone(&self) -> ChatFullInfo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ChatFullInfo

Source§

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

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

impl<'de> Deserialize<'de> for ChatFullInfo

Source§

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

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

impl PartialEq for ChatFullInfo

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for ChatFullInfo

Source§

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

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

impl StructuralPartialEq for ChatFullInfo

Auto Trait Implementations§

§

impl Forget for ChatFullInfo

§

impl Freeze for ChatFullInfo

§

impl Move for ChatFullInfo

§

impl RefUnwindSafe for ChatFullInfo
where InternalBitFlags: RefUnwindSafe, NonZero<i32>: RefUnwindSafe, Utc: RefUnwindSafe,

§

impl Send for ChatFullInfo
where RawVecInner: Send, BoxRaw<ChatFullInfoPublic>: Send, BoxRaw<ChatFullInfoPrivate>: Send, BoxRaw<Message>: Send, &'static str: Send, NonZero<i32>: Send, Utc: Send, BoxRaw<UniqueGift>: Send,

§

impl Sync for ChatFullInfo
where RawVecInner: Sync, BoxRaw<ChatFullInfoPublic>: Sync, BoxRaw<ChatFullInfoPrivate>: Sync, BoxRaw<Message>: Sync, NonZero<i32>: Sync, Utc: Sync, BoxRaw<UniqueGift>: Sync,

§

impl Unpin for ChatFullInfo

§

impl UnsafeUnpin for ChatFullInfo

§

impl UnwindSafe for ChatFullInfo

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Erasable for T

Source§

const ACK_1_1_0: bool = true

Available on non-enforce_1_1_0_semantics only.
Whether this implementor has acknowledged the 1.1.0 update to unerase’s documented implementation requirements. Read more
Source§

unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>

Unerase this erased pointer. Read more
Source§

fn erase(this: NonNull<Self>) -> NonNull<Erased>

Turn this erasable pointer into an erased pointer. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

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

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

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 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSync for T
where T: Sync + ?Sized,

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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