List of all members | Public Fields | Public Instance Methods | Static Public Attributes
supergroup Class Referencefinal

Inherits Object.

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.

Public Fields

int53 id_
 Supergroup or channel identifier.
 
object_ptr< usernamesusernames_
 Usernames of the supergroup or channel; may be null.
 
int32 date_
 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.
 
object_ptr< ChatMemberStatusstatus_
 Status of the current user in the supergroup or channel; custom title will always be empty.
 
int32 member_count_
 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, getChatsToSendStories, 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.
 
int32 boost_level_
 Approximate boost level for the chat.
 
bool has_linked_chat_
 True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel.
 
bool has_location_
 True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup.
 
bool sign_messages_
 True, if messages sent to the channel contains name of the sender. This field is only applicable to channels.
 
bool show_message_sender_
 True, if messages sent to the channel have information about the sender user. This field is only applicable to channels.
 
bool join_to_send_messages_
 True, if users need to join the supergroup before they can send messages. Always true for channels and non-discussion supergroups.
 
bool join_by_request_
 True, if all users directly joining the supergroup need to be approved by supergroup administrators. Always false for channels and supergroups without username, location, or a linked chat.
 
bool is_slow_mode_enabled_
 True, if the slow mode is enabled in the supergroup.
 
bool is_channel_
 True, if the supergroup is a channel.
 
bool is_broadcast_group_
 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.
 
bool is_forum_
 True, if the supergroup is a forum with topics.
 
bool is_verified_
 True, if the supergroup or channel is verified.
 
bool has_sensitive_content_
 True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler.
 
string restriction_reason_
 If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted.
 
bool is_scam_
 True, if many users reported this supergroup or channel as a scam.
 
bool is_fake_
 True, if many users reported this supergroup or channel as a fake account.
 
bool has_active_stories_
 True, if the supergroup or channel has non-expired stories available to the current user.
 
bool has_unread_active_stories_
 True, if the supergroup or channel has unread non-expired stories available to the current user.
 

Public Instance Methods

 supergroup ()
 
 supergroup (int53 id_, object_ptr< usernames > &&usernames_, int32 date_, object_ptr< ChatMemberStatus > &&status_, int32 member_count_, int32 boost_level_, bool has_linked_chat_, bool has_location_, bool sign_messages_, bool show_message_sender_, bool join_to_send_messages_, bool join_by_request_, bool is_slow_mode_enabled_, bool is_channel_, bool is_broadcast_group_, bool is_forum_, bool is_verified_, bool has_sensitive_content_, string const &restriction_reason_, bool is_scam_, bool is_fake_, bool has_active_stories_, bool has_unread_active_stories_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

static const std::int32_t ID = 212320974
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ supergroup() [1/2]

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.

◆ supergroup() [2/2]

supergroup ( int53  id_,
object_ptr< usernames > &&  usernames_,
int32  date_,
object_ptr< ChatMemberStatus > &&  status_,
int32  member_count_,
int32  boost_level_,
bool  has_linked_chat_,
bool  has_location_,
bool  sign_messages_,
bool  show_message_sender_,
bool  join_to_send_messages_,
bool  join_by_request_,
bool  is_slow_mode_enabled_,
bool  is_channel_,
bool  is_broadcast_group_,
bool  is_forum_,
bool  is_verified_,
bool  has_sensitive_content_,
string const &  restriction_reason_,
bool  is_scam_,
bool  is_fake_,
bool  has_active_stories_,
bool  has_unread_active_stories_ 
)

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.

Parameters
[in]id_Supergroup or channel identifier.
[in]usernames_Usernames of the supergroup or channel; may be null.
[in]date_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.
[in]status_Status of the current user in the supergroup or channel; custom title will always be empty.
[in]member_count_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, getChatsToSendStories, 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.
[in]boost_level_Approximate boost level for the chat.
[in]has_linked_chat_True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel.
[in]has_location_True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup.
[in]sign_messages_True, if messages sent to the channel contains name of the sender. This field is only applicable to channels.
[in]show_message_sender_True, if messages sent to the channel have information about the sender user. This field is only applicable to channels.
[in]join_to_send_messages_True, if users need to join the supergroup before they can send messages. Always true for channels and non-discussion supergroups.
[in]join_by_request_True, if all users directly joining the supergroup need to be approved by supergroup administrators. Always false for channels and supergroups without username, location, or a linked chat.
[in]is_slow_mode_enabled_True, if the slow mode is enabled in the supergroup.
[in]is_channel_True, if the supergroup is a channel.
[in]is_broadcast_group_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.
[in]is_forum_True, if the supergroup is a forum with topics.
[in]is_verified_True, if the supergroup or channel is verified.
[in]has_sensitive_content_True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler.
[in]restriction_reason_If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted.
[in]is_scam_True, if many users reported this supergroup or channel as a scam.
[in]is_fake_True, if many users reported this supergroup or channel as a fake account.
[in]has_active_stories_True, if the supergroup or channel has non-expired stories available to the current user.
[in]has_unread_active_stories_True, if the supergroup or channel has unread non-expired stories available to the current user.

Method Documentation

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: