Class TdApi.Supergroup

  • Enclosing class:
    TdApi

    public static class TdApi.Supergroup
    extends TdApi.Object
    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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean anyoneCanInvite
      True, if any member of the supergroup can invite other members.
      static int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      int 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.
      int id
      Supergroup or channel identifier.
      boolean isChannel
      True, if the supergroup is a channel.
      boolean isVerified
      True, if the supergroup or channel is verified.
      int memberCount
      Member count; 0 if unknown.
      java.lang.String restrictionReason
      If non-empty, contains the reason why access to this supergroup or channel must be restricted.
      boolean signMessages
      True, if messages sent to the channel should contain information about the sender.
      TdApi.ChatMemberStatus status
      Status of the current user in the supergroup or channel.
      java.lang.String username
      Username of the supergroup or channel; empty for private supergroups or channels.
    • Constructor Summary

      Constructors 
      Constructor Description
      Supergroup()
      Default constructor.
      Supergroup​(int id, java.lang.String username, int date, TdApi.ChatMemberStatus status, int memberCount, boolean anyoneCanInvite, boolean signMessages, boolean isChannel, boolean isVerified, java.lang.String restrictionReason)
      Constructor for initialization of all fields.
    • Field Detail

      • id

        public int id
        Supergroup or channel identifier.
      • username

        public java.lang.String username
        Username of the supergroup or channel; empty for private supergroups or channels.
      • date

        public int 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.
      • memberCount

        public int memberCount
        Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats.
      • anyoneCanInvite

        public boolean anyoneCanInvite
        True, if any member of the supergroup can invite other members. This field has no meaning for channels.
      • signMessages

        public boolean signMessages
        True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels.
      • isChannel

        public boolean isChannel
        True, if the supergroup is a channel.
      • isVerified

        public boolean isVerified
        True, if the supergroup or channel is verified.
      • restrictionReason

        public java.lang.String restrictionReason
        If non-empty, contains the reason why access to this supergroup or channel must be restricted. Format of the string is "{type}: {description}". {type} Contains the type of the restriction and at least one of the suffixes "-all", "-ios", "-android", or "-wp", which describe the platforms on which access should be restricted. (For example, "terms-ios-android". {description} contains a human-readable description of the restriction, which can be shown to the user.)
      • CONSTRUCTOR

        public static final int CONSTRUCTOR
        Identifier uniquely determining type of the object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Supergroup

        public Supergroup()
        Default constructor.
      • Supergroup

        public Supergroup​(int id,
                          java.lang.String username,
                          int date,
                          TdApi.ChatMemberStatus status,
                          int memberCount,
                          boolean anyoneCanInvite,
                          boolean signMessages,
                          boolean isChannel,
                          boolean isVerified,
                          java.lang.String restrictionReason)
        Constructor for initialization of all fields.
        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.
        memberCount - Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats.
        anyoneCanInvite - True, if any member of the supergroup can invite other members. This field has no meaning for channels.
        signMessages - True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels.
        isChannel - True, if the supergroup is a channel.
        isVerified - True, if the supergroup or channel is verified.
        restrictionReason - If non-empty, contains the reason why access to this supergroup or channel must be restricted. Format of the string is "{type}: {description}". {type} Contains the type of the restriction and at least one of the suffixes "-all", "-ios", "-android", or "-wp", which describe the platforms on which access should be restricted. (For example, "terms-ios-android". {description} contains a human-readable description of the restriction, which can be shown to the user.)