Class: TD::Types::User

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/user.rb

Overview

Represents a user.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#accent_color_idInteger

Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only.

Returns:

  • (Integer)

    the current value of accent_color_id



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def accent_color_id
  @accent_color_id
end

#added_to_attachment_menuBoolean

True, if the user added the current bot to attachment menu; only available to bots.

Returns:

  • (Boolean)

    the current value of added_to_attachment_menu



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def added_to_attachment_menu
  @added_to_attachment_menu
end

#background_custom_emoji_idInteger

Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. For Telegram Premium users only.

Returns:

  • (Integer)

    the current value of background_custom_emoji_id



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def background_custom_emoji_id
  @background_custom_emoji_id
end

#emoji_statusTD::Types::EmojiStatus?

Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.

Returns:



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def emoji_status
  @emoji_status
end

#first_nameTD::Types::String

First name of the user.

Returns:

  • (TD::Types::String)

    the current value of first_name



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def first_name
  @first_name
end

#has_active_storiesBoolean

True, if the user has non-expired stories available to the current user.

Returns:

  • (Boolean)

    the current value of has_active_stories



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def has_active_stories
  @has_active_stories
end

#has_unread_active_storiesBoolean

True, if the user has unread non-expired stories available to the current user.

Returns:

  • (Boolean)

    the current value of has_unread_active_stories



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def has_unread_active_stories
  @has_unread_active_stories
end

#have_accessBoolean

If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can’t be passed to any method.

Returns:

  • (Boolean)

    the current value of have_access



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def have_access
  @have_access
end

#idInteger

User identifier.

Returns:

  • (Integer)

    the current value of id



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def id
  @id
end

#is_close_friendBoolean

The user is a close friend of the current user; implies that the user is a contact.

Returns:

  • (Boolean)

    the current value of is_close_friend



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_close_friend
  @is_close_friend
end

#is_contactBoolean

The user is a contact of the current user.

Returns:

  • (Boolean)

    the current value of is_contact



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_contact
  @is_contact
end

#is_fakeBoolean

True, if many users reported this user as a fake account.

Returns:

  • (Boolean)

    the current value of is_fake



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_fake
  @is_fake
end

#is_mutual_contactBoolean

The user is a contact of the current user and the current user is a contact of the user.

Returns:

  • (Boolean)

    the current value of is_mutual_contact



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_mutual_contact
  @is_mutual_contact
end

#is_premiumBoolean

True, if the user is a Telegram Premium user.

Returns:

  • (Boolean)

    the current value of is_premium



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_premium
  @is_premium
end

#is_scamBoolean

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

Returns:

  • (Boolean)

    the current value of is_scam



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_scam
  @is_scam
end

#is_supportBoolean

True, if the user is Telegram support account.

Returns:

  • (Boolean)

    the current value of is_support



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_support
  @is_support
end

#is_verifiedBoolean

True, if the user is verified.

Returns:

  • (Boolean)

    the current value of is_verified



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def is_verified
  @is_verified
end

#language_codeTD::Types::String

IETF language tag of the user’s language; only available to bots.

Returns:

  • (TD::Types::String)

    the current value of language_code



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def language_code
  @language_code
end

#last_nameTD::Types::String

Last name of the user.

Returns:

  • (TD::Types::String)

    the current value of last_name



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def last_name
  @last_name
end

#phone_numberTD::Types::String

Phone number of the user.

Returns:

  • (TD::Types::String)

    the current value of phone_number



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def phone_number
  @phone_number
end

#profile_accent_color_idInteger

Identifier of the accent color for the user’s profile; -1 if none. For Telegram Premium users only.

Returns:

  • (Integer)

    the current value of profile_accent_color_id



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def profile_accent_color_id
  @profile_accent_color_id
end

#profile_background_custom_emoji_idInteger

Identifier of a custom emoji to be shown on the background of the user’s profile; 0 if none. For Telegram Premium users only.

Returns:

  • (Integer)

    the current value of profile_background_custom_emoji_id



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def profile_background_custom_emoji_id
  @profile_background_custom_emoji_id
end

#profile_photoTD::Types::ProfilePhoto?

Profile photo of the user; may be null.

Returns:



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def profile_photo
  @profile_photo
end

#restriction_reasonTD::Types::String

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

Returns:

  • (TD::Types::String)

    the current value of restriction_reason



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def restriction_reason
  @restriction_reason
end

#restricts_new_chatsBoolean

True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.

Returns:

  • (Boolean)

    the current value of restricts_new_chats



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def restricts_new_chats
  @restricts_new_chats
end

#statusTD::Types::UserStatus

Current online status of the user.

Returns:



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def status
  @status
end

#typeTD::Types::UserType

Type of the user.

Returns:



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def type
  @type
end

#usernamesTD::Types::Usernames?

Usernames of the user; may be null.

Returns:



49
50
51
# File 'lib/tdlib/types/user.rb', line 49

def usernames
  @usernames
end