Supergroup
public struct Supergroup : Codable, Equatable, FunctionResult
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 or channel identifier
Declaration
Swift
public let id: Int32
-
Username of the supergroup or channel; empty for private supergroups or channels
Declaration
Swift
public let username: String
-
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
Declaration
Swift
public let date: Int32
-
Status of the current user in the supergroup or channel; custom title will be always empty
Declaration
Swift
public let status: ChatMemberStatus
-
Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats
Declaration
Swift
public let memberCount: Int32
-
True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
Declaration
Swift
public let hasLinkedChat: Bool
-
True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
Declaration
Swift
public let hasLocation: Bool
-
True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels
Declaration
Swift
public let signMessages: Bool
-
True, if the slow mode is enabled in the supergroup
Declaration
Swift
public let isSlowModeEnabled: Bool
-
True, if the supergroup is a channel
Declaration
Swift
public let isChannel: Bool
-
True, if the supergroup or channel is verified
Declaration
Swift
public let isVerified: Bool
-
If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
Declaration
Swift
public let restrictionReason: String
-
True, if many users reported this supergroup as a scam
Declaration
Swift
public let isScam: Bool
-
init(id:username:date:status:memberCount:hasLinkedChat:hasLocation:signMessages:isSlowModeEnabled:isChannel:isVerified:restrictionReason:isScam:)
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
Declaration
Swift
public init(id: Int32, username: String, date: Int32, status: ChatMemberStatus, memberCount: Int32, hasLinkedChat: Bool, hasLocation: Bool, signMessages: Bool, isSlowModeEnabled: Bool, isChannel: Bool, isVerified: Bool, restrictionReason: String, isScam: Bool)
Parameters
id
Supergroup or channel identifier
username
Username of the supergroup or channel; empty for private supergroups or channels
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
status
Status of the current user in the supergroup or channel; custom title will be always empty
memberCount
Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats
hasLinkedChat
True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
hasLocation
True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
signMessages
True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels
isSlowModeEnabled
True, if the slow mode is enabled in the supergroup
isChannel
True, if the supergroup is a channel
isVerified
True, if the supergroup or channel is verified
restrictionReason
If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
isScam
True, if many users reported this supergroup as a scam