Class: TD::Types::Supergroup
- Defined in:
- lib/tdlib/types/supergroup.rb
Overview
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.
Instance Attribute Summary collapse
-
#boost_level ⇒ Integer
Approximate boost level for the chat.
-
#date ⇒ Integer
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.
-
#has_active_stories ⇒ Boolean
True, if the supergroup or channel has non-expired stories available to the current user.
-
#has_linked_chat ⇒ Boolean
True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel.
-
#has_location ⇒ Boolean
True, if the supergroup is connected to a location, i.e.
-
#has_sensitive_content ⇒ Boolean
True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler.
-
#has_unread_active_stories ⇒ Boolean
True, if the supergroup or channel has unread non-expired stories available to the current user.
-
#id ⇒ Integer
Supergroup or channel identifier.
-
#is_broadcast_group ⇒ Boolean
True, if the supergroup is a broadcast group, i.e.
-
#is_channel ⇒ Boolean
True, if the supergroup is a channel.
-
#is_fake ⇒ Boolean
True, if many users reported this supergroup or channel as a fake account.
-
#is_forum ⇒ Boolean
True, if the supergroup is a forum with topics.
-
#is_scam ⇒ Boolean
True, if many users reported this supergroup or channel as a scam.
-
#is_slow_mode_enabled ⇒ Boolean
True, if the slow mode is enabled in the supergroup.
-
#is_verified ⇒ Boolean
True, if the supergroup or channel is verified.
-
#join_by_request ⇒ Boolean
True, if all users directly joining the supergroup need to be approved by supergroup administrators.
-
#join_to_send_messages ⇒ Boolean
True, if users need to join the supergroup before they can send messages.
-
#member_count ⇒ Integer
Number of members in the supergroup or channel; 0 if unknown.
-
#restriction_reason ⇒ TD::Types::String
If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted.
-
#show_message_sender ⇒ Boolean
True, if messages sent to the channel have information about the sender user.
-
#sign_messages ⇒ Boolean
True, if messages sent to the channel contains name of the sender.
-
#status ⇒ TD::Types::ChatMemberStatus
Status of the current user in the supergroup or channel; custom title will always be empty.
-
#usernames ⇒ TD::Types::Usernames?
Usernames of the supergroup or channel; may be null.
Method Summary
Methods inherited from Base
Instance Attribute Details
#boost_level ⇒ Integer
Approximate boost level for the chat.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def boost_level @boost_level end |
#date ⇒ Integer
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.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def date @date end |
#has_active_stories ⇒ Boolean
True, if the supergroup or channel has non-expired stories available to the current user.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def has_active_stories @has_active_stories end |
#has_linked_chat ⇒ Boolean
True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def has_linked_chat @has_linked_chat end |
#has_location ⇒ Boolean
True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def has_location @has_location end |
#has_sensitive_content ⇒ Boolean
True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def has_sensitive_content @has_sensitive_content end |
#has_unread_active_stories ⇒ Boolean
True, if the supergroup or channel has unread non-expired stories available to the current user.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def has_unread_active_stories @has_unread_active_stories end |
#id ⇒ Integer
Supergroup or channel identifier.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def id @id end |
#is_broadcast_group ⇒ Boolean
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.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def is_broadcast_group @is_broadcast_group end |
#is_channel ⇒ Boolean
True, if the supergroup is a channel.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def is_channel @is_channel end |
#is_fake ⇒ Boolean
True, if many users reported this supergroup or channel as a fake account.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def is_fake @is_fake end |
#is_forum ⇒ Boolean
True, if the supergroup is a forum with topics.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def is_forum @is_forum end |
#is_scam ⇒ Boolean
True, if many users reported this supergroup or channel as a scam.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def is_scam @is_scam end |
#is_slow_mode_enabled ⇒ Boolean
True, if the slow mode is enabled in the supergroup.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def is_slow_mode_enabled @is_slow_mode_enabled end |
#is_verified ⇒ Boolean
True, if the supergroup or channel is verified.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def is_verified @is_verified end |
#join_by_request ⇒ Boolean
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.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def join_by_request @join_by_request end |
#join_to_send_messages ⇒ Boolean
True, if users need to join the supergroup before they can send messages. Always true for channels and non-discussion supergroups.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def @join_to_send_messages end |
#member_count ⇒ Integer
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, searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, or for chats with messages or stories from PublicForwards and foundStories.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def member_count @member_count end |
#restriction_reason ⇒ TD::Types::String
If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def restriction_reason @restriction_reason end |
#show_message_sender ⇒ Boolean
True, if messages sent to the channel have information about the sender user. This field is only applicable to channels.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def @show_message_sender end |
#sign_messages ⇒ Boolean
True, if messages sent to the channel contains name of the sender. This field is only applicable to channels.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def @sign_messages end |
#status ⇒ TD::Types::ChatMemberStatus
Status of the current user in the supergroup or channel; custom title will always be empty.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def status @status end |
#usernames ⇒ TD::Types::Usernames?
Usernames of the supergroup or channel; may be null.
50 51 52 |
# File 'lib/tdlib/types/supergroup.rb', line 50 def usernames @usernames end |