Class: TD::Types::User
Overview
Represents a user.
Instance Attribute Summary collapse
-
#accent_color_id ⇒ Integer
Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
-
#added_to_attachment_menu ⇒ Boolean
True, if the user added the current bot to attachment menu; only available to bots.
-
#background_custom_emoji_id ⇒ Integer
Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
-
#emoji_status ⇒ TD::Types::EmojiStatus?
Emoji status to be shown instead of the default Telegram Premium badge; may be null.
-
#first_name ⇒ TD::Types::String
First name of the user.
-
#has_active_stories ⇒ Boolean
True, if the user has non-expired stories available to the current user.
-
#has_unread_active_stories ⇒ Boolean
True, if the user has unread non-expired stories available to the current user.
-
#have_access ⇒ Boolean
If false, the user is inaccessible, and the only information known about the user is inside this class.
-
#id ⇒ Integer
User identifier.
-
#is_close_friend ⇒ Boolean
The user is a close friend of the current user; implies that the user is a contact.
-
#is_contact ⇒ Boolean
The user is a contact of the current user.
-
#is_fake ⇒ Boolean
True, if many users reported this user as a fake account.
-
#is_mutual_contact ⇒ Boolean
The user is a contact of the current user and the current user is a contact of the user.
-
#is_premium ⇒ Boolean
True, if the user is a Telegram Premium user.
-
#is_scam ⇒ Boolean
True, if many users reported this user as a scam.
-
#is_support ⇒ Boolean
True, if the user is Telegram support account.
-
#is_verified ⇒ Boolean
True, if the user is verified.
-
#language_code ⇒ TD::Types::String
IETF language tag of the user’s language; only available to bots.
-
#last_name ⇒ TD::Types::String
Last name of the user.
-
#phone_number ⇒ TD::Types::String
Phone number of the user.
-
#profile_accent_color_id ⇒ Integer
Identifier of the accent color for the user’s profile; -1 if none.
-
#profile_background_custom_emoji_id ⇒ Integer
Identifier of a custom emoji to be shown on the background of the user’s profile; 0 if none.
-
#profile_photo ⇒ TD::Types::ProfilePhoto?
Profile photo of the user; may be null.
-
#restriction_reason ⇒ TD::Types::String
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
-
#restricts_new_chats ⇒ Boolean
True, if the user may restrict new chats with non-contacts.
-
#status ⇒ TD::Types::UserStatus
Current online status of the user.
-
#type ⇒ TD::Types::UserType
Type of the user.
-
#usernames ⇒ TD::Types::Usernames?
Usernames of the user; may be null.
Method Summary
Methods inherited from Base
Instance Attribute Details
#accent_color_id ⇒ Integer
Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def accent_color_id @accent_color_id end |
#added_to_attachment_menu ⇒ Boolean
True, if the user added the current bot to attachment menu; only available to bots.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def @added_to_attachment_menu end |
#background_custom_emoji_id ⇒ Integer
Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. For Telegram Premium users only.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def background_custom_emoji_id @background_custom_emoji_id end |
#emoji_status ⇒ TD::Types::EmojiStatus?
Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def emoji_status @emoji_status end |
#first_name ⇒ TD::Types::String
First name of the user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def first_name @first_name end |
#has_active_stories ⇒ Boolean
True, if the user has non-expired stories available to the current user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def has_active_stories @has_active_stories end |
#has_unread_active_stories ⇒ Boolean
True, if the user has unread non-expired stories available to the current user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def has_unread_active_stories @has_unread_active_stories end |
#have_access ⇒ Boolean
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.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def have_access @have_access end |
#id ⇒ Integer
User identifier.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def id @id end |
#is_close_friend ⇒ Boolean
The user is a close friend of the current user; implies that the user is a contact.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_close_friend @is_close_friend end |
#is_contact ⇒ Boolean
The user is a contact of the current user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_contact @is_contact end |
#is_fake ⇒ Boolean
True, if many users reported this user as a fake account.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_fake @is_fake end |
#is_mutual_contact ⇒ Boolean
The user is a contact of the current user and the current user is a contact of the user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_mutual_contact @is_mutual_contact end |
#is_premium ⇒ Boolean
True, if the user is a Telegram Premium user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_premium @is_premium end |
#is_scam ⇒ Boolean
True, if many users reported this user as a scam.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_scam @is_scam end |
#is_support ⇒ Boolean
True, if the user is Telegram support account.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_support @is_support end |
#is_verified ⇒ Boolean
True, if the user is verified.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def is_verified @is_verified end |
#language_code ⇒ TD::Types::String
IETF language tag of the user’s language; only available to bots.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def language_code @language_code end |
#last_name ⇒ TD::Types::String
Last name of the user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def last_name @last_name end |
#phone_number ⇒ TD::Types::String
Phone number of the user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def phone_number @phone_number end |
#profile_accent_color_id ⇒ Integer
Identifier of the accent color for the user’s profile; -1 if none. For Telegram Premium users only.
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_id ⇒ Integer
Identifier of a custom emoji to be shown on the background of the user’s profile; 0 if none. For Telegram Premium users only.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def profile_background_custom_emoji_id @profile_background_custom_emoji_id end |
#profile_photo ⇒ TD::Types::ProfilePhoto?
Profile photo of the user; may be null.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def profile_photo @profile_photo end |
#restriction_reason ⇒ TD::Types::String
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def restriction_reason @restriction_reason end |
#restricts_new_chats ⇒ Boolean
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.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def restricts_new_chats @restricts_new_chats end |
#status ⇒ TD::Types::UserStatus
Current online status of the user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def status @status end |
#type ⇒ TD::Types::UserType
Type of the user.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def type @type end |
#usernames ⇒ TD::Types::Usernames?
Usernames of the user; may be null.
49 50 51 |
# File 'lib/tdlib/types/user.rb', line 49 def usernames @usernames end |