Skip to main content

Supergroup

Struct Supergroup 

Source
pub struct Supergroup {
Show 25 fields pub id: i64, pub usernames: Option<Usernames>, pub date: i32, pub status: ChatMemberStatus, pub member_count: i32, pub boost_level: i32, pub has_automatic_translation: bool, pub has_linked_chat: bool, pub has_location: bool, pub sign_messages: bool, pub show_message_sender: bool, pub join_to_send_messages: bool, pub join_by_request: bool, pub is_slow_mode_enabled: bool, pub is_channel: bool, pub is_broadcast_group: bool, pub is_forum: bool, pub is_direct_messages_group: bool, pub is_administered_direct_messages_group: bool, pub verification_status: Option<VerificationStatus>, pub has_direct_messages_group: bool, pub has_forum_tabs: bool, pub restriction_info: Option<RestrictionInfo>, pub paid_message_star_count: i64, pub active_story_state: Option<ActiveStoryState>,
}
Expand description

Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers

Fields§

§id: i64

Supergroup or channel identifier

§usernames: Option<Usernames>

Usernames of the supergroup or channel; may be null

§date: i32

Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member

§status: ChatMemberStatus

Status of the current user in the supergroup or channel; custom title will always be empty

§member_count: i32

Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through getChatSimilarChats, getChatsToPostStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getRecommendedChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, or for chats with messages or stories from publicForwards and foundStories

§boost_level: i32

Approximate boost level for the chat

§has_automatic_translation: bool

True, if automatic translation of messages is enabled in the channel

§has_linked_chat: bool

True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel

§has_location: bool

True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup

§sign_messages: bool

True, if messages sent to the channel contains name of the sender. This field is only applicable to channels

§show_message_sender: bool

True, if messages sent to the channel have information about the sender user. This field is only applicable to channels

§join_to_send_messages: bool

True, if users need to join the supergroup before they can send messages. May be false only for discussion supergroups and channel direct messages groups

§join_by_request: bool

True, if all users directly joining the supergroup need to be approved by supergroup administrators. May be true only for non-broadcast supergroups with username, location, or a linked chat

§is_slow_mode_enabled: bool

True, if the slow mode is enabled in the supergroup

§is_channel: bool

True, if the supergroup is a channel

§is_broadcast_group: bool

True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members

§is_forum: bool

True, if the supergroup is a forum with topics

§is_direct_messages_group: bool

True, if the supergroup is a direct message group for a channel chat

§is_administered_direct_messages_group: bool

True, if the supergroup is a direct messages group for a channel chat that is administered by the current user

§verification_status: Option<VerificationStatus>

Information about verification status of the supergroup or channel; may be null if none

§has_direct_messages_group: bool

True, if the channel has direct messages group

§has_forum_tabs: bool

True, if the supergroup is a forum, which topics are shown in the same way as in channel direct messages groups

§restriction_info: Option<RestrictionInfo>

Information about the restrictions that must be applied to the corresponding supergroup or channel chat; may be null if none

§paid_message_star_count: i64

Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message

§active_story_state: Option<ActiveStoryState>

State of active stories of the supergroup or channel; may be null if there are no active stories

Trait Implementations§

Source§

impl Clone for Supergroup

Source§

fn clone(&self) -> Supergroup

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 Supergroup

Source§

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

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

impl<'de> Deserialize<'de> for Supergroup

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 Supergroup

Source§

fn eq(&self, other: &Supergroup) -> 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 Supergroup

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 Supergroup

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>,