Skip to content

class Tourmaline::User
inherits Reference #

This object represents a Telegram user or bot.

Included modules

JSON::Serializable

Constructors#

.new(id, is_bot, first_name, last_name : String? = nil, username : String? = nil, language_code : String? = nil, is_premium : Bool? = nil, added_to_attachment_menu : Bool? = nil, can_join_groups : Bool? = nil, can_read_all_group_messages : Bool? = nil, supports_inline_queries : Bool? = nil, can_connect_to_business : Bool? = nil) #

View source

.new(pull : JSON::PullParser) #

View source

Methods#

#added_to_attachment_menu=(added_to_attachment_menu : Bool?) #

Optional. True, if this user added the bot to the attachment menu

View source

#added_to_attachment_menu? : Bool? #

Optional. True, if this user added the bot to the attachment menu

View source

#can_connect_to_business=(can_connect_to_business : Bool?) #

Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.

View source

#can_connect_to_business? : Bool? #

Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.

View source

#can_join_groups=(can_join_groups : Bool?) #

Optional. True, if the bot can be invited to groups. Returned only in getMe.

View source

#can_join_groups? : Bool? #

Optional. True, if the bot can be invited to groups. Returned only in getMe.

View source

#can_read_all_group_messages=(can_read_all_group_messages : Bool?) #

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

View source

#can_read_all_group_messages? : Bool? #

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

View source

#first_name : String #

User's or bot's first name

View source

#first_name=(first_name : String) #

User's or bot's first name

View source

#full_name #

View source

#id : Int32 | Int64 #

Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

View source

#id=(id : Int32 | Int64) #

Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

View source

#inline_mention(name) #

View source

#is_bot=(is_bot : Bool) #

True, if this user is a bot

View source

#is_bot? : Bool #

True, if this user is a bot

View source

#is_premium=(is_premium : Bool?) #

Optional. True, if this user is a Telegram Premium user

View source

#is_premium? : Bool? #

Optional. True, if this user is a Telegram Premium user

View source

#language_code : String? #

Optional. IETF language tag of the user's language

View source

#language_code=(language_code : String?) #

Optional. IETF language tag of the user's language

View source

#last_name : String? #

Optional. User's or bot's last name

View source

#last_name=(last_name : String?) #

Optional. User's or bot's last name

View source

#supports_inline_queries=(supports_inline_queries : Bool?) #

Optional. True, if the bot supports inline queries. Returned only in getMe.

View source

#supports_inline_queries? : Bool? #

Optional. True, if the bot supports inline queries. Returned only in getMe.

View source

#username : String? #

Optional. User's or bot's username

View source

#username=(username : String?) #

Optional. User's or bot's username

View source