Class: TD::Types::Supergroup

Inherits:
Base
  • Object
show all
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

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#dateInteger

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.

Returns:

  • (Integer)

    the current value of date



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def date
  @date
end

#has_linked_chatBoolean

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

Returns:

  • (Boolean)

    the current value of has_linked_chat



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def has_linked_chat
  @has_linked_chat
end

#has_locationBoolean

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

Returns:

  • (Boolean)

    the current value of has_location



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def has_location
  @has_location
end

#idInteger

Supergroup or channel identifier.

Returns:

  • (Integer)

    the current value of id



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def id
  @id
end

#is_channelBoolean

True, if the supergroup is a channel.

Returns:

  • (Boolean)

    the current value of is_channel



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def is_channel
  @is_channel
end

#is_scamBoolean

True, if many users reported this supergroup as a scam.

Returns:

  • (Boolean)

    the current value of is_scam



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def is_scam
  @is_scam
end

#is_slow_mode_enabledBoolean

True, if the slow mode is enabled in the supergroup.

Returns:

  • (Boolean)

    the current value of is_slow_mode_enabled



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def is_slow_mode_enabled
  @is_slow_mode_enabled
end

#is_verifiedBoolean

True, if the supergroup or channel is verified.

Returns:

  • (Boolean)

    the current value of is_verified



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def is_verified
  @is_verified
end

#member_countInteger

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

Returns:

  • (Integer)

    the current value of member_count



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def member_count
  @member_count
end

#restriction_reasonString

If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted.

Returns:

  • (String)

    the current value of restriction_reason



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def restriction_reason
  @restriction_reason
end

#sign_messagesBoolean

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

Returns:

  • (Boolean)

    the current value of sign_messages



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def sign_messages
  @sign_messages
end

#statusTD::Types::ChatMemberStatus

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

Returns:



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def status
  @status
end

#usernameString?

Username of the supergroup or channel; empty for private supergroups or channels.

Returns:

  • (String, nil)

    the current value of username



28
29
30
# File 'lib/tdlib/types/supergroup.rb', line 28

def username
  @username
end